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 01/20] 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 02/20] 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 03/20] 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 04/20] 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 05/20] 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 06/20] 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 07/20] 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 08/20] 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 09/20] 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); } From da5f0853d1670f87d85cce764a0d2f3faa464398 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 11:53:04 +0000 Subject: [PATCH 10/20] Changes generated by cab4c6d4f4714865da64e55cc2cfce31ce27171a This commit was automatically created from gocardless/client-library-templates@cab4c6d4f4714865da64e55cc2cfce31ce27171a by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/30004607949 --- .../com/gocardless/resources/Balance.java | 17 +- .../BankAccountHolderVerification.java | 23 +-- .../resources/BankDetailsLookup.java | 2 +- .../gocardless/resources/BillingRequest.java | 26 ++- .../resources/BillingRequestWithAction.java | 27 ++- .../com/gocardless/resources/Creditor.java | 17 +- .../resources/CustomerNotification.java | 14 +- .../java/com/gocardless/resources/Event.java | 40 ++--- .../resources/InstalmentSchedule.java | 15 +- .../com/gocardless/resources/Mandate.java | 25 ++- .../gocardless/resources/MandateImport.java | 17 +- .../gocardless/resources/OutboundPayment.java | 47 ++--- .../resources/OutboundPaymentImport.java | 16 +- .../resources/PayerAuthorisation.java | 26 ++- .../com/gocardless/resources/Payment.java | 24 ++- .../java/com/gocardless/resources/Payout.java | 20 +-- .../com/gocardless/resources/PayoutItem.java | 34 ++-- .../gocardless/resources/RedirectFlow.java | 5 +- .../java/com/gocardless/resources/Refund.java | 16 +- .../resources/ScenarioSimulator.java | 165 ++++++++---------- .../gocardless/resources/Subscription.java | 21 +-- .../resources/VerificationDetail.java | 5 +- .../services/BillingRequestService.java | 8 +- .../services/OutboundPaymentService.java | 2 +- .../services/PayerAuthorisationService.java | 11 +- .../services/RedirectFlowService.java | 4 +- .../gocardless/services/RefundService.java | 2 +- .../services/SubscriptionService.java | 2 +- 28 files changed, 268 insertions(+), 363 deletions(-) diff --git a/src/main/java/com/gocardless/resources/Balance.java b/src/main/java/com/gocardless/resources/Balance.java index 782f46e4..197f3be0 100644 --- a/src/main/java/com/gocardless/resources/Balance.java +++ b/src/main/java/com/gocardless/resources/Balance.java @@ -32,17 +32,16 @@ public Integer getAmount() { /** * Type of the balance. Could be one of - *
    - *
  • pending_payments_submitted: Payments we have submitted to the scheme but not yet + * + * - `pending_payments_submitted`: Payments we have submitted to the scheme but not yet * confirmed. This does not exactly correspond to Pending payments in the dashboard, - * because this balance does not include payments that are pending submission.
  • - *
  • confirmed_funds: Payments that have been confirmed minus fees and unclaimed debits for - * refunds, failures and chargebacks. These funds have not yet been moved into a payout.
  • - *
  • pending_payouts: Confirmed payments that have been moved into a payout. This is the total + * because this balance does not include payments that are pending submission. - + * `confirmed_funds`: Payments that have been confirmed minus fees and unclaimed debits for + * refunds, failures and chargebacks. These funds have not yet been moved into a payout. - + * `pending_payouts`: Confirmed payments that have been moved into a payout. This is the total * due to be paid into your bank account in the next payout run (payouts happen once every - * business day). pending_payouts will only be non-zero while we are generating and submitting - * the payouts to our partner bank.
  • - *
+ * business day). `pending_payouts` will only be non-zero while we are generating and submitting + * the payouts to our partner bank. */ public BalanceType getBalanceType() { return balanceType; diff --git a/src/main/java/com/gocardless/resources/BankAccountHolderVerification.java b/src/main/java/com/gocardless/resources/BankAccountHolderVerification.java index 45f996f1..348142fd 100644 --- a/src/main/java/com/gocardless/resources/BankAccountHolderVerification.java +++ b/src/main/java/com/gocardless/resources/BankAccountHolderVerification.java @@ -35,16 +35,12 @@ public String getId() { /** * Result of the verification, could be one of - *
    - *
  • `full_match`: The verification has confirmed that the account name exactly matches the - * details provided.
  • - *
  • `partial_match`: The verification has confirmed that the account name is similar but does - * not match to the details provided.
  • - *
  • `no_match`: The verification concludes the provided name does not match the account - * details.
  • - *
  • `unable_to_match`: The verification could not be performed due to recipient bank issues - * or technical issues
  • - *
+ * + * - `full_match`: The verification has confirmed that the account name exactly matches the + * details provided. - `partial_match`: The verification has confirmed that the account name is + * similar but does not match to the details provided. - `no_match`: The verification concludes + * the provided name does not match the account details. - `unable_to_match`: The verification + * could not be performed due to recipient bank issues or technical issues */ public Result getResult() { return result; @@ -52,10 +48,9 @@ public Result getResult() { /** * The status of the bank account holder verification. - *
    - *
  • `pending`: We have triggered the verification, but the result has not come back yet.
  • - *
  • `completed`: The verification is complete and is ready to be used.
  • - *
+ * + * - `pending`: We have triggered the verification, but the result has not come back yet. - + * `completed`: The verification is complete and is ready to be used. * */ public Status getStatus() { diff --git a/src/main/java/com/gocardless/resources/BankDetailsLookup.java b/src/main/java/com/gocardless/resources/BankDetailsLookup.java index f90ae46e..5b3236a7 100644 --- a/src/main/java/com/gocardless/resources/BankDetailsLookup.java +++ b/src/main/java/com/gocardless/resources/BankDetailsLookup.java @@ -37,7 +37,7 @@ public String getBankName() { * *

* Even if no BIC is returned for an account, GoCardless may still be able to collect payments - * from it - you should refer to the `available_debit_schemes` attribute to determine + * from it - you should refer to the available_debit_schemes attribute to determine * reachability. *

*/ diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index 17330ff7..4a66c78a 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -153,13 +153,11 @@ public Resources getResources() { /** * 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 Status getStatus() { return status; @@ -972,14 +970,12 @@ public Boolean getSweeping() { /** * 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. diff --git a/src/main/java/com/gocardless/resources/BillingRequestWithAction.java b/src/main/java/com/gocardless/resources/BillingRequestWithAction.java index 2e732e74..c1c7a39e 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestWithAction.java +++ b/src/main/java/com/gocardless/resources/BillingRequestWithAction.java @@ -354,13 +354,11 @@ public Resources getResources() { /** * 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 Status getStatus() { return status; @@ -1176,15 +1174,12 @@ public Boolean getSweeping() { /** * 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 diff --git a/src/main/java/com/gocardless/resources/Creditor.java b/src/main/java/com/gocardless/resources/Creditor.java index 6d583f72..0600d9e6 100644 --- a/src/main/java/com/gocardless/resources/Creditor.java +++ b/src/main/java/com/gocardless/resources/Creditor.java @@ -200,16 +200,15 @@ public List getSchemeIdentifiers() { * The creditor's verification status, indicating whether they can yet receive payouts. For more * details on handling verification as a partner, see our ["Helping your users get verified" * guide](/getting-started/partners/helping-your-users-get-verified/). One of: - *
    - *
  • `successful`: The creditor's account is fully verified, and they can receive payouts. - * Once a creditor has been successfully verified, they may in the future require further + * + * - `successful`: The creditor's account is fully verified, and they can receive payouts. Once + * a creditor has been successfully verified, they may in the future require further * verification - for example, if they change their payout bank account, we will have to check - * that they own the new bank account before they can receive payouts again.
  • - *
  • `in_review`: The creditor has provided all of the information currently requested, and it - * is awaiting review by GoCardless before they can be verified and receive payouts.
  • - *
  • `action_required`: The creditor needs to provide further information to verify their - * account so they can receive payouts, and should visit the verification flow.
  • - *
+ * that they own the new bank account before they can receive payouts again. - `in_review`: The + * creditor has provided all of the information currently requested, and it is awaiting review + * by GoCardless before they can be verified and receive payouts. - `action_required`: The + * creditor needs to provide further information to verify their account so they can receive + * payouts, and should visit the verification flow. */ public VerificationStatus getVerificationStatus() { return verificationStatus; diff --git a/src/main/java/com/gocardless/resources/CustomerNotification.java b/src/main/java/com/gocardless/resources/CustomerNotification.java index 749e5a0f..ea5f6d83 100644 --- a/src/main/java/com/gocardless/resources/CustomerNotification.java +++ b/src/main/java/com/gocardless/resources/CustomerNotification.java @@ -65,16 +65,10 @@ public Links getLinks() { /** * The type of notification the customer shall receive. One of: - *
    - *
  • `payment_created`
  • - *
  • `payment_cancelled`
  • - *
  • `mandate_created`
  • - *
  • `mandate_blocked`
  • - *
  • `subscription_created`
  • - *
  • `subscription_cancelled`
  • - *
  • `instalment_schedule_created`
  • - *
  • `instalment_schedule_cancelled`
  • - *
+ * + * - `payment_created` - `payment_cancelled` - `mandate_created` - `mandate_blocked` - + * `subscription_created` - `subscription_cancelled` - `instalment_schedule_created` - + * `instalment_schedule_cancelled` */ public Type getType() { return type; diff --git a/src/main/java/com/gocardless/resources/Event.java b/src/main/java/com/gocardless/resources/Event.java index 41da0cb2..38d50a3f 100644 --- a/src/main/java/com/gocardless/resources/Event.java +++ b/src/main/java/com/gocardless/resources/Event.java @@ -97,21 +97,10 @@ public Map getResourceMetadata() { /** * The resource type for this event. 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 ResourceType getResourceType() { return resourceType; @@ -253,11 +242,10 @@ public Integer getItemCount() { /** * When will_attempt_retry is set to false, this field will contain the reason the payment * was not retried. This can be one of: - *
    - *
  • `failure_filter_applied`: The payment won't be intelligently retried as there is a - * high likelihood of failure on retry.
  • - *
  • `other`: The payment won't be intelligently retried due to any other reason.
  • - *
+ * + * - `failure_filter_applied`: The payment won't be intelligently retried as there is a high + * likelihood of failure on retry. - `other`: The payment won't be intelligently retried due + * to any other reason. */ public String getNotRetriedReason() { return notRetriedReason; @@ -265,13 +253,11 @@ public String getNotRetriedReason() { /** * Who initiated the event. One of: - *
    - *
  • `bank`: this event was triggered by a report from the banks
  • - *
  • `gocardless`: this event was performed by GoCardless automatically
  • - *
  • `api`: this event was triggered by an API endpoint
  • - *
  • `customer`: this event was triggered by a Customer
  • - *
  • `payer`: this event was triggered by a Payer
  • - *
+ * + * - `bank`: this event was triggered by a report from the banks - `gocardless`: this event + * was performed by GoCardless automatically - `api`: this event was triggered by an API + * endpoint - `customer`: this event was triggered by a Customer - `payer`: this event was + * triggered by a Payer */ public Origin getOrigin() { return origin; diff --git a/src/main/java/com/gocardless/resources/InstalmentSchedule.java b/src/main/java/com/gocardless/resources/InstalmentSchedule.java index 9d53f9c1..12f3ef14 100644 --- a/src/main/java/com/gocardless/resources/InstalmentSchedule.java +++ b/src/main/java/com/gocardless/resources/InstalmentSchedule.java @@ -90,15 +90,12 @@ public Map getPaymentErrors() { /** * One of: - *
    - *
  • `pending`: we're waiting for GC to create the payments
  • - *
  • `active`: the payments have been created, and the schedule is active
  • - *
  • `creation_failed`: payment creation failed
  • - *
  • `completed`: we have passed the date of the final payment and all payments have been - * collected
  • - *
  • `cancelled`: the schedule has been cancelled
  • - *
  • `errored`: one or more payments have failed
  • - *
+ * + * - `pending`: we're waiting for GC to create the payments - `active`: the payments have been + * created, and the schedule is active - `creation_failed`: payment creation failed - + * `completed`: we have passed the date of the final payment and all payments have been + * collected - `cancelled`: the schedule has been cancelled - `errored`: one or more payments + * have failed */ public Status getStatus() { return status; diff --git a/src/main/java/com/gocardless/resources/Mandate.java b/src/main/java/com/gocardless/resources/Mandate.java index 8f53c0cd..aef7da58 100644 --- a/src/main/java/com/gocardless/resources/Mandate.java +++ b/src/main/java/com/gocardless/resources/Mandate.java @@ -155,21 +155,16 @@ public String getScheme() { /** * One of: - *
    - *
  • `pending_customer_approval`: the mandate has not yet been signed by the second - * customer
  • - *
  • `pending_submission`: the mandate has not yet been submitted to the customer's bank
  • - *
  • `submitted`: the mandate has been submitted to the customer's bank but has not been - * processed yet
  • - *
  • `active`: the mandate has been successfully set up by the customer's bank
  • - *
  • `suspended_by_payer`: the mandate has been suspended by payer
  • - *
  • `failed`: the mandate could not be created
  • - *
  • `cancelled`: the mandate has been cancelled
  • - *
  • `expired`: the mandate has expired due to dormancy
  • - *
  • `consumed`: the mandate has been consumed and cannot be reused (note that this only - * applies to schemes that are per-payment authorised)
  • - *
  • `blocked`: the mandate has been blocked and payments cannot be created
  • - *
+ * + * - `pending_customer_approval`: the mandate has not yet been signed by the second customer - + * `pending_submission`: the mandate has not yet been submitted to the customer's bank - + * `submitted`: the mandate has been submitted to the customer's bank but has not been processed + * yet - `active`: the mandate has been successfully set up by the customer's bank - + * `suspended_by_payer`: the mandate has been suspended by payer - `failed`: the mandate could + * not be created - `cancelled`: the mandate has been cancelled - `expired`: the mandate has + * expired due to dormancy - `consumed`: the mandate has been consumed and cannot be reused + * (note that this only applies to schemes that are per-payment authorised) - `blocked`: the + * mandate has been blocked and payments cannot be created */ public Status getStatus() { return status; diff --git a/src/main/java/com/gocardless/resources/MandateImport.java b/src/main/java/com/gocardless/resources/MandateImport.java index 502b82f8..9a6501c7 100644 --- a/src/main/java/com/gocardless/resources/MandateImport.java +++ b/src/main/java/com/gocardless/resources/MandateImport.java @@ -78,16 +78,13 @@ public Scheme getScheme() { /** * The status of the mandate import. - *
    - *
  • `created`: A new mandate import.
  • - *
  • `submitted`: After the integrator has finished adding mandates and - * submitted the import.
  • - *
  • `cancelled`: If the integrator - * cancelled the mandate import.
  • - *
  • `processing`: Once a mandate import has been approved by a GoCardless team member it will - * be in this state while mandates are imported.
  • - *
  • `processed`: When all mandates have been imported successfully.
  • - *
+ * + * - `created`: A new mandate import. - `submitted`: After the integrator has finished adding + * mandates and [submitted](#mandate-imports-submit-a-mandate-import) the import. - `cancelled`: + * If the integrator [cancelled](#mandate-imports-cancel-a-mandate-import) the mandate import. - + * `processing`: Once a mandate import has been approved by a GoCardless team member it will be + * in this state while mandates are imported. - `processed`: When all mandates have been + * imported successfully. */ public Status getStatus() { return status; diff --git a/src/main/java/com/gocardless/resources/OutboundPayment.java b/src/main/java/com/gocardless/resources/OutboundPayment.java index 0be6d4c9..27c0649e 100644 --- a/src/main/java/com/gocardless/resources/OutboundPayment.java +++ b/src/main/java/com/gocardless/resources/OutboundPayment.java @@ -11,7 +11,7 @@ * GoCardless will notify you via a [webhook](#appendix-webhooks) when the status of the outbound * payment [changes](#event-types-outbound-payment). * - * ####Rate limiting + * #### 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 @@ -123,25 +123,17 @@ public Scheme getScheme() { /** * 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 + * + * - `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.
  • - *
+ * [approved](#outbound-payments-approve-an-outbound-payment) on time. - `failed`: The payment + * was not sent, usually due to an error while or after executing. */ public Status getStatus() { return status; @@ -265,16 +257,13 @@ public String getActualAccountName() { /** * Result of the verification, could be one of - *
    - *
  • `full_match`: The verification has confirmed that the account name exactly - * matches the details provided.
  • - *
  • `partial_match`: The verification has confirmed that the account name is similar - * but does not match to the details provided.
  • - *
  • `no_match`: The verification concludes the provided name does not match the - * account details.
  • - *
  • `unable_to_match`: The verification could not be performed due to recipient bank - * issues or technical issues
  • - *
+ * + * - `full_match`: The verification has confirmed that the account name exactly matches + * the details provided. - `partial_match`: The verification has confirmed that the + * account name is similar but does not match to the details provided. - `no_match`: The + * verification concludes the provided name does not match the account details. - + * `unable_to_match`: The verification could not be performed due to recipient bank + * issues or technical issues */ public Result getResult() { return result; diff --git a/src/main/java/com/gocardless/resources/OutboundPaymentImport.java b/src/main/java/com/gocardless/resources/OutboundPaymentImport.java index c7303747..01f6193f 100644 --- a/src/main/java/com/gocardless/resources/OutboundPaymentImport.java +++ b/src/main/java/com/gocardless/resources/OutboundPaymentImport.java @@ -81,16 +81,12 @@ public Links getLinks() { /** * 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 Status getStatus() { return status; diff --git a/src/main/java/com/gocardless/resources/PayerAuthorisation.java b/src/main/java/com/gocardless/resources/PayerAuthorisation.java index 2f18baf6..daab01f9 100644 --- a/src/main/java/com/gocardless/resources/PayerAuthorisation.java +++ b/src/main/java/com/gocardless/resources/PayerAuthorisation.java @@ -39,11 +39,12 @@ * * *

- * 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` + * 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.
*
* The API is designed to be flexible and allows you to collect information in multiple steps @@ -116,15 +117,12 @@ public Mandate getMandate() { /** * One of: - *

    - *
  • `created`: The PayerAuthorisation has been created, and not been confirmed yet
  • - *
  • `submitted`: The payer information has been submitted
  • - *
  • `confirmed`: PayerAuthorisation is confirmed and resources are ready to be created
  • - *
  • `completed`: The PayerAuthorisation has been completed and customer, bank_account and - * mandate has been created
  • - *
  • `failed`: The PayerAuthorisation has failed and customer, bank_account and mandate is not - * created
  • - *
+ * + * - `created`: The PayerAuthorisation has been created, and not been confirmed yet - + * `submitted`: The payer information has been submitted - `confirmed`: PayerAuthorisation is + * confirmed and resources are ready to be created - `completed`: The PayerAuthorisation has + * been completed and customer, bank_account and mandate has been created - `failed`: The + * PayerAuthorisation has failed and customer, bank_account and mandate is not created */ public Status getStatus() { return status; diff --git a/src/main/java/com/gocardless/resources/Payment.java b/src/main/java/com/gocardless/resources/Payment.java index 1e15be86..1e99ea2d 100644 --- a/src/main/java/com/gocardless/resources/Payment.java +++ b/src/main/java/com/gocardless/resources/Payment.java @@ -172,20 +172,16 @@ public String getScheme() { /** * 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](#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 Status getStatus() { return status; diff --git a/src/main/java/com/gocardless/resources/Payout.java b/src/main/java/com/gocardless/resources/Payout.java index af3b6ea5..2bd039b4 100644 --- a/src/main/java/com/gocardless/resources/Payout.java +++ b/src/main/java/com/gocardless/resources/Payout.java @@ -39,11 +39,9 @@ public Integer getAmount() { /** * Date the payout is due to arrive in the creditor's bank account. One of: - *
    - *
  • `yyyy-mm-dd`: the payout has been paid and is due to arrive in the creditor's bank - * account on this day
  • - *
  • `null`: the payout hasn't been paid yet
  • - *
+ * + * - `yyyy-mm-dd`: the payout has been paid and is due to arrive in the creditor's bank account + * on this day - `null`: the payout hasn't been paid yet * */ public String getArrivalDate() { @@ -119,13 +117,11 @@ public String getReference() { /** * 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 Status getStatus() { return status; diff --git a/src/main/java/com/gocardless/resources/PayoutItem.java b/src/main/java/com/gocardless/resources/PayoutItem.java index 126a3687..51c71ea1 100644 --- a/src/main/java/com/gocardless/resources/PayoutItem.java +++ b/src/main/java/com/gocardless/resources/PayoutItem.java @@ -62,26 +62,22 @@ public List getTaxes() { /** * The type of the credit (positive) or debit (negative) item in the payout (inclusive of VAT if * applicable). One of: - *
    - *
  • `payment_paid_out` (credit)
  • - *
  • `payment_failed` (debit): The payment failed to be processed.
  • - *
  • `payment_charged_back` (debit): The payment has been charged back.
  • - *
  • `payment_refunded` (debit): The payment has been refunded to the customer.
  • - *
  • `refund` (debit): A refund sent to a customer, not linked to a payment.
  • - *
  • `refund_funds_returned` (credit): The refund could not be sent to the customer, and the - * funds have been returned to you.
  • - *
  • `gocardless_fee` (credit/debit): The fees that GoCardless charged for a payment. In the - * case of a payment failure or chargeback, these will appear as credits. Will include taxes if - * applicable for merchants.
  • - *
  • `app_fee` (credit/debit): The optional fees that a partner may have taken for a payment. - * In the case of a payment failure or chargeback, these will appear as credits.
  • - *
  • `revenue_share` (credit/debit): A share of the fees that GoCardless collected which some + * + * - `payment_paid_out` (credit) - `payment_failed` (debit): The payment failed to be processed. + * - `payment_charged_back` (debit): The payment has been charged back. - `payment_refunded` + * (debit): The payment has been refunded to the customer. - `refund` (debit): A refund sent to + * a customer, not linked to a payment. - `refund_funds_returned` (credit): The refund could not + * be sent to the customer, and the funds have been returned to you. - `gocardless_fee` + * (credit/debit): The fees that GoCardless charged for a payment. In the case of a payment + * failure or chargeback, these will appear as credits. Will include taxes if applicable for + * merchants. - `app_fee` (credit/debit): The optional fees that a partner may have taken for a + * payment. In the case of a payment failure or chargeback, these will appear as credits. - + * `revenue_share` (credit/debit): A share of the fees that GoCardless collected which some * partner integrations receive when their users take payments. Only shown in partner payouts. - * In the case of a payment failure or chargeback, these will appear as credits.
  • - *
  • `surcharge_fee` (credit/debit): GoCardless deducted a surcharge fee as the payment failed - * or was charged back, or refunded a surcharge fee as the bank or customer cancelled the - * chargeback. Will include taxes if applicable for merchants.
  • - *
+ * In the case of a payment failure or chargeback, these will appear as credits. - + * `surcharge_fee` (credit/debit): GoCardless deducted a surcharge fee as the payment failed or + * was charged back, or refunded a surcharge fee as the bank or customer cancelled the + * chargeback. Will include taxes if applicable for merchants. * */ public Type getType() { diff --git a/src/main/java/com/gocardless/resources/RedirectFlow.java b/src/main/java/com/gocardless/resources/RedirectFlow.java index b5dea604..371bdcc8 100644 --- a/src/main/java/com/gocardless/resources/RedirectFlow.java +++ b/src/main/java/com/gocardless/resources/RedirectFlow.java @@ -8,8 +8,9 @@ * *

* 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. + * integrators. The Billing + * Request flow API should be used for your payment flows. *

* * Redirect flows enable you to use GoCardless' [hosted payment diff --git a/src/main/java/com/gocardless/resources/Refund.java b/src/main/java/com/gocardless/resources/Refund.java index cc4dd0fc..901739b7 100644 --- a/src/main/java/com/gocardless/resources/Refund.java +++ b/src/main/java/com/gocardless/resources/Refund.java @@ -102,16 +102,12 @@ public String getReference() { /** * One of: - *
    - *
  • `created`: the refund has been created
  • - *
  • `pending_submission`: the refund has been created, but not yet submitted to the - * banks
  • - *
  • `submitted`: the refund has been submitted to the banks
  • - *
  • `paid`: the refund has been included in a [payout](#core-endpoints-payouts)
  • - *
  • `cancelled`: the refund has been cancelled
  • - *
  • `bounced`: the refund has failed to be paid
  • - *
  • `funds_returned`: the refund has had its funds returned
  • - *
+ * + * - `created`: the refund has been created - `pending_submission`: the refund has been created, + * but not yet submitted to the banks - `submitted`: the refund has been submitted to the banks + * - `paid`: the refund has been included in a [payout](#core-endpoints-payouts) - `cancelled`: + * the refund has been cancelled - `bounced`: the refund has failed to be paid - + * `funds_returned`: the refund has had its funds returned */ public Status getStatus() { return status; diff --git a/src/main/java/com/gocardless/resources/ScenarioSimulator.java b/src/main/java/com/gocardless/resources/ScenarioSimulator.java index 23176c2f..4f9cc8fb 100644 --- a/src/main/java/com/gocardless/resources/ScenarioSimulator.java +++ b/src/main/java/com/gocardless/resources/ScenarioSimulator.java @@ -15,109 +15,96 @@ private ScenarioSimulator() { /** * The unique identifier of the simulator, used to initiate simulations. One of: - *
    - *
  • `creditor_verification_status_action_required`: Sets a creditor's `verification status` - * to `action required`, meaning that the creditor must provide further information to - * GoCardless in order to verify their account to receive payouts.
  • - *
  • `creditor_verification_status_in_review`: Sets a creditor's `verification status` to `in + * + * - `creditor_verification_status_action_required`: Sets a creditor's `verification status` to + * `action required`, meaning that the creditor must provide further information to GoCardless + * in order to verify their account to receive payouts. - + * `creditor_verification_status_in_review`: Sets a creditor's `verification status` to `in * review`, meaning that the creditor has provided all of the information requested by - * GoCardless to verify their account, and is now awaiting review.
  • - *
  • `creditor_verification_status_successful`: Sets a creditor's `verification status` to - * `successful`, meaning that the creditor is fully verified and can receive payouts.
  • - *
  • `payment_confirmed`: Transitions a payment through to `confirmed`. It must start in the + * GoCardless to verify their account, and is now awaiting review. - + * `creditor_verification_status_successful`: Sets a creditor's `verification status` to + * `successful`, meaning that the creditor is fully verified and can receive payouts. - + * `payment_confirmed`: Transitions a payment through to `confirmed`. It must start in the * `pending_submission` state, and its mandate must be in the `activated` state (unless it is a * payment for ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may be - * `pending_submission`, since their mandates are submitted with their first payment).
  • - *
  • `payment_paid_out`: Transitions a payment through to `paid_out`, having been collected + * `pending_submission`, since their mandates are submitted with their first payment). - + * `payment_paid_out`: Transitions a payment through to `paid_out`, having been collected * successfully and paid out to you. It must start in the `pending_submission` state, and its * mandate must be in the `activated` state (unless it is a payment for ACH, BECS, BECS_NZ or * SEPA, in which cases the mandate may be `pending_submission`, since their mandates are - * submitted with their first payment).
  • - *
  • `payment_failed`: Transitions a payment through to `failed`. It must start in the - * `pending_submission` state, and its mandate must be in the `activated` state (unless it is a - * payment for ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may be - * `pending_submission`, since their mandates are submitted with their first payment).
  • - *
  • `payment_charged_back`: Behaves the same as the `payout_paid_out` simulator, except that - * the payment is transitioned to `charged_back` after it is paid out, having been charged back - * by the customer.
  • - *
  • `payment_chargeback_settled`: Behaves the same as the `payment_charged_back` simulator, - * except that the charged back payment is additionally included as a debit item in a payout, - * thereby settling the charged back payment.
  • - *
  • `payment_late_failure`: Transitions a payment through to `late_failure`, having been + * submitted with their first payment). - `payment_failed`: Transitions a payment through to + * `failed`. It must start in the `pending_submission` state, and its mandate must be in the + * `activated` state (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which cases the + * mandate may be `pending_submission`, since their mandates are submitted with their first + * payment). - `payment_charged_back`: Behaves the same as the `payout_paid_out` simulator, + * except that the payment is transitioned to `charged_back` after it is paid out, having been + * charged back by the customer. - `payment_chargeback_settled`: Behaves the same as the + * `payment_charged_back` simulator, except that the charged back payment is additionally + * included as a debit item in a payout, thereby settling the charged back payment. - + * `payment_late_failure`: Transitions a payment through to `late_failure`, having been * apparently collected successfully beforehand. It must start in either the * `pending_submission` or `paid_out` state, and its mandate must be in the `activated` state * (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may be * `pending_submission`, since their mandates are submitted with their first payment). Not - * compatible with Autogiro mandates.
  • - *
  • `payment_late_failure_settled`: Behaves the same as the `payment_late_failure` simulator, - * except that the late failure is additionally included as a debit item in a payout, thereby - * settling the late failure.
  • - *
  • `payment_submitted`: Transitions a payment to `submitted`, without proceeding any - * further. It must start in the `pending_submission` state.
  • - *
  • `mandate_activated`: Transitions a mandate through to `activated`, having been submitted - * to the banks and set up successfully. It must start in the `pending_submission` state. Not - * compatible with ACH, BECS, BECS_NZ and SEPA mandates, which are submitted and activated with - * their first payment.
  • - *
  • `mandate_customer_approval_granted`: Transitions a mandate through to - * `pending_submission`, as if the customer approved the mandate creation. It must start in the + * compatible with Autogiro mandates. - `payment_late_failure_settled`: Behaves the same as the + * `payment_late_failure` simulator, except that the late failure is additionally included as a + * debit item in a payout, thereby settling the late failure. - `payment_submitted`: Transitions + * a payment to `submitted`, without proceeding any further. It must start in the + * `pending_submission` state. - `mandate_activated`: Transitions a mandate through to + * `activated`, having been submitted to the banks and set up successfully. It must start in the + * `pending_submission` state. Not compatible with ACH, BECS, BECS_NZ and SEPA mandates, which + * are submitted and activated with their first payment. - `mandate_customer_approval_granted`: + * Transitions a mandate through to `pending_submission`, as if the customer approved the + * mandate creation. It must start in the `pending_customer_approval` state. Compatible only + * with Bacs and SEPA mandates, which support customer signatures on the mandate. All payments + * associated with the mandate will be transitioned to `pending_submission`. All subscriptions + * associated with the mandate will become `active`. - `mandate_customer_approval_skipped`: + * Transitions a mandate through to `pending_submission`, as if the customer skipped the mandate + * approval during the mandate creation process. It must start in the * `pending_customer_approval` state. Compatible only with Bacs and SEPA mandates, which support * customer signatures on the mandate. All payments associated with the mandate will be * transitioned to `pending_submission`. All subscriptions associated with the mandate will - * become `active`.
  • - *
  • `mandate_customer_approval_skipped`: Transitions a mandate through to - * `pending_submission`, as if the customer skipped the mandate approval during the mandate - * creation process. It must start in the `pending_customer_approval` state. Compatible only - * with Bacs and SEPA mandates, which support customer signatures on the mandate. All payments - * associated with the mandate will be transitioned to `pending_submission`. All subscriptions - * associated with the mandate will become `active`.
  • - *
  • `mandate_failed`: Transitions a mandate through to `failed`, having been submitted to the - * banks but found to be invalid (for example due to invalid bank details). It must start in the - * `pending_submission` or `submitted` states. Not compatible with SEPA mandates, which are - * submitted with their first payment.
  • - *
  • `mandate_expired`: Transitions a mandate through to `expired`, having been submitted to - * the banks, set up successfully and then expired because no collection attempts were made - * against it for longer than the scheme's dormancy period (13 months for Bacs, 3 years for - * SEPA, 15 months for ACH, Betalingsservice, and BECS). It must start in the - * `pending_submission` state. Not compatible with Autogiro, BECS NZ, and PAD mandates, which do - * not expire.
  • - *
  • `mandate_transferred`: Transitions a mandate through to `transferred`, having been - * submitted to the banks, set up successfully and then moved to a new bank account due. It must - * start in the `pending_submission` state. Only compatible with Bacs and SEPA mandates.
  • - *
  • `mandate_transferred_with_resubmission`: Transitions a mandate through `transferred` and - * resubmits it to the banks, can be caused be the UK's Current Account Switching Service (CASS) - * or when a customer contacts GoCardless to change their bank details. It must start in the - * `pending_submission` state. Only compatible with Bacs mandates.
  • - *
  • `mandate_suspended_by_payer`: Transitions a mandate to `suspended_by_payer`, as if payer - * has suspended the mandate after it has been setup successfully. It must start in the - * `activated` state. Only compatible with PAY_TO mandates.
  • - *
  • `refund_paid`: Transitions a refund to `paid`. It must start in either the - * `pending_submission` or `submitted` state.
  • - *
  • `refund_settled`: Transitions a refund to `paid`, if it's not already, then generates a - * payout that includes the refund, thereby settling the funds. It must start in one of - * `pending_submission`, `submitted` or `paid` states.
  • - *
  • `refund_bounced`: Transitions a refund to `bounced`. It must start in either the - * `pending_submission`, `submitted`, or `paid` state.
  • - *
  • `refund_returned`: Transitions a refund to `refund_returned`. The refund must start in - * `pending_submission`.
  • - *
  • `payout_bounced`: Transitions a payout to `bounced`. It must start in the `paid` - * state.
  • - *
  • `billing_request_fulfilled`: Authorises the billing request, and then fulfils it. The + * become `active`. - `mandate_failed`: Transitions a mandate through to `failed`, having been + * submitted to the banks but found to be invalid (for example due to invalid bank details). It + * must start in the `pending_submission` or `submitted` states. Not compatible with SEPA + * mandates, which are submitted with their first payment. - `mandate_expired`: Transitions a + * mandate through to `expired`, having been submitted to the banks, set up successfully and + * then expired because no collection attempts were made against it for longer than the scheme's + * dormancy period (13 months for Bacs, 3 years for SEPA, 15 months for ACH, Betalingsservice, + * and BECS). It must start in the `pending_submission` state. Not compatible with Autogiro, + * BECS NZ, and PAD mandates, which do not expire. - `mandate_transferred`: Transitions a + * mandate through to `transferred`, having been submitted to the banks, set up successfully and + * then moved to a new bank account due. It must start in the `pending_submission` state. Only + * compatible with Bacs and SEPA mandates. - `mandate_transferred_with_resubmission`: + * Transitions a mandate through `transferred` and resubmits it to the banks, can be caused be + * the UK's Current Account Switching Service (CASS) or when a customer contacts GoCardless to + * change their bank details. It must start in the `pending_submission` state. Only compatible + * with Bacs mandates. - `mandate_suspended_by_payer`: Transitions a mandate to + * `suspended_by_payer`, as if payer has suspended the mandate after it has been setup + * successfully. It must start in the `activated` state. Only compatible with PAY_TO mandates. - + * `refund_paid`: Transitions a refund to `paid`. It must start in either the + * `pending_submission` or `submitted` state. - `refund_settled`: Transitions a refund to + * `paid`, if it's not already, then generates a payout that includes the refund, thereby + * settling the funds. It must start in one of `pending_submission`, `submitted` or `paid` + * states. - `refund_bounced`: Transitions a refund to `bounced`. It must start in either the + * `pending_submission`, `submitted`, or `paid` state. - `refund_returned`: Transitions a refund + * to `refund_returned`. The refund must start in `pending_submission`. - `payout_bounced`: + * Transitions a payout to `bounced`. It must start in the `paid` state. - + * `billing_request_fulfilled`: Authorises the billing request, and then fulfils it. The billing + * request must be in the `pending` state, with all actions completed except for + * `bank_authorisation`. Only billing requests with a `payment_request` are supported. - + * `billing_request_fulfilled_and_payment_failed`: Authorises the billing request, fulfils it, + * and moves the associated payment to `failed`. The billing request must be in the `pending` + * state, with all actions completed except for `bank_authorisation`. Only billing requests with + * a `payment_request` are supported. - + * `billing_request_fulfilled_and_payment_confirmed_to_failed`: Authorises the billing request, + * fulfils it, moves the associated payment to `confirmed` and then moves it to `failed`. The * billing request must be in the `pending` state, with all actions completed except for - * `bank_authorisation`. Only billing requests with a `payment_request` are supported.
  • - *
  • `billing_request_fulfilled_and_payment_failed`: Authorises the billing request, fulfils - * it, and moves the associated payment to `failed`. The billing request must be in the - * `pending` state, with all actions completed except for `bank_authorisation`. Only billing - * requests with a `payment_request` are supported.
  • - *
  • `billing_request_fulfilled_and_payment_confirmed_to_failed`: Authorises the billing - * request, fulfils it, moves the associated payment to `confirmed` and then moves it to - * `failed`. The billing request must be in the `pending` state, with all actions completed - * except for `bank_authorisation`. Only billing requests with a `payment_request` are - * supported.
  • - *
  • `billing_request_fulfilled_and_payment_paid_out`: Authorises the billing request, fulfils - * it, and moves the associated payment to `paid_out`. The billing request must be in the - * `pending` state, with all actions completed except for `bank_authorisation`. Only billing - * requests with a `payment_request` are supported.
  • - *
+ * `bank_authorisation`. Only billing requests with a `payment_request` are supported. - + * `billing_request_fulfilled_and_payment_paid_out`: Authorises the billing request, fulfils it, + * and moves the associated payment to `paid_out`. The billing request must be in the `pending` + * state, with all actions completed except for `bank_authorisation`. Only billing requests with + * a `payment_request` are supported. */ public String getId() { return id; diff --git a/src/main/java/com/gocardless/resources/Subscription.java b/src/main/java/com/gocardless/resources/Subscription.java index ada34d0d..2d925f91 100644 --- a/src/main/java/com/gocardless/resources/Subscription.java +++ b/src/main/java/com/gocardless/resources/Subscription.java @@ -128,8 +128,8 @@ public String getEarliestChargeDateAfterResume() { * 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. + * Deprecated: This field will be removed in a future API version. Use + * count to specify a number of payments instead. *

*/ public String getEndDate() { @@ -232,16 +232,13 @@ public String getStartDate() { /** * One of: - *
    - *
  • `pending_customer_approval`: the subscription is waiting for customer approval before - * becoming active
  • - *
  • `customer_approval_denied`: the customer did not approve the subscription
  • - *
  • `active`: the subscription is currently active and will continue to create payments
  • - *
  • `finished`: all of the payments scheduled for creation under this subscription have been - * created
  • - *
  • `cancelled`: the subscription has been cancelled and will no longer create payments
  • - *
  • `paused`: the subscription has been paused and will not create payments
  • - *
+ * + * - `pending_customer_approval`: the subscription is waiting for customer approval before + * becoming active - `customer_approval_denied`: the customer did not approve the subscription - + * `active`: the subscription is currently active and will continue to create payments - + * `finished`: all of the payments scheduled for creation under this subscription have been + * created - `cancelled`: the subscription has been cancelled and will no longer create payments + * - `paused`: the subscription has been paused and will not create payments */ public Status getStatus() { return status; diff --git a/src/main/java/com/gocardless/resources/VerificationDetail.java b/src/main/java/com/gocardless/resources/VerificationDetail.java index ff077ed9..192f7ffd 100644 --- a/src/main/java/com/gocardless/resources/VerificationDetail.java +++ b/src/main/java/com/gocardless/resources/VerificationDetail.java @@ -9,8 +9,9 @@ * *

* 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. + * their merchant's verification details and pass them to GoCardless via our API. Please + * get in touch if you wish to enable this feature on your + * account. *

*/ public class VerificationDetail { diff --git a/src/main/java/com/gocardless/services/BillingRequestService.java b/src/main/java/com/gocardless/services/BillingRequestService.java index ade9535a..60424de8 100644 --- a/src/main/java/com/gocardless/services/BillingRequestService.java +++ b/src/main/java/com/gocardless/services/BillingRequestService.java @@ -33,8 +33,8 @@ public BillingRequestService(HttpClient httpClient) { } /** - * Important: All properties associated with `subscription_request` and - * `instalment_schedule_request` are only supported for ACH and PAD schemes. + * 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); @@ -161,8 +161,8 @@ public BillingRequestSelectInstitutionRequest selectInstitution(String identity) /** * Request class for {@link BillingRequestService#create }. * - * Important: All properties associated with `subscription_request` and - * `instalment_schedule_request` are only supported for ACH and PAD schemes. + * 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 { diff --git a/src/main/java/com/gocardless/services/OutboundPaymentService.java b/src/main/java/com/gocardless/services/OutboundPaymentService.java index 636e2627..971740e8 100644 --- a/src/main/java/com/gocardless/services/OutboundPaymentService.java +++ b/src/main/java/com/gocardless/services/OutboundPaymentService.java @@ -20,7 +20,7 @@ * outbound payment changes * (https://developer.gocardless.com/api-reference/#event-types-outbound-payment). * - * ####Rate limiting + * Rate limiting * * Two rate limits apply to the Outbound Payments APIs: * diff --git a/src/main/java/com/gocardless/services/PayerAuthorisationService.java b/src/main/java/com/gocardless/services/PayerAuthorisationService.java index 1b6d724b..f643d8c5 100644 --- a/src/main/java/com/gocardless/services/PayerAuthorisationService.java +++ b/src/main/java/com/gocardless/services/PayerAuthorisationService.java @@ -39,12 +39,11 @@ * 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. + * 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. * * * The API is designed to be flexible and allows you to collect information in multiple steps diff --git a/src/main/java/com/gocardless/services/RedirectFlowService.java b/src/main/java/com/gocardless/services/RedirectFlowService.java index 1127109f..2bca6e20 100644 --- a/src/main/java/com/gocardless/services/RedirectFlowService.java +++ b/src/main/java/com/gocardless/services/RedirectFlowService.java @@ -11,8 +11,8 @@ * 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 (https://developer.gocardless.com/api-reference/#billing-requests) API should be - * used for your payment flows. + * Request flow (https://developer.gocardless.com/api-reference/#billing-requests-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 diff --git a/src/main/java/com/gocardless/services/RefundService.java b/src/main/java/com/gocardless/services/RefundService.java index 481d6983..590eadf6 100644 --- a/src/main/java/com/gocardless/services/RefundService.java +++ b/src/main/java/com/gocardless/services/RefundService.java @@ -214,7 +214,7 @@ public RefundCreateRequest withReference(String reference) { * * Must be supplied if `links[payment]` is present. * - * It is possible to opt out of requiring `total_amount_confirmation`, please contact our + * 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) { diff --git a/src/main/java/com/gocardless/services/SubscriptionService.java b/src/main/java/com/gocardless/services/SubscriptionService.java index ddccf798..73019bab 100644 --- a/src/main/java/com/gocardless/services/SubscriptionService.java +++ b/src/main/java/com/gocardless/services/SubscriptionService.java @@ -243,7 +243,7 @@ public SubscriptionCreateRequest withDayOfMonth(Integer dayOfMonth) { * 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 + * 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) { From 9d332dce204559ba4573b3d687b31e58e000a38c Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 13:23:34 +0000 Subject: [PATCH 11/20] Changes generated by 97d868232e0278008fe5b02332eb9172ceb6925d This commit was automatically created from gocardless/client-library-templates@97d868232e0278008fe5b02332eb9172ceb6925d by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/30010768915 --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0922d266..797be2e9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip From 27a3ce0d78821c1096474b1a2d0bac62a59a95a6 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 16:29:43 +0000 Subject: [PATCH 12/20] Changes generated by 8135232c4da750ff9085356e02b9f68b859f4669 This commit was automatically created from gocardless/client-library-templates@8135232c4da750ff9085356e02b9f68b859f4669 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/30025099089 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 0719c7f5..d401b644 100644 --- a/build.gradle +++ b/build.gradle @@ -54,7 +54,7 @@ dependencies { implementation("com.squareup.okhttp3:okhttp:4.9.1") implementation 'com.google.code.gson:gson:2.8.7' implementation("com.google.guava:guava:30.1.1-jre") - implementation 'org.slf4j:slf4j-api:1.7.32' + implementation 'org.slf4j:slf4j-api:1.7.36' implementation 'commons-codec:commons-codec:1.15' implementation('com.github.rholder:guava-retrying:2.0.0') { From be5be61e3387ea2b0af4db4010d69ce8ee85090c Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 16:47:00 +0000 Subject: [PATCH 13/20] Changes generated by 5bbf60ea938fcf0ded3969cfb501aa08d4cc160d This commit was automatically created from gocardless/client-library-templates@5bbf60ea938fcf0ded3969cfb501aa08d4cc160d by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/30026364720 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d401b644..5d589a5e 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ buildscript { } dependencies { - classpath 'ch.raffael.pegdown-doclet:pegdown-doclet:1.2.1' + classpath 'ch.raffael.pegdown-doclet:pegdown-doclet:1.3' // Only add Spotless if running on Java 11+ // TODO: Remove this when we drop support for Java 8 if (JavaVersion.current() >= JavaVersion.VERSION_11) { From 7e98f7719f5fd60b81ac5331fc9bf78d1f46fa60 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 16:47:42 +0000 Subject: [PATCH 14/20] Changes generated by 95ff30a83616462c5d53d894dcddf48b8d34380d This commit was automatically created from gocardless/client-library-templates@95ff30a83616462c5d53d894dcddf48b8d34380d by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/30026412545 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5d589a5e..ca84681f 100644 --- a/build.gradle +++ b/build.gradle @@ -62,7 +62,7 @@ dependencies { } testImplementation 'junit:junit:4.13.2' - testImplementation 'org.assertj:assertj-core:3.19.0' + testImplementation 'org.assertj:assertj-core:3.27.7' testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.1' } From bc8d07de2bf13d5262d69c71cf54a95ea24fc56d Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 16:57:48 +0000 Subject: [PATCH 15/20] Changes generated by 7b2029b95ebd1f522fd4d8f1212955650e4c777c This commit was automatically created from gocardless/client-library-templates@7b2029b95ebd1f522fd4d8f1212955650e4c777c by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/30027097637 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index ca84681f..3bc82899 100644 --- a/build.gradle +++ b/build.gradle @@ -54,7 +54,7 @@ dependencies { implementation("com.squareup.okhttp3:okhttp:4.9.1") implementation 'com.google.code.gson:gson:2.8.7' implementation("com.google.guava:guava:30.1.1-jre") - implementation 'org.slf4j:slf4j-api:1.7.36' + implementation 'org.slf4j:slf4j-api:2.0.18' implementation 'commons-codec:commons-codec:1.15' implementation('com.github.rholder:guava-retrying:2.0.0') { From b50490ff3f5ba598d798d70b7bf8a7aef6e1e999 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 17:10:06 +0000 Subject: [PATCH 16/20] Changes generated by 908307435edb2012708dbedfc8492dd986bd5513 This commit was automatically created from gocardless/client-library-templates@908307435edb2012708dbedfc8492dd986bd5513 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/30028019727 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 3bc82899..0f3b5930 100644 --- a/build.gradle +++ b/build.gradle @@ -52,7 +52,7 @@ repositories { dependencies { implementation("com.squareup.okhttp3:okhttp:4.9.1") - implementation 'com.google.code.gson:gson:2.8.7' + implementation 'com.google.code.gson:gson:2.14.0' implementation("com.google.guava:guava:30.1.1-jre") implementation 'org.slf4j:slf4j-api:2.0.18' implementation 'commons-codec:commons-codec:1.15' From 830e84d478b8245b75fa08f6b2a6b4db05e0428b Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 17:32:02 +0000 Subject: [PATCH 17/20] Changes generated by 0ef49278188d2ae7b6c02c37901d30f8183a6c90 This commit was automatically created from gocardless/client-library-templates@0ef49278188d2ae7b6c02c37901d30f8183a6c90 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/30029565586 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 0f3b5930..6ab481fe 100644 --- a/build.gradle +++ b/build.gradle @@ -53,7 +53,7 @@ repositories { dependencies { implementation("com.squareup.okhttp3:okhttp:4.9.1") implementation 'com.google.code.gson:gson:2.14.0' - implementation("com.google.guava:guava:30.1.1-jre") + implementation("com.google.guava:guava:33.6.0-jre") implementation 'org.slf4j:slf4j-api:2.0.18' implementation 'commons-codec:commons-codec:1.15' From 6bbccc4e7a31c0de7805271e62cfac2b3cd839cc Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 17:38:20 +0000 Subject: [PATCH 18/20] Changes generated by 016f226b4970ca25526acb7ecd1647cfc7f83a16 This commit was automatically created from gocardless/client-library-templates@016f226b4970ca25526acb7ecd1647cfc7f83a16 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/30030030237 --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 6ab481fe..9c6c8b85 100644 --- a/build.gradle +++ b/build.gradle @@ -51,7 +51,7 @@ repositories { } dependencies { - implementation("com.squareup.okhttp3:okhttp:4.9.1") + implementation("com.squareup.okhttp3:okhttp:5.4.0") implementation 'com.google.code.gson:gson:2.14.0' implementation("com.google.guava:guava:33.6.0-jre") implementation 'org.slf4j:slf4j-api:2.0.18' @@ -63,7 +63,7 @@ dependencies { testImplementation 'junit:junit:4.13.2' testImplementation 'org.assertj:assertj-core:3.27.7' - testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.1' + testImplementation 'com.squareup.okhttp3:mockwebserver:5.4.0' } javadoc { From fc7ef4d868b15d6547dbb9f44f816ae627d82a35 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 17:40:23 +0000 Subject: [PATCH 19/20] Changes generated by 65c970e1b3ca8cccc729e1f8486a1ae398fff3e5 This commit was automatically created from gocardless/client-library-templates@65c970e1b3ca8cccc729e1f8486a1ae398fff3e5 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/30030180547 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 9c6c8b85..367677b2 100644 --- a/build.gradle +++ b/build.gradle @@ -55,7 +55,7 @@ dependencies { implementation 'com.google.code.gson:gson:2.14.0' implementation("com.google.guava:guava:33.6.0-jre") implementation 'org.slf4j:slf4j-api:2.0.18' - implementation 'commons-codec:commons-codec:1.15' + implementation 'commons-codec:commons-codec:1.22.0' implementation('com.github.rholder:guava-retrying:2.0.0') { exclude group: 'com.google.guava', module: 'guava' From df85f29c34f28186f47cc3caac63678456e55dae Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 13:05:02 +0000 Subject: [PATCH 20/20] Changes generated by 42cfede7892a0fe815fa1a19b1a5cdd8eac41f49 This commit was automatically created from gocardless/client-library-templates@42cfede7892a0fe815fa1a19b1a5cdd8eac41f49 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/30095251565 --- .../com/gocardless/resources/Balance.java | 33 +- .../resources/BankAccountDetail.java | 10 +- .../BankAccountHolderVerification.java | 28 +- .../resources/BankAuthorisation.java | 56 +- .../resources/BankDetailsLookup.java | 6 +- .../gocardless/resources/BillingRequest.java | 488 +++---- .../resources/BillingRequestFlow.java | 25 +- .../resources/BillingRequestTemplate.java | 85 +- .../resources/BillingRequestWithAction.java | 570 ++++---- .../java/com/gocardless/resources/Block.java | 15 +- .../com/gocardless/resources/Creditor.java | 142 +- .../resources/CreditorBankAccount.java | 45 +- .../com/gocardless/resources/Customer.java | 49 +- .../resources/CustomerBankAccount.java | 65 +- .../resources/CustomerNotification.java | 24 +- .../java/com/gocardless/resources/Event.java | 210 +-- .../java/com/gocardless/resources/Export.java | 4 +- .../resources/InstalmentSchedule.java | 46 +- .../com/gocardless/resources/Institution.java | 13 +- .../java/com/gocardless/resources/Logo.java | 5 +- .../com/gocardless/resources/Mandate.java | 84 +- .../gocardless/resources/MandateImport.java | 60 +- .../resources/MandateImportEntry.java | 34 +- .../com/gocardless/resources/MandatePdf.java | 12 +- .../resources/NegativeBalanceLimit.java | 13 +- .../gocardless/resources/OutboundPayment.java | 100 +- .../resources/OutboundPaymentImport.java | 35 +- .../resources/OutboundPaymentImportEntry.java | 8 +- .../resources/PayerAuthorisation.java | 162 ++- .../com/gocardless/resources/Payment.java | 215 ++- .../gocardless/resources/PaymentAccount.java | 18 +- .../resources/PaymentAccountTransaction.java | 13 +- .../java/com/gocardless/resources/Payout.java | 98 +- .../com/gocardless/resources/PayoutItem.java | 72 +- .../gocardless/resources/RedirectFlow.java | 113 +- .../java/com/gocardless/resources/Refund.java | 147 ++- .../resources/ScenarioSimulator.java | 209 +-- .../resources/SchemeIdentifier.java | 19 +- .../gocardless/resources/Subscription.java | 150 ++- .../com/gocardless/resources/TaxRate.java | 4 +- .../resources/TransferredMandate.java | 8 +- .../resources/VerificationDetail.java | 8 +- .../com/gocardless/resources/Webhook.java | 4 +- .../gocardless/services/BalanceService.java | 18 +- .../services/BankAccountDetailService.java | 12 +- .../BankAccountHolderVerificationService.java | 5 +- .../services/BankAuthorisationService.java | 45 +- .../services/BankDetailsLookupService.java | 83 +- .../services/BillingRequestFlowService.java | 46 +- .../services/BillingRequestService.java | 785 ++++++----- .../BillingRequestTemplateService.java | 187 +-- .../BillingRequestWithActionService.java | 410 +++--- .../com/gocardless/services/BlockService.java | 40 +- .../services/CreditorBankAccountService.java | 108 +- .../gocardless/services/CreditorService.java | 140 +- .../services/CurrencyExchangeRateService.java | 12 +- .../services/CustomerBankAccountService.java | 150 ++- .../services/CustomerNotificationService.java | 16 +- .../gocardless/services/CustomerService.java | 126 +- .../com/gocardless/services/EventService.java | 160 ++- .../services/InstalmentScheduleService.java | 328 +++-- .../services/InstitutionService.java | 35 +- .../com/gocardless/services/LogoService.java | 14 +- .../services/MandateImportEntryService.java | 287 ++-- .../services/MandateImportService.java | 63 +- .../services/MandatePdfService.java | 149 +-- .../gocardless/services/MandateService.java | 136 +- .../services/NegativeBalanceLimitService.java | 16 +- .../OutboundPaymentImportEntryService.java | 12 +- .../OutboundPaymentImportService.java | 51 +- .../services/OutboundPaymentService.java | 111 +- .../services/PayerAuthorisationService.java | 483 +++---- .../services/PaymentAccountService.java | 17 +- .../PaymentAccountTransactionService.java | 5 +- .../gocardless/services/PaymentService.java | 260 ++-- .../services/PayoutItemService.java | 22 +- .../gocardless/services/PayoutService.java | 57 +- .../services/RedirectFlowService.java | 169 +-- .../gocardless/services/RefundService.java | 166 ++- .../services/ScenarioSimulatorService.java | 8 +- .../services/SchemeIdentifierService.java | 1149 ++++++++++++----- .../services/SubscriptionService.java | 396 +++--- .../gocardless/services/TaxRateService.java | 17 +- .../services/VerificationDetailService.java | 22 +- .../gocardless/services/WebhookService.java | 12 +- 85 files changed, 5874 insertions(+), 3959 deletions(-) diff --git a/src/main/java/com/gocardless/resources/Balance.java b/src/main/java/com/gocardless/resources/Balance.java index 197f3be0..23410189 100644 --- a/src/main/java/com/gocardless/resources/Balance.java +++ b/src/main/java/com/gocardless/resources/Balance.java @@ -33,31 +33,35 @@ public Integer getAmount() { /** * Type of the balance. Could be one of * - * - `pending_payments_submitted`: Payments we have submitted to the scheme but not yet - * confirmed. This does not exactly correspond to Pending payments in the dashboard, - * because this balance does not include payments that are pending submission. - - * `confirmed_funds`: Payments that have been confirmed minus fees and unclaimed debits for - * refunds, failures and chargebacks. These funds have not yet been moved into a payout. - - * `pending_payouts`: Confirmed payments that have been moved into a payout. This is the total - * due to be paid into your bank account in the next payout run (payouts happen once every - * business day). `pending_payouts` will only be non-zero while we are generating and submitting - * the payouts to our partner bank. + *
    + *
  • pending_payments_submitted: Payments we have submitted to the scheme but not + * yet confirmed. This does not exactly correspond to Pending payments in the dashboard, + * because this balance does not include payments that are pending submission.
  • + *
  • confirmed_funds: Payments that have been confirmed minus fees and unclaimed + * debits for refunds, failures and chargebacks. These funds have not yet been moved into a + * payout.
  • + *
  • pending_payouts: Confirmed payments that have been moved into a payout. This + * is the total due to be paid into your bank account in the next payout run (payouts happen + * once every business day). pending_payouts will only be non-zero while we are + * generating and submitting the payouts to our partner bank.
  • + *
*/ public BalanceType getBalanceType() { return balanceType; } /** - * [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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public Currency getCurrency() { return currency; } /** - * Dynamic [timestamp](#api-usage-dates-and-times) recording when this resource was last - * updated. + * Dynamic timestamp + * recording when this resource was last updated. */ public String getLastUpdatedAt() { return lastUpdatedAt; @@ -101,7 +105,8 @@ private Links() { private String creditor; /** - * ID of the associated [creditor](#core-endpoints-creditors). + * ID of the associated creditor. */ public String getCreditor() { return creditor; diff --git a/src/main/java/com/gocardless/resources/BankAccountDetail.java b/src/main/java/com/gocardless/resources/BankAccountDetail.java index c4ecd16c..c5e76b68 100644 --- a/src/main/java/com/gocardless/resources/BankAccountDetail.java +++ b/src/main/java/com/gocardless/resources/BankAccountDetail.java @@ -44,9 +44,13 @@ public String getIv() { /** * Base64 URL encoded JWE header values, containing the following keys: * - * - `alg`: the asymmetric encryption type used to encrypt symmetric key, e.g: `RSA-OAEP`. - - * `enc`: the content encryption type, e.g: `A256GCM`. - `kid`: the ID of an RSA-2048 public - * key, from your JWKS, used to encrypt the AES key. + *
    + *
  • alg: the asymmetric encryption type used to encrypt symmetric key, e.g: + * RSA-OAEP.
  • + *
  • enc: the content encryption type, e.g: A256GCM.
  • + *
  • kid: the ID of an RSA-2048 public key, from your JWKS, used to encrypt the + * AES key.
  • + *
*/ public String getProtectedValue() { return protectedValue; diff --git a/src/main/java/com/gocardless/resources/BankAccountHolderVerification.java b/src/main/java/com/gocardless/resources/BankAccountHolderVerification.java index 348142fd..b91a627d 100644 --- a/src/main/java/com/gocardless/resources/BankAccountHolderVerification.java +++ b/src/main/java/com/gocardless/resources/BankAccountHolderVerification.java @@ -36,11 +36,16 @@ public String getId() { /** * Result of the verification, could be one of * - * - `full_match`: The verification has confirmed that the account name exactly matches the - * details provided. - `partial_match`: The verification has confirmed that the account name is - * similar but does not match to the details provided. - `no_match`: The verification concludes - * the provided name does not match the account details. - `unable_to_match`: The verification - * could not be performed due to recipient bank issues or technical issues + *
    + *
  • full_match: The verification has confirmed that the account name exactly + * matches the details provided.
  • + *
  • partial_match: The verification has confirmed that the account name is + * similar but does not match to the details provided.
  • + *
  • no_match: The verification concludes the provided name does not match the + * account details.
  • + *
  • unable_to_match: The verification could not be performed due to recipient + * bank issues or technical issues
  • + *
*/ public Result getResult() { return result; @@ -49,17 +54,20 @@ public Result getResult() { /** * The status of the bank account holder verification. * - * - `pending`: We have triggered the verification, but the result has not come back yet. - - * `completed`: The verification is complete and is ready to be used. - * + *
    + *
  • pending: We have triggered the verification, but the result has not come + * back yet.
  • + *
  • completed: The verification is complete and is ready to be used.
  • + *
*/ public Status getStatus() { return status; } /** - * Type of the verification that has been performed eg. [Confirmation of - * Payee](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) + * Type of the verification that has been performed eg. Confirmation of + * Payee */ public Type getType() { return type; diff --git a/src/main/java/com/gocardless/resources/BankAuthorisation.java b/src/main/java/com/gocardless/resources/BankAuthorisation.java index 3a0a2c86..3e43e128 100644 --- a/src/main/java/com/gocardless/resources/BankAuthorisation.java +++ b/src/main/java/com/gocardless/resources/BankAuthorisation.java @@ -35,7 +35,9 @@ public AuthorisationType getAuthorisationType() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when the user has been authorised. + * Fixed timestamp, + * recording when the user has been authorised. */ public String getAuthorisedAt() { return authorisedAt; @@ -64,8 +66,9 @@ public String getId() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when the authorisation URL has been - * visited. + * Fixed timestamp, + * recording when the authorisation URL has been visited. */ public String getLastVisitedAt() { return lastVisitedAt; @@ -77,8 +80,8 @@ public Links getLinks() { /** * URL to a QR code PNG image of the bank authorisation url. This QR code can be used as an - * alternative to providing the `url` to the payer to allow them to authorise with their mobile - * devices. + * alternative to providing the url to the payer to allow them to authorise with + * their mobile devices. */ public String getQrCodeUrl() { return qrCodeUrl; @@ -87,24 +90,27 @@ public String getQrCodeUrl() { /** * URL that the payer can be redirected to after authorising the payment. * - * On completion of bank authorisation, the query parameter of either `outcome=success` or - * `outcome=failure` will be appended to the `redirect_uri` to indicate the result of the bank - * authorisation. If the bank authorisation is expired, the query parameter `outcome=timeout` - * will be appended to the `redirect_uri`, in which case you should prompt the user to try the - * bank authorisation step again. + * On completion of bank authorisation, the query parameter of either + * outcome=success or outcome=failure will be appended to the + * redirect_uri to indicate the result of the bank authorisation. If the bank + * authorisation is expired, the query parameter outcome=timeout will be appended + * to the redirect_uri, in which case you should prompt the user to try the bank + * authorisation step again. * - * 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. + * 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, + * BANK_AUTHORISATION_DENIED, + * or BANK_AUTHORISATION_FAILED + * 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`. + * The BillingRequestFlow ID will also be appended to the redirect_uri as query + * parameter id=BRF123. * - * Defaults to `https://pay.gocardless.com/billing/static/thankyou`. + * Defaults to https://pay.gocardless.com/billing/static/thankyou. */ public String getRedirectUri() { return redirectUri; @@ -138,16 +144,18 @@ private Links() { private String institution; /** - * ID of the [billing request](#billing-requests-billing-requests) against which this - * authorisation was created. + * ID of the billing + * request against which this authorisation was created. */ public String getBillingRequest() { return billingRequest; } /** - * ID of the [institution](#billing-requests-institutions) against which this authorisation - * was created. + * ID of the institution + * against which this authorisation was created. */ public String getInstitution() { return institution; diff --git a/src/main/java/com/gocardless/resources/BankDetailsLookup.java b/src/main/java/com/gocardless/resources/BankDetailsLookup.java index 5b3236a7..b58763cd 100644 --- a/src/main/java/com/gocardless/resources/BankDetailsLookup.java +++ b/src/main/java/com/gocardless/resources/BankDetailsLookup.java @@ -18,8 +18,10 @@ private BankDetailsLookup() { private String bic; /** - * Array of [schemes](#mandates_scheme) supported for this bank account. This will be an empty - * array if the bank account is not reachable by any schemes. + * Array of + * schemes + * supported for this bank account. This will be an empty array if the bank account is not + * reachable by any schemes. */ public List getAvailableDebitSchemes() { return availableDebitSchemes; diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index 4a66c78a..51a076ad 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -11,12 +11,11 @@ * 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 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. + * Important: All properties associated with subscription_request and + * instalment_schedule_request are only supported for ACH and PAD schemes. *

*/ public class BillingRequest { @@ -49,7 +48,9 @@ public List getActions() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -59,9 +60,9 @@ public String getCreatedAt() { * (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 for more information. */ public Boolean getFallbackEnabled() { return fallbackEnabled; @@ -82,8 +83,9 @@ public String getId() { } /** - * Request for an instalment schedule. Has to contain either `instalments_with_schedule` object - * or an array of `instalments_with_dates` objects + * Request for an instalment schedule. Has to contain either + * instalments_with_schedule object or an array of + * instalments_with_dates objects */ public InstalmentScheduleRequest getInstalmentScheduleRequest() { return instalmentScheduleRequest; @@ -121,9 +123,8 @@ public PaymentContextCode getPaymentContextCode() { /** * 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. + * See VRP + * Commercial Payment Purpose Codes for the complete list of valid codes. */ public String getPaymentPurposeCode() { return paymentPurposeCode; @@ -139,9 +140,9 @@ public PaymentRequest getPaymentRequest() { /** * 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 for the complete list of valid codes. */ public PurposeCode getPurposeCode() { return purposeCode; @@ -154,10 +155,13 @@ public Resources getResources() { /** * 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 Status getStatus() { return status; @@ -301,12 +305,18 @@ public List getCompletesActions() { /** * Describes whether we inferred the institution from the provided bank account details. One - * of: - `not_needed`: we won't attempt to infer the institution as it is not needed. Either - * because it was manually selected or the billing request does not support this feature - - * `pending`: we are waiting on the bank details in order to infer the institution - - * `failed`: we weren't able to infer the institution - `success`: we inferred the - * institution and added it to the resources of a Billing Request + * of: * + *
    + *
  • not_needed: we won't attempt to infer the institution as it is not + * needed. Either because it was manually selected or the billing request does not support + * this feature
  • + *
  • pending: we are waiting on the bank details in order to infer the + * institution
  • + *
  • failed: we weren't able to infer the institution
  • + *
  • success: we inferred the institution and added it to the resources of a + * Billing Request
  • + *
*/ public InstitutionGuessStatus getInstitutionGuessStatus() { return institutionGuessStatus; @@ -464,8 +474,9 @@ public List getCustomerBillingDetail() { /** * Represents a instalment schedule request resource returned from the API. * - * Request for an instalment schedule. Has to contain either `instalments_with_schedule` object - * or an array of `instalments_with_dates` objects + * Request for an instalment schedule. Has to contain either + * instalments_with_schedule object or an array of + * instalments_with_dates objects */ public static class InstalmentScheduleRequest { private InstalmentScheduleRequest() { @@ -493,16 +504,18 @@ public Integer getAppFee() { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently - * "USD" and "CAD" are supported. + * ISO 4217 currency code. + * Currently "USD" and "CAD" are supported. */ public String getCurrency() { return 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) + * An explicit array of instalment payments, each specifying at least an amount + * and charge_date. See create + * (with dates) */ public List getInstalmentsWithDates() { return instalmentsWithDates; @@ -510,9 +523,9 @@ public List getInstalmentsWithDates() { /** * 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) */ public InstalmentsWithSchedule getInstalmentsWithSchedule() { return instalmentsWithSchedule; @@ -540,19 +553,22 @@ public String getName() { /** * 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 for more details.
+ *
*/ public String getPaymentReference() { return paymentReference; } /** - * On failure, automatically retry payments using [intelligent - * retries](/success-plus/overview). Default is `false`. + * On failure, automatically retry payments using + * intelligent retries. + * Default is false. *

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

*/ public Boolean getRetryIfPossible() { @@ -588,11 +604,12 @@ private InstalmentsWithDate() { * 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) + * Transaction + * limits * * For Variable Recurring Payments (VRP), this must not exceed the mandate's - * `max_amount_per_payment` constraint. + * max_amount_per_payment constraint. */ public Integer getAmount() { return amount; @@ -600,8 +617,9 @@ public Integer getAmount() { /** * 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 - * automatically rolled forwards to that date. + * next_possible_charge_date on the mandate, + * it will be automatically rolled forwards to that date. */ public String getChargeDate() { return chargeDate; @@ -610,8 +628,9 @@ public String getChargeDate() { /** * 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). */ public String getDescription() { return description; @@ -622,9 +641,9 @@ public String getDescription() { * Represents a instalments with schedule resource returned from the API. * * 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) */ public static class InstalmentsWithSchedule { private InstalmentsWithSchedule() { @@ -639,24 +658,22 @@ private InstalmentsWithSchedule() { /** * List of amounts of each instalment, in the lowest denomination for the currency (e.g. * cents in USD). - * */ public List getAmounts() { return amounts; } /** - * Number of `interval_units` between charge dates. Must be greater than or equal to - * `1`. - * + * Number of interval_units between charge dates. Must be greater than or + * equal to 1. */ public Integer getInterval() { return interval; } /** - * The unit of time between customer charge dates. One of `weekly`, `monthly` or - * `yearly`. + * The unit of time between customer charge dates. One of weekly, + * monthly or yearly. */ public IntervalUnit getIntervalUnit() { return intervalUnit; @@ -664,10 +681,12 @@ public IntervalUnit getIntervalUnit() { /** * 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'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 String getStartDate() { return startDate; @@ -695,9 +714,9 @@ private Links() { private String instalmentSchedule; /** - * (Optional) ID of the [instalment_schedule](#core-endpoints-instalment-schedules) that - * was created from this instalment schedule request. - * + * (Optional) ID of the instalment_schedule + * that was created from this instalment schedule request. */ public String getInstalmentSchedule() { return instalmentSchedule; @@ -732,30 +751,35 @@ private Links() { private String subscriptionRequestSubscription; /** - * (Optional) ID of the [bank authorisation](#billing-requests-bank-authorisations) that was - * used to verify this request. + * (Optional) ID of the bank + * authorisation that was used to verify this request. */ public String getBankAuthorisation() { return bankAuthorisation; } /** - * ID of the associated [creditor](#core-endpoints-creditors). + * ID of the associated creditor. */ public String getCreditor() { return creditor; } /** - * ID of the [customer](#core-endpoints-customers) that will be used for this request + * ID of the customer + * that will be used for this request */ public String getCustomer() { return customer; } /** - * (Optional) ID of the [customer_bank_account](#core-endpoints-customer-bank-accounts) that - * will be used for this request + * (Optional) ID of the customer_bank_account + * that will be used for this request */ public String getCustomerBankAccount() { return customerBankAccount; @@ -776,8 +800,9 @@ public String getInstalmentScheduleRequest() { } /** - * (Optional) ID of the [instalment_schedule](#core-endpoints-instalment-schedules) that was - * created from this instalment schedule request. + * (Optional) ID of the instalment_schedule + * that was created from this instalment schedule request. */ public String getInstalmentScheduleRequestInstalmentSchedule() { return instalmentScheduleRequestInstalmentSchedule; @@ -791,8 +816,9 @@ public String getMandateRequest() { } /** - * (Optional) ID of the [mandate](#core-endpoints-mandates) that was created from this - * mandate request. this mandate request. + * (Optional) ID of the mandate + * that was created from this mandate request. this mandate request. */ public String getMandateRequestMandate() { return mandateRequestMandate; @@ -820,8 +846,9 @@ public String getPaymentRequest() { } /** - * (Optional) ID of the [payment](#core-endpoints-payments) that was created from this - * payment request. + * (Optional) ID of the payment + * that was created from this payment request. */ public String getPaymentRequestPayment() { return paymentRequestPayment; @@ -835,8 +862,9 @@ public String getSubscriptionRequest() { } /** - * (Optional) ID of the [subscription](#core-endpoints-subscriptions) that was created from - * this subscription request. + * (Optional) ID of the subscription + * that was created from this subscription request. */ public String getSubscriptionRequestSubscription() { return subscriptionRequestSubscription; @@ -867,14 +895,13 @@ private 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. * * 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 AuthorisationSource getAuthorisationSource() { return authorisationSource; @@ -882,9 +909,9 @@ public AuthorisationSource getAuthorisationSource() { /** * 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. - * + * 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. */ public String getConsentType() { return consentType; @@ -899,7 +926,7 @@ public Constraints getConstraints() { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 currency code. */ public String getCurrency() { return currency; @@ -908,7 +935,6 @@ public String getCurrency() { /** * A human-readable description of the payment and/or mandate. This will be displayed to the * payer when authorising the billing request. - * */ public String getDescription() { return description; @@ -917,10 +943,12 @@ public String getDescription() { /** * This field will decide how GoCardless handles settlement of funds from the customer. * - * - `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. - * + *
    + *
  • 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 FundsSettlement getFundsSettlement() { return fundsSettlement; @@ -971,23 +999,28 @@ public Boolean getSweeping() { /** * 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`. + *
    + *
  • 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. + * 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. + * See Billing + * Requests: Creating Verified Mandates for more information. */ public Verify getVerify() { return verify; @@ -1041,7 +1074,6 @@ private 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 String getEndDate() { return endDate; @@ -1049,8 +1081,8 @@ public String getEndDate() { /** * 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. + * denomination for the currency (e.g. pence in GBP, cents in EUR). Note: + * Required for PayTo and VRP. */ public Integer getMaxAmountPerPayment() { return maxAmountPerPayment; @@ -1059,8 +1091,7 @@ public Integer getMaxAmountPerPayment() { /** * 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 String getPaymentMethod() { return paymentMethod; @@ -1069,11 +1100,10 @@ public String getPaymentMethod() { /** * 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. + * 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; @@ -1084,7 +1114,6 @@ public List getPeriodicLimits() { * * This is an optional field and if it is not supplied the start date will be set to the * day authorisation happens. - * */ public String getStartDate() { return startDate; @@ -1106,22 +1135,29 @@ private PeriodicLimit() { private Period 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). + * The alignment of the period. Defaults to creation_date if not + * specified. * - * `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. + * 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). * - * _Note:_ Has no effect when period is `flexible`. + * 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 Alignment getAlignment() { return alignment; @@ -1130,8 +1166,7 @@ public Alignment getAlignment() { /** * 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 Integer getMaxPayments() { return maxPayments; @@ -1142,8 +1177,7 @@ public Integer getMaxPayments() { * 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 Integer getMaxTotalAmount() { return maxTotalAmount; @@ -1153,7 +1187,6 @@ public Integer getMaxTotalAmount() { * 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; @@ -1191,9 +1224,9 @@ private Links() { private String mandate; /** - * (Optional) ID of the [mandate](#core-endpoints-mandates) that was created from this - * mandate request. this mandate request. - * + * (Optional) ID of the mandate + * that was created from this mandate request. this mandate request. */ public String getMandate() { return mandate; @@ -1238,9 +1271,9 @@ public Integer getAppFee() { } /** - * [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. + * ISO 4217 currency code. + * GBP and EUR supported; GBP with your customers in + * the UK and for EUR with your customers in supported Eurozone countries only. */ public String getCurrency() { return currency; @@ -1249,7 +1282,6 @@ public String getCurrency() { /** * A human-readable description of the payment and/or mandate. This will be displayed to the * payer when authorising the billing request. - * */ public String getDescription() { return description; @@ -1258,10 +1290,12 @@ public String getDescription() { /** * This field will decide how GoCardless handles settlement of funds from the customer. * - * - `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. - * + *
    + *
  • 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 FundsSettlement getFundsSettlement() { return fundsSettlement; @@ -1283,18 +1317,18 @@ public Map getMetadata() { * 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 String getReference() { return reference; } /** - * (Optional) A scheme used for Open Banking payments. Currently `faster_payments` is - * supported in the UK (GBP) and `sepa_credit_transfer` and `sepa_instant_credit_transfer` - * are supported in supported Eurozone countries (EUR). For Eurozone countries, - * `sepa_credit_transfer` is used as the default. Please be aware that - * `sepa_instant_credit_transfer` may incur an additional fee for your customer. + * (Optional) A scheme used for Open Banking payments. Currently + * faster_payments is supported in the UK (GBP) and + * sepa_credit_transfer and sepa_instant_credit_transfer are + * supported in supported Eurozone countries (EUR). For Eurozone countries, + * sepa_credit_transfer is used as the default. Please be aware that + * sepa_instant_credit_transfer may incur an additional fee for your customer. */ public String getScheme() { return scheme; @@ -1320,8 +1354,9 @@ private Links() { private String payment; /** - * (Optional) ID of the [payment](#core-endpoints-payments) that was created from this - * payment request. + * (Optional) ID of the payment + * that was created from this payment request. */ public String getPayment() { return payment; @@ -1385,18 +1420,20 @@ private Customer() { private String phoneNumber; /** - * Customer's company name. Required unless a `given_name` and `family_name` are - * provided. For Canadian customers, the use of a `company_name` value will mean that - * any mandate created from this customer will be considered to be a "Business PAD" - * (otherwise, any mandate will be considered to be a "Personal PAD"). + * Customer's company name. Required unless a given_name and + * family_name are provided. For Canadian customers, the use of a + * company_name value will mean that any mandate created from this customer + * will be considered to be a "Business PAD" (otherwise, any mandate will be considered + * to be a "Personal PAD"). */ public String getCompanyName() { return companyName; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was - * created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -1411,14 +1448,14 @@ public String getEmail() { } /** - * Customer's surname. Required unless a `company_name` is provided. + * Customer's surname. Required unless a company_name is provided. */ public String getFamilyName() { return familyName; } /** - * Customer's first name. Required unless a `company_name` is provided. + * Customer's first name. Required unless a company_name is provided. */ public String getGivenName() { return givenName; @@ -1432,12 +1469,13 @@ public String getId() { } /** - * [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". + * ISO 639-1 code. + * Used as the language for notification emails sent by GoCardless if your organisation + * does not send its own (see 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 String getLanguage() { return language; @@ -1452,8 +1490,8 @@ public Map getMetadata() { } /** - * [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, including - * country code. + * ITU E.123 formatted phone number, + * including country code. */ public String getPhoneNumber() { return phoneNumber; @@ -1488,8 +1526,9 @@ private CustomerBankAccount() { * 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. */ public String getAccountHolderName() { return accountHolderName; @@ -1505,8 +1544,9 @@ public String getAccountNumberEnding() { /** * 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 for more information. */ public AccountType getAccountType() { return accountType; @@ -1528,25 +1568,28 @@ public String getBankName() { } /** - * [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. + * ISO + * 3166-1 alpha-2 code. Defaults to the country code of the iban if + * supplied, otherwise is required. */ public String getCountryCode() { return countryCode; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was - * created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; } /** - * [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. + * ISO 4217 currency + * code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + * supported. */ public String getCurrency() { return currency; @@ -1582,13 +1625,16 @@ public Map getMetadata() { * 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. + *
    + *
  • 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; @@ -1622,7 +1668,9 @@ private Links() { private String customer; /** - * ID of the [customer](#core-endpoints-customers) that owns this bank account. + * ID of the customer + * that owns this bank account. */ public String getCustomer() { return customer; @@ -1683,16 +1731,18 @@ public String getCity() { } /** - * [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. */ public String getCountryCode() { return countryCode; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was - * created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -1718,9 +1768,8 @@ public String getId() { * address of the payer to whom the mandate belongs (i.e. as a result of their * completion of a mandate setup flow in their browser). * - * Not required for creating offline mandates where `authorisation_source` is set to - * telephone or paper. - * + * Not required for creating offline mandates where authorisation_source is + * set to telephone or paper. */ public String getIpAddress() { return ipAddress; @@ -1735,8 +1784,8 @@ public String getPostalCode() { /** * 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. `CA` for California). + * ISO3166-2:US state code is + * required (e.g. CA for California). */ public String getRegion() { return region; @@ -1810,31 +1859,36 @@ public Integer getCount() { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently - * "USD" and "CAD" are supported. + * ISO 4217 currency code. + * Currently "USD" and "CAD" are supported. */ public String getCurrency() { return currency; } /** - * As per RFC 2445. The day of the month to charge customers on. `1`-`28` or `-1` to - * indicate the last day of the month. + * As per RFC 2445. The day of the month to charge customers on. 1 + *
    + *
  • + *
+ * 28 or -1 to indicate the last day of the month. */ public Integer getDayOfMonth() { return dayOfMonth; } /** - * Number of `interval_units` between customer charge dates. Must be greater than or equal - * to `1`. Must result in at least one charge date per year. Defaults to `1`. + * Number of interval_units between customer charge dates. Must be greater than + * or equal to 1. Must result in at least one charge date per year. Defaults to + * 1. */ public Integer getInterval() { return interval; } /** - * The unit of time between customer charge dates. One of `weekly`, `monthly` or `yearly`. + * The unit of time between customer charge dates. One of weekly, + * monthly or yearly. */ public IntervalUnit getIntervalUnit() { return intervalUnit; @@ -1854,8 +1908,7 @@ public Map getMetadata() { /** * Name of the month on which to charge a customer. Must be lowercase. Only applies when the - * interval_unit is `yearly`. - * + * interval_unit is yearly. */ public Month getMonth() { return month; @@ -1871,19 +1924,22 @@ public String getName() { /** * 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 for more details.
+ *
*/ public String getPaymentReference() { return paymentReference; } /** - * On failure, automatically retry payments using [intelligent - * retries](/success-plus/overview). Default is `false`. + * On failure, automatically retry payments using + * intelligent retries. + * Default is false. *

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

*/ public Boolean getRetryIfPossible() { @@ -1892,11 +1948,11 @@ public Boolean getRetryIfPossible() { /** * The date on which the first payment should be charged. If fulfilled after this date, this - * will be set as the mandate'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`. - * + * will be set as the mandate'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 String getStartDate() { return startDate; @@ -1940,9 +1996,9 @@ private Links() { private String subscription; /** - * (Optional) ID of the [subscription](#core-endpoints-subscriptions) that was created - * from this subscription request. - * + * (Optional) ID of the subscription + * that was created from this subscription request. */ public String getSubscription() { return subscription; diff --git a/src/main/java/com/gocardless/resources/BillingRequestFlow.java b/src/main/java/com/gocardless/resources/BillingRequestFlow.java index 77922702..48fb2d7c 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestFlow.java +++ b/src/main/java/com/gocardless/resources/BillingRequestFlow.java @@ -86,8 +86,8 @@ public String getId() { } /** - * 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 code. */ public String getLanguage() { return language; @@ -104,7 +104,6 @@ public Links getLinks() { * * You can only lock bank account if these have already been completed as a part of the billing * request. - * */ public Boolean getLockBankAccount() { return lockBankAccount; @@ -126,7 +125,6 @@ public Boolean getLockCurrency() { * * You can only lock customer details if these have already been completed as a part of the * billing request. - * */ public Boolean getLockCustomerDetails() { return lockCustomerDetails; @@ -206,8 +204,9 @@ private Links() { private String billingRequest; /** - * ID of the [billing request](#billing-requests-billing-requests) against which this flow - * was created. + * ID of the billing + * request against which this flow was created. */ public String getBillingRequest() { return billingRequest; @@ -230,8 +229,9 @@ private 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) for - * more information. + * accounts in other currencies. See local + * details for more information. */ public AccountType getAccountType() { return accountType; @@ -300,16 +300,17 @@ public String getCity() { } /** - * Customer's company name. Company name should only be provided if `given_name` and - * `family_name` are null. + * Customer's company name. Company name should only be provided if given_name + * and family_name are null. */ public String getCompanyName() { return 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. */ public String getCountryCode() { return countryCode; diff --git a/src/main/java/com/gocardless/resources/BillingRequestTemplate.java b/src/main/java/com/gocardless/resources/BillingRequestTemplate.java index 453b9c71..57718c86 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestTemplate.java +++ b/src/main/java/com/gocardless/resources/BillingRequestTemplate.java @@ -44,14 +44,16 @@ private BillingRequestTemplate() { /** * Permanent URL that customers can visit to allow them to complete a flow based on this - * template, before being returned to the `redirect_uri`. + * template, before being returned to the redirect_uri. */ public String getAuthorisationUrl() { return authorisationUrl; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -73,7 +75,7 @@ public MandateRequestConstraints getMandateRequestConstraints() { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 currency code. */ public String getMandateRequestCurrency() { return mandateRequestCurrency; @@ -82,7 +84,6 @@ public String getMandateRequestCurrency() { /** * A human-readable description of the payment and/or mandate. This will be displayed to the * payer when authorising the billing request. - * */ public String getMandateRequestDescription() { return mandateRequestDescription; @@ -138,9 +139,9 @@ public String getPaymentRequestAmount() { } /** - * [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. + * ISO 4217 currency code. + * GBP and EUR supported; GBP with your customers in the + * UK and for EUR with your customers in supported Eurozone countries only. */ public String getPaymentRequestCurrency() { return paymentRequestCurrency; @@ -149,7 +150,6 @@ public String getPaymentRequestCurrency() { /** * A human-readable description of the payment and/or mandate. This will be displayed to the * payer when authorising the billing request. - * */ public String getPaymentRequestDescription() { return paymentRequestDescription; @@ -165,11 +165,12 @@ public Map getPaymentRequestMetadata() { } /** - * (Optional) A scheme used for Open Banking payments. Currently `faster_payments` is supported - * in the UK (GBP) and `sepa_credit_transfer` and `sepa_instant_credit_transfer` are supported - * in supported Eurozone countries (EUR). For Eurozone countries, `sepa_credit_transfer` is used - * as the default. Please be aware that `sepa_instant_credit_transfer` may incur an additional - * fee for your customer. + * (Optional) A scheme used for Open Banking payments. Currently faster_payments is + * supported in the UK (GBP) and sepa_credit_transfer and + * sepa_instant_credit_transfer are supported in supported Eurozone countries + * (EUR). For Eurozone countries, sepa_credit_transfer is used as the default. + * Please be aware that sepa_instant_credit_transfer may incur an additional fee + * for your customer. */ public String getPaymentRequestScheme() { return paymentRequestScheme; @@ -183,8 +184,9 @@ public String getRedirectUri() { } /** - * Dynamic [timestamp](#api-usage-dates-and-times) recording when this resource was last - * updated. + * Dynamic timestamp + * recording when this resource was last updated. */ public String getUpdatedAt() { return updatedAt; @@ -213,7 +215,6 @@ private 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 String getEndDate() { return endDate; @@ -221,7 +222,8 @@ public String getEndDate() { /** * 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 Integer getMaxAmountPerPayment() { return maxAmountPerPayment; @@ -230,8 +232,7 @@ public Integer getMaxAmountPerPayment() { /** * 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 String getPaymentMethod() { return paymentMethod; @@ -240,11 +241,10 @@ public String getPaymentMethod() { /** * 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. + * 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; @@ -255,7 +255,6 @@ public List getPeriodicLimits() { * * This is an optional field and if it is not supplied the start date will be set to the day * authorisation happens. - * */ public String getStartDate() { return startDate; @@ -277,22 +276,27 @@ private PeriodicLimit() { private Period period; /** - * The alignment of the period. Defaults to `creation_date` if not specified. + * 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 + *
    + *
  • 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` - 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`. + * 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 Alignment getAlignment() { return alignment; @@ -301,8 +305,7 @@ public Alignment getAlignment() { /** * 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 Integer getMaxPayments() { return maxPayments; @@ -312,8 +315,7 @@ public Integer getMaxPayments() { * 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 Integer getMaxTotalAmount() { return maxTotalAmount; @@ -323,7 +325,6 @@ public Integer getMaxTotalAmount() { * 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 c1c7a39e..4aedb60e 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestWithAction.java +++ b/src/main/java/com/gocardless/resources/BillingRequestWithAction.java @@ -11,9 +11,8 @@ * 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 for how-to's, explanations and tutorials. */ public class BillingRequestWithAction { private BillingRequestWithAction() { @@ -39,12 +38,12 @@ public BankAuthorisations getBankAuthorisations() { * example 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 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. + * Important: All properties associated with subscription_request + * and instalment_schedule_request are only supported for ACH and PAD schemes. *

*/ public BillingRequests getBillingRequests() { @@ -84,8 +83,9 @@ public AuthorisationType getAuthorisationType() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when the user has been - * authorised. + * Fixed timestamp, + * recording when the user has been authorised. */ public String getAuthorisedAt() { return authorisedAt; @@ -114,8 +114,9 @@ public String getId() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when the authorisation URL has - * been visited. + * Fixed timestamp, + * recording when the authorisation URL has been visited. */ public String getLastVisitedAt() { return lastVisitedAt; @@ -127,8 +128,8 @@ public Links getLinks() { /** * URL to a QR code PNG image of the bank authorisation url. This QR code can be used as an - * alternative to providing the `url` to the payer to allow them to authorise with their - * mobile devices. + * alternative to providing the url to the payer to allow them to authorise + * with their mobile devices. */ public String getQrCodeUrl() { return qrCodeUrl; @@ -137,24 +138,27 @@ public String getQrCodeUrl() { /** * URL that the payer can be redirected to after authorising the payment. * - * On completion of bank authorisation, the query parameter of either `outcome=success` or - * `outcome=failure` will be appended to the `redirect_uri` to indicate the result of the - * bank authorisation. If the bank authorisation is expired, the query parameter - * `outcome=timeout` will be appended to the `redirect_uri`, in which case you should prompt - * the user to try the bank authorisation step again. + * On completion of bank authorisation, the query parameter of either + * outcome=success or outcome=failure will be appended to the + * redirect_uri to indicate the result of the bank authorisation. If the bank + * authorisation is expired, the query parameter outcome=timeout will be + * appended to the redirect_uri, in which case you should prompt the user to + * try the bank authorisation step again. * - * 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. + * 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, + * BANK_AUTHORISATION_DENIED, + * or BANK_AUTHORISATION_FAILED + * 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`. + * The BillingRequestFlow ID will also be appended to the redirect_uri as query + * parameter id=BRF123. * - * Defaults to `https://pay.gocardless.com/billing/static/thankyou`. + * Defaults to https://pay.gocardless.com/billing/static/thankyou. */ public String getRedirectUri() { return redirectUri; @@ -188,16 +192,18 @@ private Links() { private String institution; /** - * ID of the [billing request](#billing-requests-billing-requests) against which this - * authorisation was created. + * ID of the billing + * request against which this authorisation was created. */ public String getBillingRequest() { return billingRequest; } /** - * ID of the [institution](#billing-requests-institutions) against which this - * authorisation was created. + * ID of the institution + * against which this authorisation was created. */ public String getInstitution() { return institution; @@ -212,12 +218,12 @@ public String getInstitution() { * example 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 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. + * Important: All properties associated with subscription_request + * and instalment_schedule_request are only supported for ACH and PAD schemes. *

*/ public static class BillingRequests { @@ -250,7 +256,9 @@ public List getActions() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -260,9 +268,9 @@ public String getCreatedAt() { * (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 for more information. */ public Boolean getFallbackEnabled() { return fallbackEnabled; @@ -283,8 +291,9 @@ public String getId() { } /** - * Request for an instalment schedule. Has to contain either `instalments_with_schedule` - * object or an array of `instalments_with_dates` objects + * Request for an instalment schedule. Has to contain either + * instalments_with_schedule object or an array of + * instalments_with_dates objects */ public InstalmentScheduleRequest getInstalmentScheduleRequest() { return instalmentScheduleRequest; @@ -322,9 +331,9 @@ public PaymentContextCode getPaymentContextCode() { /** * 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 for the complete list of valid codes. */ public String getPaymentPurposeCode() { return paymentPurposeCode; @@ -340,9 +349,9 @@ public PaymentRequest getPaymentRequest() { /** * 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 for the complete list of valid codes. */ public PurposeCode getPurposeCode() { return purposeCode; @@ -355,10 +364,15 @@ public Resources getResources() { /** * 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 Status getStatus() { return status; @@ -502,13 +516,18 @@ public List getCompletesActions() { /** * Describes whether we inferred the institution from the provided bank account details. - * One of: - `not_needed`: we won't attempt to infer the institution as it is not - * needed. Either because it was manually selected or the billing request does not - * support this feature - `pending`: we are waiting on the bank details in order to - * infer the institution - `failed`: we weren't able to infer the institution - - * `success`: we inferred the institution and added it to the resources of a Billing - * Request + * One of: * + *
    + *
  • not_needed: we won't attempt to infer the institution as it is not + * needed. Either because it was manually selected or the billing request does not + * support this feature
  • + *
  • pending: we are waiting on the bank details in order to infer the + * institution
  • + *
  • failed: we weren't able to infer the institution
  • + *
  • success: we inferred the institution and added it to the resources + * of a Billing Request
  • + *
*/ public InstitutionGuessStatus getInstitutionGuessStatus() { return institutionGuessStatus; @@ -666,8 +685,9 @@ public List getCustomerBillingDetail() { /** * Represents a instalment schedule request resource returned from the API. * - * Request for an instalment schedule. Has to contain either `instalments_with_schedule` - * object or an array of `instalments_with_dates` objects + * Request for an instalment schedule. Has to contain either + * instalments_with_schedule object or an array of + * instalments_with_dates objects */ public static class InstalmentScheduleRequest { private InstalmentScheduleRequest() { @@ -695,16 +715,18 @@ public Integer getAppFee() { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - * Currently "USD" and "CAD" are supported. + * ISO 4217 currency + * code. Currently "USD" and "CAD" are supported. */ public String getCurrency() { return 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) + * An explicit array of instalment payments, each specifying at least an + * amount and charge_date. See create + * (with dates) */ public List getInstalmentsWithDates() { return instalmentsWithDates; @@ -713,8 +735,9 @@ public List getInstalmentsWithDates() { /** * 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) */ public InstalmentsWithSchedule getInstalmentsWithSchedule() { return instalmentsWithSchedule; @@ -743,18 +766,23 @@ public String getName() { /** * 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 for more details.
+ *
*/ public String getPaymentReference() { return paymentReference; } /** - * On failure, automatically retry payments using [intelligent - * retries](/success-plus/overview). Default is `false`. + * On failure, automatically retry payments using + * intelligent + * retries. Default is false. *

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

*/ public Boolean getRetryIfPossible() { @@ -790,11 +818,12 @@ private InstalmentsWithDate() { * 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) + * Transaction + * limits * * For Variable Recurring Payments (VRP), this must not exceed the mandate's - * `max_amount_per_payment` constraint. + * max_amount_per_payment constraint. */ public Integer getAmount() { return amount; @@ -802,8 +831,9 @@ public Integer getAmount() { /** * 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 - * automatically rolled forwards to that date. + * next_possible_charge_date on the mandate, + * it will be automatically rolled forwards to that date. */ public String getChargeDate() { return chargeDate; @@ -812,8 +842,9 @@ public String getChargeDate() { /** * 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)). + * not send its own notifications (see compliance + * requirements). */ public String getDescription() { return description; @@ -825,8 +856,9 @@ public String getDescription() { * * 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) */ public static class InstalmentsWithSchedule { private InstalmentsWithSchedule() { @@ -841,24 +873,22 @@ private InstalmentsWithSchedule() { /** * List of amounts of each instalment, in the lowest denomination for the currency * (e.g. cents in USD). - * */ public List getAmounts() { return amounts; } /** - * Number of `interval_units` between charge dates. Must be greater than or equal to - * `1`. - * + * Number of interval_units between charge dates. Must be greater than + * or equal to 1. */ public Integer getInterval() { return interval; } /** - * The unit of time between customer charge dates. One of `weekly`, `monthly` or - * `yearly`. + * The unit of time between customer charge dates. One of weekly, + * monthly or yearly. */ public IntervalUnit getIntervalUnit() { return intervalUnit; @@ -866,10 +896,12 @@ public IntervalUnit getIntervalUnit() { /** * 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'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 String getStartDate() { return startDate; @@ -897,9 +929,9 @@ private Links() { private String instalmentSchedule; /** - * (Optional) ID of the [instalment_schedule](#core-endpoints-instalment-schedules) + * (Optional) ID of the instalment_schedule * that was created from this instalment schedule request. - * */ public String getInstalmentSchedule() { return instalmentSchedule; @@ -934,29 +966,34 @@ private Links() { private String subscriptionRequestSubscription; /** - * (Optional) ID of the [bank authorisation](#billing-requests-bank-authorisations) that - * was used to verify this request. + * (Optional) ID of the bank + * authorisation that was used to verify this request. */ public String getBankAuthorisation() { return bankAuthorisation; } /** - * ID of the associated [creditor](#core-endpoints-creditors). + * ID of the associated creditor. */ public String getCreditor() { return creditor; } /** - * ID of the [customer](#core-endpoints-customers) that will be used for this request + * ID of the customer + * that will be used for this request */ public String getCustomer() { return customer; } /** - * (Optional) ID of the [customer_bank_account](#core-endpoints-customer-bank-accounts) + * (Optional) ID of the customer_bank_account * that will be used for this request */ public String getCustomerBankAccount() { @@ -978,8 +1015,9 @@ public String getInstalmentScheduleRequest() { } /** - * (Optional) ID of the [instalment_schedule](#core-endpoints-instalment-schedules) that - * was created from this instalment schedule request. + * (Optional) ID of the instalment_schedule + * that was created from this instalment schedule request. */ public String getInstalmentScheduleRequestInstalmentSchedule() { return instalmentScheduleRequestInstalmentSchedule; @@ -993,8 +1031,9 @@ public String getMandateRequest() { } /** - * (Optional) ID of the [mandate](#core-endpoints-mandates) that was created from this - * mandate request. this mandate request. + * (Optional) ID of the mandate + * that was created from this mandate request. this mandate request. */ public String getMandateRequestMandate() { return mandateRequestMandate; @@ -1022,8 +1061,9 @@ public String getPaymentRequest() { } /** - * (Optional) ID of the [payment](#core-endpoints-payments) that was created from this - * payment request. + * (Optional) ID of the payment + * that was created from this payment request. */ public String getPaymentRequestPayment() { return paymentRequestPayment; @@ -1037,8 +1077,9 @@ public String getSubscriptionRequest() { } /** - * (Optional) ID of the [subscription](#core-endpoints-subscriptions) that was created - * from this subscription request. + * (Optional) ID of the subscription + * that was created from this subscription request. */ public String getSubscriptionRequestSubscription() { return subscriptionRequestSubscription; @@ -1069,15 +1110,14 @@ private 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. * * 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 AuthorisationSource getAuthorisationSource() { return authorisationSource; @@ -1085,10 +1125,10 @@ public AuthorisationSource getAuthorisationSource() { /** * 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. - * + * 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. */ public String getConsentType() { return consentType; @@ -1103,7 +1143,8 @@ public Constraints getConstraints() { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 currency + * code. */ public String getCurrency() { return currency; @@ -1112,7 +1153,6 @@ public String getCurrency() { /** * A human-readable description of the payment and/or mandate. This will be displayed to * the payer when authorising the billing request. - * */ public String getDescription() { return description; @@ -1121,10 +1161,12 @@ public String getDescription() { /** * This field will decide how GoCardless handles settlement of funds from the customer. * - * - `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. - * + *
    + *
  • 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 FundsSettlement getFundsSettlement() { return fundsSettlement; @@ -1175,25 +1217,29 @@ public Boolean getSweeping() { /** * 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`. + *
    + *
  • 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. + * 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. + * See Billing + * Requests: Creating Verified Mandates for more information. */ public Verify getVerify() { return verify; @@ -1248,7 +1294,6 @@ private Constraints() { * 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 String getEndDate() { return endDate; @@ -1256,8 +1301,8 @@ public String getEndDate() { /** * 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. + * denomination for the currency (e.g. pence in GBP, cents in EUR). Note: + * Required for PayTo and VRP. */ public Integer getMaxAmountPerPayment() { return maxAmountPerPayment; @@ -1266,8 +1311,7 @@ public Integer getMaxAmountPerPayment() { /** * 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. - * + * and frequency. Note: This is only supported for ACH and PAD schemes. */ public String getPaymentMethod() { return paymentMethod; @@ -1276,11 +1320,10 @@ public String getPaymentMethod() { /** * 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. + * 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; @@ -1291,7 +1334,6 @@ public List getPeriodicLimits() { * * This is an optional field and if it is not supplied the start date will be set to * the day authorisation happens. - * */ public String getStartDate() { return startDate; @@ -1313,22 +1355,30 @@ private PeriodicLimit() { private Period period; /** - * The alignment of the period. Defaults to `creation_date` if not specified. + * 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 + *
    + *
  • 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` - 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`. + * 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 Alignment getAlignment() { return alignment; @@ -1337,8 +1387,7 @@ public Alignment getAlignment() { /** * 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 Integer getMaxPayments() { return maxPayments; @@ -1349,8 +1398,7 @@ public Integer getMaxPayments() { * 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 Integer getMaxTotalAmount() { return maxTotalAmount; @@ -1360,7 +1408,6 @@ public Integer getMaxTotalAmount() { * 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; @@ -1398,9 +1445,9 @@ private Links() { private String mandate; /** - * (Optional) ID of the [mandate](#core-endpoints-mandates) that was created from - * this mandate request. this mandate request. - * + * (Optional) ID of the mandate + * that was created from this mandate request. this mandate request. */ public String getMandate() { return mandate; @@ -1445,9 +1492,10 @@ public Integer getAppFee() { } /** - * [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. + * ISO 4217 currency + * code. GBP and EUR supported; GBP with your + * customers in the UK and for EUR with your customers in supported + * Eurozone countries only. */ public String getCurrency() { return currency; @@ -1456,7 +1504,6 @@ public String getCurrency() { /** * A human-readable description of the payment and/or mandate. This will be displayed to * the payer when authorising the billing request. - * */ public String getDescription() { return description; @@ -1465,10 +1512,12 @@ public String getDescription() { /** * This field will decide how GoCardless handles settlement of funds from the customer. * - * - `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. - * + *
    + *
  • 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 FundsSettlement getFundsSettlement() { return fundsSettlement; @@ -1490,18 +1539,18 @@ public Map getMetadata() { * 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 String getReference() { return reference; } /** - * (Optional) A scheme used for Open Banking payments. Currently `faster_payments` is - * supported in the UK (GBP) and `sepa_credit_transfer` and - * `sepa_instant_credit_transfer` are supported in supported Eurozone countries (EUR). - * For Eurozone countries, `sepa_credit_transfer` is used as the default. Please be - * aware that `sepa_instant_credit_transfer` may incur an additional fee for your + * (Optional) A scheme used for Open Banking payments. Currently + * faster_payments is supported in the UK (GBP) and + * sepa_credit_transfer and sepa_instant_credit_transfer are + * supported in supported Eurozone countries (EUR). For Eurozone countries, + * sepa_credit_transfer is used as the default. Please be aware that + * sepa_instant_credit_transfer may incur an additional fee for your * customer. */ public String getScheme() { @@ -1528,8 +1577,9 @@ private Links() { private String payment; /** - * (Optional) ID of the [payment](#core-endpoints-payments) that was created from - * this payment request. + * (Optional) ID of the payment + * that was created from this payment request. */ public String getPayment() { return payment; @@ -1593,18 +1643,20 @@ private Customer() { private String phoneNumber; /** - * Customer's company name. Required unless a `given_name` and `family_name` are - * provided. For Canadian customers, the use of a `company_name` value will mean - * that any mandate created from this customer will be considered to be a "Business - * PAD" (otherwise, any mandate will be considered to be a "Personal PAD"). + * Customer's company name. Required unless a given_name and + * family_name are provided. For Canadian customers, the use of a + * company_name value will mean that any mandate created from this + * customer will be considered to be a "Business PAD" (otherwise, any mandate will + * be considered to be a "Personal PAD"). */ public String getCompanyName() { return companyName; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was - * created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -1619,14 +1671,14 @@ public String getEmail() { } /** - * Customer's surname. Required unless a `company_name` is provided. + * Customer's surname. Required unless a company_name is provided. */ public String getFamilyName() { return familyName; } /** - * Customer's first name. Required unless a `company_name` is provided. + * Customer's first name. Required unless a company_name is provided. */ public String getGivenName() { return givenName; @@ -1640,13 +1692,13 @@ public String getId() { } /** - * [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". + * ISO 639-1 + * code. Used as the language for notification emails sent by GoCardless if your + * organisation does not send its own (see 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 String getLanguage() { return language; @@ -1661,8 +1713,8 @@ public Map getMetadata() { } /** - * [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, - * including country code. + * ITU E.123 formatted phone + * number, including country code. */ public String getPhoneNumber() { return phoneNumber; @@ -1697,8 +1749,9 @@ private CustomerBankAccount() { * 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). + * field is required unless the request includes a customer + * bank account token. */ public String getAccountHolderName() { return accountHolderName; @@ -1714,8 +1767,9 @@ public String getAccountNumberEnding() { /** * 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. + * provided for bank accounts in other currencies. See local + * details for more information. */ public AccountType getAccountType() { return accountType; @@ -1737,26 +1791,28 @@ public String getBankName() { } /** - * [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. + * ISO + * 3166-1 alpha-2 code. Defaults to the country code of the iban if + * supplied, otherwise is required. */ public String getCountryCode() { return countryCode; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was - * created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; } /** - * [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. + * ISO 4217 + * currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and + * "USD" are supported. */ public String getCurrency() { return currency; @@ -1792,13 +1848,16 @@ public Map getMetadata() { * 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. + *
    + *
  • 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; @@ -1832,7 +1891,9 @@ private Links() { private String customer; /** - * ID of the [customer](#core-endpoints-customers) that owns this bank account. + * ID of the customer + * that owns this bank account. */ public String getCustomer() { return customer; @@ -1893,16 +1954,18 @@ public String getCity() { } /** - * [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. */ public String getCountryCode() { return countryCode; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was - * created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -1929,9 +1992,8 @@ public String getId() { * address of the payer to whom the mandate belongs (i.e. as a result of their * completion of a mandate setup flow in their browser). * - * Not required for creating offline mandates where `authorisation_source` is set to - * telephone or paper. - * + * Not required for creating offline mandates where + * authorisation_source is set to telephone or paper. */ public String getIpAddress() { return ipAddress; @@ -1946,8 +2008,8 @@ public String getPostalCode() { /** * 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. `CA` for California). + * ISO3166-2:US state code + * is required (e.g. CA for California). */ public String getRegion() { return region; @@ -2021,32 +2083,36 @@ public Integer getCount() { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - * Currently "USD" and "CAD" are supported. + * ISO 4217 currency + * code. Currently "USD" and "CAD" are supported. */ public String getCurrency() { return currency; } /** - * As per RFC 2445. The day of the month to charge customers on. `1`-`28` or `-1` to - * indicate the last day of the month. + * As per RFC 2445. The day of the month to charge customers on. 1 + *
    + *
  • + *
+ * 28 or -1 to indicate the last day of the month. */ public Integer getDayOfMonth() { return dayOfMonth; } /** - * Number of `interval_units` between customer charge dates. Must be greater than or - * equal to `1`. Must result in at least one charge date per year. Defaults to `1`. + * Number of interval_units between customer charge dates. Must be greater + * than or equal to 1. Must result in at least one charge date per year. + * Defaults to 1. */ public Integer getInterval() { return interval; } /** - * The unit of time between customer charge dates. One of `weekly`, `monthly` or - * `yearly`. + * The unit of time between customer charge dates. One of weekly, + * monthly or yearly. */ public IntervalUnit getIntervalUnit() { return intervalUnit; @@ -2066,8 +2132,7 @@ public Map getMetadata() { /** * Name of the month on which to charge a customer. Must be lowercase. Only applies when - * the interval_unit is `yearly`. - * + * the interval_unit is yearly. */ public Month getMonth() { return month; @@ -2084,18 +2149,23 @@ public String getName() { /** * 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 for more details.
+ *
*/ public String getPaymentReference() { return paymentReference; } /** - * On failure, automatically retry payments using [intelligent - * retries](/success-plus/overview). Default is `false`. + * On failure, automatically retry payments using + * intelligent + * retries. Default is false. *

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

*/ public Boolean getRetryIfPossible() { @@ -2104,11 +2174,11 @@ public Boolean getRetryIfPossible() { /** * The date on which the first payment should be charged. If fulfilled after this date, - * this will be set as the mandate'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`. - * + * this will be set as the mandate'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 String getStartDate() { return startDate; @@ -2152,9 +2222,9 @@ private Links() { private String subscription; /** - * (Optional) ID of the [subscription](#core-endpoints-subscriptions) that was - * created from this subscription request. - * + * (Optional) ID of the subscription + * that was created from this subscription request. */ public String getSubscription() { return subscription; diff --git a/src/main/java/com/gocardless/resources/Block.java b/src/main/java/com/gocardless/resources/Block.java index e0fa955a..840ab626 100644 --- a/src/main/java/com/gocardless/resources/Block.java +++ b/src/main/java/com/gocardless/resources/Block.java @@ -18,9 +18,10 @@ * * Please note: * - * - Payments and subscriptions cannot be created against a mandate in blocked state. - A mandate - * can never be transitioned out of the blocked state. - * + *
    + *
  • Payments and subscriptions cannot be created against a mandate in blocked state.
  • + *
  • A mandate can never be transitioned out of the blocked state.
  • + *
* The one exception to this is when blocking a 'bank_name'. This block will prevent bank accounts * from being created for banks that match the given name. To ensure we match bank names correctly * an existing bank account must be used when creating this block. Please be aware that we cannot @@ -62,7 +63,9 @@ public BlockType getBlockType() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -104,7 +107,9 @@ public String getResourceReference() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was updated. + * Fixed timestamp, + * recording when this resource was updated. */ public String getUpdatedAt() { return updatedAt; diff --git a/src/main/java/com/gocardless/resources/Creditor.java b/src/main/java/com/gocardless/resources/Creditor.java index 0600d9e6..dfb40350 100644 --- a/src/main/java/com/gocardless/resources/Creditor.java +++ b/src/main/java/com/gocardless/resources/Creditor.java @@ -6,9 +6,11 @@ /** * Represents a creditor resource returned from the API. * - * 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 + * 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. @@ -63,11 +65,10 @@ public String getAddressLine3() { /** * Prefix for the bank reference of payouts sent to this creditor. For instance, if the - * creditor's `bank_reference_prefix` was `ACME`, the bank reference of a payout sent to that - * creditor could be `ACME-8G7Q8`. + * creditor's bank_reference_prefix was ACME, the bank reference of a + * payout sent to that creditor could be ACME-8G7Q8. * * This prefix is also used for refunds in EUR and GBP. - * */ public String getBankReferencePrefix() { return bankReferencePrefix; @@ -88,41 +89,46 @@ public String getCity() { } /** - * [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. */ public String getCountryCode() { return countryCode; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; } /** - * The type of business of the creditor. Currently, `individual`, `company`, `charity`, - * `partnership`, and `trust` are supported. + * The type of business of the creditor. Currently, individual, + * company, charity, partnership, and trust + * are supported. */ public CreditorType getCreditorType() { return creditorType; } /** - * Boolean value indicating whether creditor has the [Custom Payment - * Pages](https://hub.gocardless.com/s/article/Custom-payment-pages) functionality enabled. + * Boolean value indicating whether creditor has the + * Custom Payment Pages + * functionality enabled. */ public Boolean getCustomPaymentPagesEnabled() { return customPaymentPagesEnabled; } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the currency in - * which amounts will be paid out (after foreign exchange). Currently "AUD", "CAD", "DKK", - * "EUR", "GBP", "NZD", "SEK" and "USD" are supported. Present only if payouts will be (or were) - * made via foreign exchange. + * ISO 4217 code for the + * currency in which amounts will be paid out (after foreign exchange). Currently "AUD", "CAD", + * "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. Present only if payouts will be + * (or were) made via foreign exchange. */ public FxPayoutCurrency getFxPayoutCurrency() { return fxPayoutCurrency; @@ -147,8 +153,9 @@ public String getLogoUrl() { } /** - * Boolean value indicating whether creditor has the [Mandate - * Imports](#core-endpoints-mandate-imports) functionality enabled. + * Boolean value indicating whether creditor has the Mandate + * Imports functionality enabled. */ public Boolean getMandateImportsEnabled() { return mandateImportsEnabled; @@ -156,9 +163,10 @@ public Boolean getMandateImportsEnabled() { /** * Boolean value indicating whether the organisation is responsible for sending all customer - * notifications (note this is separate from the functionality described - * [here](/getting-started/api/handling-customer-notifications/)). If you are a partner app, and - * this value is true, you should not send notifications on behalf of this organisation. + * notifications (note this is separate from the functionality described here). + * If you are a partner app, and this value is true, you should not send notifications on behalf + * of this organisation. */ public Boolean getMerchantResponsibleForNotifications() { return merchantResponsibleForNotifications; @@ -188,9 +196,11 @@ public String getRegion() { /** * An array of the scheme identifiers this creditor can create mandates against. * - * The support address, `phone_number` and `email` fields are for customers to contact the - * merchant for support purposes. They must be displayed on the payment page, please see our - * [compliance requirements](#appendix-compliance-requirements) for more details. + * The support address, phone_number and email fields are for + * customers to contact the merchant for support purposes. They must be displayed on the payment + * page, please see our compliance + * requirements for more details. */ public List getSchemeIdentifiers() { return schemeIdentifiers; @@ -198,17 +208,21 @@ public List getSchemeIdentifiers() { /** * The creditor's verification status, indicating whether they can yet receive payouts. For more - * details on handling verification as a partner, see our ["Helping your users get verified" - * guide](/getting-started/partners/helping-your-users-get-verified/). One of: + * details on handling verification as a partner, see our "Helping + * your users get verified" guide. One of: * - * - `successful`: The creditor's account is fully verified, and they can receive payouts. Once - * a creditor has been successfully verified, they may in the future require further - * verification - for example, if they change their payout bank account, we will have to check - * that they own the new bank account before they can receive payouts again. - `in_review`: The - * creditor has provided all of the information currently requested, and it is awaiting review - * by GoCardless before they can be verified and receive payouts. - `action_required`: The - * creditor needs to provide further information to verify their account so they can receive - * payouts, and should visit the verification flow. + *
    + *
  • successful: The creditor's account is fully verified, and they can receive + * payouts. Once a creditor has been successfully verified, they may in the future require + * further verification - for example, if they change their payout bank account, we will have to + * check that they own the new bank account before they can receive payouts again.
  • + *
  • in_review: The creditor has provided all of the information currently + * requested, and it is awaiting review by GoCardless before they can be verified and receive + * payouts.
  • + *
  • action_required: The creditor needs to provide further information to verify + * their account so they can receive payouts, and should visit the verification flow.
  • + *
*/ public VerificationStatus getVerificationStatus() { return verificationStatus; @@ -265,64 +279,72 @@ private 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 which is set up to receive payouts in AUD. */ public String getDefaultAudPayoutAccount() { return 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 which is set up to receive payouts in CAD. */ public String getDefaultCadPayoutAccount() { return 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 which is set up to receive payouts in DKK. */ public String getDefaultDkkPayoutAccount() { return 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 which is set up to receive payouts in EUR. */ public String getDefaultEurPayoutAccount() { return 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 which is set up to receive payouts in GBP. */ public String getDefaultGbpPayoutAccount() { return 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 which is set up to receive payouts in NZD. */ public String getDefaultNzdPayoutAccount() { return 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 which is set up to receive payouts in SEK. */ public String getDefaultSekPayoutAccount() { return 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 which is set up to receive payouts in USD. */ public String getDefaultUsdPayoutAccount() { return defaultUsdPayoutAccount; @@ -394,15 +416,18 @@ public String getCity() { } /** - * [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. */ public String getCountryCode() { return countryCode; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -433,8 +458,9 @@ public String getId() { * The minimum interval, in working days, between the sending of a pre-notification to the * customer, and the charge date of a payment using this scheme identifier. * - * By default, GoCardless sends these notifications automatically. Please see our - * [compliance requirements](#appendix-compliance-requirements) for more details. + * By default, GoCardless sends these notifications automatically. Please see our compliance + * requirements for more details. */ public Integer getMinimumAdvanceNotice() { return minimumAdvanceNotice; @@ -484,8 +510,8 @@ public Scheme getScheme() { } /** - * The status of the scheme identifier. Only `active` scheme identifiers will be applied to - * a creditor and used against payments. + * The status of the scheme identifier. Only active scheme identifiers will be + * applied to a creditor and used against payments. */ public Status getStatus() { return status; diff --git a/src/main/java/com/gocardless/resources/CreditorBankAccount.java b/src/main/java/com/gocardless/resources/CreditorBankAccount.java index ff78a649..ad2e4091 100644 --- a/src/main/java/com/gocardless/resources/CreditorBankAccount.java +++ b/src/main/java/com/gocardless/resources/CreditorBankAccount.java @@ -6,13 +6,16 @@ /** * Represents a creditor bank account resource returned from the API. * - * 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. + * These are the bank accounts which your + * 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. + * 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. @@ -38,8 +41,9 @@ private CreditorBankAccount() { /** * 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. + * with the linked creditor. This + * field will be transliterated, upcased and truncated to 18 characters. */ public String getAccountHolderName() { return accountHolderName; @@ -55,8 +59,9 @@ public String getAccountNumberEnding() { /** * 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. + * accounts in other currencies. See local + * details for more information. */ public AccountType getAccountType() { return accountType; @@ -70,24 +75,27 @@ public String getBankName() { } /** - * [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. + * ISO + * 3166-1 alpha-2 code. Defaults to the country code of the iban if supplied, + * otherwise is required. */ public String getCountryCode() { return countryCode; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; } /** - * [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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public String getCurrency() { return currency; @@ -120,7 +128,8 @@ public Map getMetadata() { } /** - * Verification status of the Bank Account. Can be one of `pending`, `in_review` or `successful` + * Verification status of the Bank Account. Can be one of pending, + * in_review or successful */ public VerificationStatus getVerificationStatus() { return verificationStatus; @@ -155,7 +164,9 @@ private Links() { private String creditor; /** - * ID of the [creditor](#core-endpoints-creditors) that owns this bank account. + * ID of the creditor + * that owns this bank account. */ public String getCreditor() { return creditor; diff --git a/src/main/java/com/gocardless/resources/Customer.java b/src/main/java/com/gocardless/resources/Customer.java index cc6d0098..9a10b5d5 100644 --- a/src/main/java/com/gocardless/resources/Customer.java +++ b/src/main/java/com/gocardless/resources/Customer.java @@ -5,9 +5,10 @@ /** * Represents a customer resource returned from the API. * - * 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, which in turn can have several Direct Debit + * mandates. */ public class Customer { private Customer() { @@ -62,25 +63,29 @@ public String getCity() { } /** - * Customer's company name. Required unless a `given_name` and `family_name` are provided. For - * Canadian customers, the use of a `company_name` value will mean that any mandate created from - * this customer will be considered to be a "Business PAD" (otherwise, any mandate will be - * considered to be a "Personal PAD"). + * Customer's company name. Required unless a given_name and + * family_name are provided. For Canadian customers, the use of a + * company_name value will mean that any mandate created from this customer will be + * considered to be a "Business PAD" (otherwise, any mandate will be considered to be a + * "Personal PAD"). */ public String getCompanyName() { return 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. */ public String getCountryCode() { return countryCode; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -103,14 +108,14 @@ public String getEmail() { } /** - * Customer's surname. Required unless a `company_name` is provided. + * Customer's surname. Required unless a company_name is provided. */ public String getFamilyName() { return familyName; } /** - * Customer's first name. Required unless a `company_name` is provided. + * Customer's first name. Required unless a company_name is provided. */ public String getGivenName() { return givenName; @@ -124,11 +129,13 @@ public String getId() { } /** - * [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". + * ISO 639-1 code. Used as + * the language for notification emails sent by GoCardless if your organisation does not send + * its own (see 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 String getLanguage() { return language; @@ -143,8 +150,8 @@ public Map getMetadata() { } /** - * [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, including country - * code. + * ITU E.123 formatted phone number, including + * country code. */ public String getPhoneNumber() { return phoneNumber; @@ -159,8 +166,8 @@ public String getPostalCode() { /** * 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. `CA` - * for California). + * ISO3166-2:US state code is required + * (e.g. CA for California). */ public String getRegion() { return region; diff --git a/src/main/java/com/gocardless/resources/CustomerBankAccount.java b/src/main/java/com/gocardless/resources/CustomerBankAccount.java index 0433fdec..a5b40c7b 100644 --- a/src/main/java/com/gocardless/resources/CustomerBankAccount.java +++ b/src/main/java/com/gocardless/resources/CustomerBankAccount.java @@ -6,18 +6,21 @@ /** * Represents a customer bank account resource returned from the API. * - * 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. + * They always belong to a + * customer, + * and may be linked to several Direct Debit + * 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. + * 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, + * before proceeding with creating the accounts */ public class CustomerBankAccount { private CustomerBankAccount() { @@ -43,7 +46,9 @@ private CustomerBankAccount() { * 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). + * customer + * bank account token. */ public String getAccountHolderName() { return accountHolderName; @@ -59,8 +64,9 @@ public String getAccountNumberEnding() { /** * 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. + * accounts in other currencies. See local + * details for more information. */ public AccountType getAccountType() { return accountType; @@ -82,24 +88,27 @@ public String getBankName() { } /** - * [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. + * ISO + * 3166-1 alpha-2 code. Defaults to the country code of the iban if supplied, + * otherwise is required. */ public String getCountryCode() { return countryCode; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; } /** - * [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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public String getCurrency() { return currency; @@ -135,12 +144,16 @@ public Map getMetadata() { * 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. + *

    + *
  • 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; @@ -182,7 +195,9 @@ private Links() { private String customer; /** - * ID of the [customer](#core-endpoints-customers) that owns this bank account. + * ID of the customer + * that owns this bank account. */ public String getCustomer() { return customer; diff --git a/src/main/java/com/gocardless/resources/CustomerNotification.java b/src/main/java/com/gocardless/resources/CustomerNotification.java index ea5f6d83..61d25a5b 100644 --- a/src/main/java/com/gocardless/resources/CustomerNotification.java +++ b/src/main/java/com/gocardless/resources/CustomerNotification.java @@ -7,7 +7,7 @@ * * Customer Notifications represent the notification which is due to be sent to a customer after an * event has happened. The event, the resource and the customer to be notified are all identified in - * the `links` property. + * the links property. * * Note that these are ephemeral records - once the notification has been actioned in some way, it * is no longer visible using this API. @@ -30,16 +30,17 @@ private CustomerNotification() { private Type type; /** - * The action that was taken on the notification. Currently this can only be `handled`, which - * means the integrator sent the notification themselves. - * + * The action that was taken on the notification. Currently this can only be + * handled, which means the integrator sent the notification themselves. */ public ActionTaken getActionTaken() { return actionTaken; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this action was taken. + * Fixed timestamp, + * recording when this action was taken. */ public String getActionTakenAt() { return actionTakenAt; @@ -66,9 +67,16 @@ public Links getLinks() { /** * The type of notification the customer shall receive. One of: * - * - `payment_created` - `payment_cancelled` - `mandate_created` - `mandate_blocked` - - * `subscription_created` - `subscription_cancelled` - `instalment_schedule_created` - - * `instalment_schedule_cancelled` + *
    + *
  • payment_created
  • + *
  • payment_cancelled
  • + *
  • mandate_created
  • + *
  • mandate_blocked
  • + *
  • subscription_created
  • + *
  • subscription_cancelled
  • + *
  • instalment_schedule_created
  • + *
  • instalment_schedule_cancelled
  • + *
*/ public Type getType() { return type; diff --git a/src/main/java/com/gocardless/resources/Event.java b/src/main/java/com/gocardless/resources/Event.java index 38d50a3f..ca57d9ef 100644 --- a/src/main/java/com/gocardless/resources/Event.java +++ b/src/main/java/com/gocardless/resources/Event.java @@ -10,8 +10,10 @@ * 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 + * corresponding event getting included in API responses. See + * here 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, @@ -36,14 +38,18 @@ private Event() { private Source source; /** - * What has happened to the resource. See [Event Types](#event-types) for the possible actions. + * What has happened to the resource. See + * Event Types for the + * possible actions. */ public String getAction() { return action; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -51,8 +57,9 @@ public String getCreatedAt() { /** * Present only in webhooks when an integrator is authorised to send their own notifications. - * See [here](/getting-started/api/handling-customer-notifications/) for further information. - * + * See here + * for further information. */ public List getCustomerNotifications() { return customerNotifications; @@ -77,9 +84,8 @@ public Links getLinks() { * The metadata that was passed when making the API request that triggered the event (for * instance, cancelling a mandate). * - * This field will only be populated if the `details[origin]` field is `api` otherwise it will - * be an empty object. - * + * This field will only be populated if the details[origin] field is + * api otherwise it will be an empty object. */ public Map getMetadata() { return metadata; @@ -87,9 +93,8 @@ public Map getMetadata() { /** * The metadata of the resource that the event is for. For example, this field will have the - * same value of the `mandate[metadata]` field on the response you would receive from performing - * a GET request on a mandate. - * + * same value of the mandate[metadata] field on the response you would receive from + * performing a GET request on a mandate. */ public Map getResourceMetadata() { return resourceMetadata; @@ -98,9 +103,21 @@ public Map getResourceMetadata() { /** * The resource type for this event. 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 ResourceType getResourceType() { return resourceType; @@ -170,8 +187,9 @@ public Boolean getMandatory() { } /** - * See [here](#core-endpoints-customer-notifications) for a complete list of customer - * notification types. + * See here + * for a complete list of customer notification types. */ public String getType() { return type; @@ -201,32 +219,32 @@ private Details() { private Boolean willAttemptRetry; /** - * When we send a creditor `new_payout_currency_added` webhook, we also send the bank - * account id of the new account + * When we send a creditor new_payout_currency_added webhook, we also send the + * bank account id of the new account */ public String getBankAccountId() { return bankAccountId; } /** - * What triggered the event. _Note:_ `cause` is our simplified and predictable key - * indicating what triggered the event. + * What triggered the event. Note: cause is our simplified and + * predictable key indicating what triggered the event. */ public String getCause() { return cause; } /** - * When we send a creditor `new_payout_currency_added` webhook, we also send the currency of - * the new account + * When we send a creditor new_payout_currency_added webhook, we also send the + * currency of the new account */ public String getCurrency() { return currency; } /** - * Human readable description of the cause. _Note:_ Changes to event descriptions are not - * considered breaking. + * Human readable description of the cause. Note: Changes to event descriptions are + * not considered breaking. */ public String getDescription() { return description; @@ -243,9 +261,12 @@ public Integer getItemCount() { * When will_attempt_retry is set to false, this field will contain the reason the payment * was not retried. This can be one of: * - * - `failure_filter_applied`: The payment won't be intelligently retried as there is a high - * likelihood of failure on retry. - `other`: The payment won't be intelligently retried due - * to any other reason. + *
    + *
  • failure_filter_applied: The payment won't be intelligently retried as + * there is a high likelihood of failure on retry.
  • + *
  • other: The payment won't be intelligently retried due to any other + * reason.
  • + *
*/ public String getNotRetriedReason() { return notRetriedReason; @@ -254,29 +275,33 @@ public String getNotRetriedReason() { /** * Who initiated the event. One of: * - * - `bank`: this event was triggered by a report from the banks - `gocardless`: this event - * was performed by GoCardless automatically - `api`: this event was triggered by an API - * endpoint - `customer`: this event was triggered by a Customer - `payer`: this event was - * triggered by a Payer + *
    + *
  • bank: this event was triggered by a report from the banks
  • + *
  • gocardless: this event was performed by GoCardless automatically
  • + *
  • api: this event was triggered by an API endpoint
  • + *
  • customer: this event was triggered by a Customer
  • + *
  • payer: this event was triggered by a Payer
  • + *
*/ public Origin getOrigin() { return origin; } /** - * When we send a creditor `creditor_updated` webhook, this tells you which property on the - * creditor has been updated + * When we send a creditor creditor_updated webhook, this tells you which + * property on the creditor has been updated */ public String getProperty() { return property; } /** - * Set when a `bank` is the origin of the event. This is the reason code received in the - * report from the customer's bank. See the [GoCardless Direct Debit - * guide](https://gocardless.com/direct-debit/receiving-messages) for information on the - * meanings of different reason codes. _Note:_ `reason_code` is payment scheme-specific and - * can be inconsistent between banks. + * Set when a bank is the origin of the event. This is the reason code received + * in the report from the customer's bank. See the + * GoCardless Direct Debit + * guide for information on the meanings of different reason codes. Note: + * reason_code is payment scheme-specific and can be inconsistent between + * banks. */ public String getReasonCode() { return reasonCode; @@ -359,59 +384,72 @@ private Links() { private String subscription; /** - * ID of a [bank authorisation](#billing-requests-bank-authorisations). + * ID of a bank + * authorisation. */ public String getBankAuthorisation() { return bankAuthorisation; } /** - * ID of a [billing request](#billing-requests-billing-requests). + * ID of a billing + * request. */ public String getBillingRequest() { return billingRequest; } /** - * ID of a [billing request flow](#billing-requests-billing-request-flows). + * ID of a billing + * request flow. */ public String getBillingRequestFlow() { return billingRequestFlow; } /** - * If `resource_type` is `creditor`, this is the ID of the - * [creditor](#core-endpoints-creditors) which has been updated. + * If resource_type is creditor, this is the ID of the creditor + * which has been updated. */ public String getCreditor() { return creditor; } /** - * ID of a [customer](#core-endpoints-customers). + * ID of a customer. */ public String getCustomer() { return customer; } /** - * ID of a [customer bank account](#core-endpoints-customer-bank-accounts). + * ID of a customer + * bank account. */ public String getCustomerBankAccount() { return customerBankAccount; } /** - * If `resource_type` is `instalment_schedule`, this is the ID of the [instalment - * schedule](#core-endpoints-instalment-schedules) which has been updated. + * If resource_type is instalment_schedule, this is the ID of the + * instalment + * schedule which has been updated. */ public String getInstalmentSchedule() { return instalmentSchedule; } /** - * If `resource_type` is `mandates`, this is the ID of the - * [mandate](#core-endpoints-mandates) which has been updated. + * If resource_type is mandates, this is the ID of the mandate + * which has been updated. */ public String getMandate() { return mandate; @@ -425,41 +463,46 @@ public String getMandateRequest() { } /** - * If `resource_type` is `billing_requests`, this is the ID of the - * [mandate](#core-endpoints-mandates) which has been created. + * If resource_type is billing_requests, this is the ID of the + * mandate + * which has been created. */ public String getMandateRequestMandate() { return mandateRequestMandate; } /** - * This is only included for mandate transfer events, when it is the ID of the [customer - * bank account](#core-endpoints-customer-bank-accounts) which the mandate is being - * transferred to. + * This is only included for mandate transfer events, when it is the ID of the customer + * bank account which the mandate is being transferred to. */ public String getNewCustomerBankAccount() { return newCustomerBankAccount; } /** - * This is only included for mandate replaced events, when it is the ID of the new - * [mandate](#core-endpoints-mandates) that replaces the existing mandate. + * This is only included for mandate replaced events, when it is the ID of the new mandate + * that replaces the existing mandate. */ public String getNewMandate() { return newMandate; } /** - * If the event is included in a [webhook](#webhooks-overview) to an [OAuth - * app](#appendix-oauth), this is the ID of the account to which it belongs. + * If the event is included in a + * webhook + * to an OAuth + * app, this is the ID of the account to which it belongs. */ public String getOrganisation() { return organisation; } /** - * If `resource_type` is `outbound_payments`, this is the ID of the outbound_payment which - * has been updated. + * If resource_type is outbound_payments, this is the ID of the + * outbound_payment which has been updated. */ public String getOutboundPayment() { return outboundPayment; @@ -476,72 +519,83 @@ public String getParentEvent() { } /** - * ID of a [payer authorisation](#core-endpoints-payer-authorisations). + * ID of a payer + * authorisation. */ public String getPayerAuthorisation() { return payerAuthorisation; } /** - * If `resource_type` is `payments`, this is the ID of the - * [payment](#core-endpoints-payments) which has been updated. + * If resource_type is payments, this is the ID of the payment + * which has been updated. */ public String getPayment() { return payment; } /** - * If `resource_type` is `payment_account_transaction`, this is the ID of a transaction - * which has been recorded on the payment account. + * If resource_type is payment_account_transaction, this is the ID + * of a transaction which has been recorded on the payment account. */ public String getPaymentAccountTransaction() { return paymentAccountTransaction; } /** - * If `resource_type` is `billing_requests`, this is the ID of the - * [payment](#core-endpoints-payments) which has been created for Pay by Bank. + * If resource_type is billing_requests, this is the ID of the + * payment + * which has been created for Pay by Bank. */ public String getPaymentRequestPayment() { return paymentRequestPayment; } /** - * If `resource_type` is `payouts`, this is the ID of the [payout](#core-endpoints-payouts) - * which has been updated. + * If resource_type is payouts, this is the ID of the payout which + * has been updated. */ public String getPayout() { return payout; } /** - * This is only included for mandate transfer events, when it is the ID of the [customer - * bank account](#core-endpoints-customer-bank-accounts) which the mandate is being - * transferred from. + * This is only included for mandate transfer events, when it is the ID of the customer + * bank account which the mandate is being transferred from. */ public String getPreviousCustomerBankAccount() { return previousCustomerBankAccount; } /** - * If `resource_type` is `refunds`, this is the ID of the [refund](#core-endpoints-refunds) - * which has been updated. + * If resource_type is refunds, this is the ID of the refund which + * has been updated. */ public String getRefund() { return refund; } /** - * If `resource_type` is `scheme_identifiers`, this is the ID of the - * [scheme_identifier](#core-endpoints-scheme-identifiers) which has been updated. + * If resource_type is scheme_identifiers, this is the ID of the + * scheme_identifier + * which has been updated. */ public String getSchemeIdentifier() { return schemeIdentifier; } /** - * If `resource_type` is `subscription`, this is the ID of the - * [subscription](#core-endpoints-subscriptions) which has been updated. + * If resource_type is subscription, this is the ID of the + * subscription + * which has been updated. */ public String getSubscription() { return subscription; diff --git a/src/main/java/com/gocardless/resources/Export.java b/src/main/java/com/gocardless/resources/Export.java index 72bcd52c..77418503 100644 --- a/src/main/java/com/gocardless/resources/Export.java +++ b/src/main/java/com/gocardless/resources/Export.java @@ -20,7 +20,9 @@ private Export() { private String id; /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; diff --git a/src/main/java/com/gocardless/resources/InstalmentSchedule.java b/src/main/java/com/gocardless/resources/InstalmentSchedule.java index 12f3ef14..0673dda3 100644 --- a/src/main/java/com/gocardless/resources/InstalmentSchedule.java +++ b/src/main/java/com/gocardless/resources/InstalmentSchedule.java @@ -8,16 +8,15 @@ * Represents a instalment schedule resource returned from the API. * * Instalment schedules are objects which represent a collection of related payments, with the - * intention to collect the `total_amount` specified. The API supports both schedule-based creation - * (similar to subscriptions) as well as explicit selection of differing payment amounts and charge - * dates. + * intention to collect the total_amount specified. The API supports both + * schedule-based creation (similar to subscriptions) as well as explicit selection of differing + * payment amounts and charge dates. * * Unlike subscriptions, the payments are created immediately, so the instalment schedule cannot be * modified once submitted and instead can only be cancelled (which will cancel any of the payments * which have not yet been submitted). * * Customers will receive a single notification about the complete schedule of collection. - * */ public class InstalmentSchedule { private InstalmentSchedule() { @@ -35,15 +34,17 @@ private InstalmentSchedule() { private Integer totalAmount; /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; } /** - * [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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public Currency getCurrency() { return currency; @@ -80,9 +81,9 @@ public String getName() { } /** - * If the status is `creation_failed`, this property will be populated with validation failures - * from the individual payments, arranged by the index of the payment that failed. - * + * If the status is creation_failed, this property will be populated with + * validation failures from the individual payments, arranged by the index of the payment that + * failed. */ public Map getPaymentErrors() { return paymentErrors; @@ -91,11 +92,15 @@ public Map getPaymentErrors() { /** * One of: * - * - `pending`: we're waiting for GC to create the payments - `active`: the payments have been - * created, and the schedule is active - `creation_failed`: payment creation failed - - * `completed`: we have passed the date of the final payment and all payments have been - * collected - `cancelled`: the schedule has been cancelled - `errored`: one or more payments - * have failed + *
    + *
  • pending: we're waiting for GC to create the payments
  • + *
  • active: the payments have been created, and the schedule is active
  • + *
  • creation_failed: payment creation failed
  • + *
  • completed: we have passed the date of the final payment and all payments + * have been collected
  • + *
  • cancelled: the schedule has been cancelled
  • + *
  • errored: one or more payments have failed
  • + *
*/ public Status getStatus() { return status; @@ -149,22 +154,25 @@ private Links() { private List payments; /** - * ID of the associated [customer](#core-endpoints-customers). + * ID of the associated customer. */ public String getCustomer() { return customer; } /** - * ID of the associated [mandate](#core-endpoints-mandates) which the instalment schedule - * will create payments against. + * ID of the associated mandate + * which the instalment schedule will create payments against. */ public String getMandate() { return mandate; } /** - * Array of IDs of the associated [payments](#core-endpoints-payments) + * Array of IDs of the associated payments */ public List getPayments() { return payments; diff --git a/src/main/java/com/gocardless/resources/Institution.java b/src/main/java/com/gocardless/resources/Institution.java index e6f38aa2..60965687 100644 --- a/src/main/java/com/gocardless/resources/Institution.java +++ b/src/main/java/com/gocardless/resources/Institution.java @@ -7,8 +7,9 @@ /** * Represents a institution resource returned from the API. * - * 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 for a particular country or purpose. * * Not all institutions support both Payment Initiation (PIS) and Account Information (AIS) * services. @@ -38,10 +39,10 @@ public Boolean getAutocompletesCollectBankAccount() { } /** - * [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. + * ISO + * 3166-1 alpha-2 code. The country code of the institution. If nothing is provided, + * institutions with the country code 'GB' are returned by default. */ public String getCountryCode() { return countryCode; diff --git a/src/main/java/com/gocardless/resources/Logo.java b/src/main/java/com/gocardless/resources/Logo.java index 326038b9..32357763 100644 --- a/src/main/java/com/gocardless/resources/Logo.java +++ b/src/main/java/com/gocardless/resources/Logo.java @@ -3,8 +3,9 @@ /** * Represents a logo resource returned from the API. * - * 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 payment pages. */ public class Logo { private Logo() { diff --git a/src/main/java/com/gocardless/resources/Mandate.java b/src/main/java/com/gocardless/resources/Mandate.java index aef7da58..79f55f77 100644 --- a/src/main/java/com/gocardless/resources/Mandate.java +++ b/src/main/java/com/gocardless/resources/Mandate.java @@ -6,10 +6,12 @@ /** * Represents a mandate resource returned from the API. * - * Mandates represent the Direct Debit mandate with a [customer](#core-endpoints-customers). + * Mandates represent the Direct Debit mandate with a + * customer. * - * GoCardless will notify you via a [webhook](#appendix-webhooks) whenever the status of a mandate - * changes. + * GoCardless will notify you via a + * webhook whenever + * the status of a mandate changes. */ public class Mandate { private Mandate() { @@ -34,14 +36,13 @@ private Mandate() { private String verifiedAt; /** - * 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. * * 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 AuthorisationSource getAuthorisationSource() { return authorisationSource; @@ -63,7 +64,9 @@ public ConsentType getConsentType() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -72,10 +75,12 @@ public String getCreatedAt() { /** * This field will decide how GoCardless handles settlement of funds from the customer. * - * - `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. - * + *
    + *
  • 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 FundsSettlement getFundsSettlement() { return fundsSettlement; @@ -109,17 +114,17 @@ public Map getMetadata() { } /** - * The earliest date that can be used as a `charge_date` on any newly created payment for this - * mandate. This value will change over time. + * The earliest date that can be used as a charge_date on any newly created payment + * for this mandate. This value will change over time. */ public String getNextPossibleChargeDate() { return nextPossibleChargeDate; } /** - * If this is an an ACH mandate, the earliest date that can be used as a `charge_date` on any - * newly created payment to be charged through standard ACH, rather than Faster ACH. This value - * will change over time. + * If this is an an ACH mandate, the earliest date that can be used as a + * charge_date on any newly created payment to be charged through standard ACH, + * rather than Faster ACH. This value will change over time. * * It is only present in the API response for ACH mandates. */ @@ -136,9 +141,10 @@ public Boolean getPaymentsRequireApproval() { } /** - * 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 requirements. GoCardless will generate a unique reference satisfying the different + * scheme requirements if this field is left blank. */ public String getReference() { return reference; @@ -156,22 +162,31 @@ public String getScheme() { /** * One of: * - * - `pending_customer_approval`: the mandate has not yet been signed by the second customer - - * `pending_submission`: the mandate has not yet been submitted to the customer's bank - - * `submitted`: the mandate has been submitted to the customer's bank but has not been processed - * yet - `active`: the mandate has been successfully set up by the customer's bank - - * `suspended_by_payer`: the mandate has been suspended by payer - `failed`: the mandate could - * not be created - `cancelled`: the mandate has been cancelled - `expired`: the mandate has - * expired due to dormancy - `consumed`: the mandate has been consumed and cannot be reused - * (note that this only applies to schemes that are per-payment authorised) - `blocked`: the - * mandate has been blocked and payments cannot be created + *
    + *
  • pending_customer_approval: the mandate has not yet been signed by the second + * customer
  • + *
  • pending_submission: the mandate has not yet been submitted to the customer's + * bank
  • + *
  • submitted: the mandate has been submitted to the customer's bank but has not + * been processed yet
  • + *
  • active: the mandate has been successfully set up by the customer's bank
  • + *
  • suspended_by_payer: the mandate has been suspended by payer
  • + *
  • failed: the mandate could not be created
  • + *
  • cancelled: the mandate has been cancelled
  • + *
  • expired: the mandate has expired due to dormancy
  • + *
  • consumed: the mandate has been consumed and cannot be reused (note that this + * only applies to schemes that are per-payment authorised)
  • + *
  • blocked: the mandate has been blocked and payments cannot be created
  • + *
*/ public Status getStatus() { return status; } /** - * [Timestamp](#api-usage-dates-and-times) recording when this mandate was verified. + * Timestamp + * recording when this mandate was verified. */ public String getVerifiedAt() { return verifiedAt; @@ -313,22 +328,25 @@ private Links() { private String newMandate; /** - * ID of the associated [creditor](#core-endpoints-creditors). + * ID of the associated creditor. */ public String getCreditor() { return creditor; } /** - * ID of the associated [customer](#core-endpoints-customers) + * ID of the associated customer */ public String getCustomer() { return customer; } /** - * ID of the associated [customer bank account](#core-endpoints-customer-bank-accounts) - * which the mandate is created and submits payments against. + * ID of the associated customer + * bank account which the mandate is created and submits payments against. */ public String getCustomerBankAccount() { return customerBankAccount; diff --git a/src/main/java/com/gocardless/resources/MandateImport.java b/src/main/java/com/gocardless/resources/MandateImport.java index 9a6501c7..038b944e 100644 --- a/src/main/java/com/gocardless/resources/MandateImport.java +++ b/src/main/java/com/gocardless/resources/MandateImport.java @@ -10,27 +10,40 @@ * * 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
  2. + *
  3. Add + * entries to the import
  4. + *
  5. Submit + * the import
  6. + *
  7. Wait until a member of the GoCardless team approves the import, at which point the mandates + * will be created
  8. + *
  9. Link + * up the mandates in your system
  10. + *
* 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). + * We will issue a mandate_created webhook for each entry, which will be the same as + * the webhooks triggered when + * creating a + * mandate using the mandates API. Once these webhooks start arriving, any reconciliation can + * now be accomplished by checking + * the current status of the mandate import and linking + * up the mandates to your system. * *

* 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. @@ -48,7 +61,9 @@ private MandateImport() { private Status status; /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -70,6 +85,7 @@ public Links getLinks() { /** * The scheme of the mandates to be imported.
+ *
* All mandates in a single mandate import must be for the same scheme. */ public Scheme getScheme() { @@ -79,12 +95,18 @@ public Scheme getScheme() { /** * The status of the mandate import. * - * - `created`: A new mandate import. - `submitted`: After the integrator has finished adding - * mandates and [submitted](#mandate-imports-submit-a-mandate-import) the import. - `cancelled`: - * If the integrator [cancelled](#mandate-imports-cancel-a-mandate-import) the mandate import. - - * `processing`: Once a mandate import has been approved by a GoCardless team member it will be - * in this state while mandates are imported. - `processed`: When all mandates have been - * imported successfully. + *

    + *
  • created: A new mandate import.
  • + *
  • submitted: After the integrator has finished adding mandates and submitted + * the import.
  • + *
  • cancelled: If the integrator cancelled + * the mandate import.
  • + *
  • processing: Once a mandate import has been approved by a GoCardless team + * member it will be in this state while mandates are imported.
  • + *
  • processed: When all mandates have been imported successfully.
  • + *
*/ public Status getStatus() { return status; diff --git a/src/main/java/com/gocardless/resources/MandateImportEntry.java b/src/main/java/com/gocardless/resources/MandateImportEntry.java index b9557672..32156a6a 100644 --- a/src/main/java/com/gocardless/resources/MandateImportEntry.java +++ b/src/main/java/com/gocardless/resources/MandateImportEntry.java @@ -5,23 +5,26 @@ /** * Represents a mandate import entry resource returned from the API. * - * 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. 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. + * local bank + * details *
  5. Amendment details (SEPA only)
  6. *
- * - * 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. + * 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, 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 - @@ -39,7 +42,9 @@ private MandateImportEntry() { private String recordIdentifier; /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -62,7 +67,6 @@ public Map getProcessingErrors() { /** * 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 String getRecordIdentifier() { return recordIdentifier; @@ -106,9 +110,9 @@ public String getMandate() { } /** - * The ID of the mandate import. This is returned when you [create a Mandate - * Import](#mandate-imports-create-a-new-mandate-import). - * + * The ID of the mandate import. This is returned when you create + * a Mandate Import. */ public String getMandateImport() { return mandateImport; diff --git a/src/main/java/com/gocardless/resources/MandatePdf.java b/src/main/java/com/gocardless/resources/MandatePdf.java index 979b6ad9..4ec8d812 100644 --- a/src/main/java/com/gocardless/resources/MandatePdf.java +++ b/src/main/java/com/gocardless/resources/MandatePdf.java @@ -3,8 +3,9 @@ /** * Represents a mandate pdf resource returned from the API. * - * 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 Direct Debit mandates to your customers. */ public class MandatePdf { private MandatePdf() { @@ -15,7 +16,8 @@ private MandatePdf() { private String url; /** - * The date and time at which the `url` will expire (10 minutes after the original request). + * The date and time at which the url will expire (10 minutes after the original + * request). */ public String getExpiresAt() { return expiresAt; @@ -23,8 +25,8 @@ public String getExpiresAt() { /** * The URL at which this mandate PDF can be viewed until it expires at the date and time - * specified by `expires_at`. You should not store this URL or rely on its structure remaining - * the same. + * specified by expires_at. You should not store this URL or rely on its structure + * remaining the same. */ public String getUrl() { return url; diff --git a/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java b/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java index cdf490ce..1f218606 100644 --- a/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java +++ b/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java @@ -8,7 +8,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 NegativeBalanceLimit { private NegativeBalanceLimit() { @@ -29,15 +28,17 @@ public Integer getBalanceLimit() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this limit was created. + * Fixed timestamp, + * recording when this limit was created. */ public String getCreatedAt() { return createdAt; } /** - * [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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public Currency getCurrency() { return currency; @@ -88,7 +89,9 @@ public String getCreatorUser() { } /** - * ID of [creditor](#core-endpoints-creditors) which this limit relates to + * ID of creditor + * which this limit relates to */ public String getCreditor() { return creditor; diff --git a/src/main/java/com/gocardless/resources/OutboundPayment.java b/src/main/java/com/gocardless/resources/OutboundPayment.java index 27c0649e..9d680c17 100644 --- a/src/main/java/com/gocardless/resources/OutboundPayment.java +++ b/src/main/java/com/gocardless/resources/OutboundPayment.java @@ -6,18 +6,23 @@ /** * Represents a outbound payment resource returned from the API. * - * Outbound Payments represent payments sent from [creditors](#core-endpoints-creditors). + * Outbound Payments represent payments sent from + * 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 when the + * status of the outbound payment changes. * - * #### Rate limiting + *

Rate limiting

Two rate limits apply to the Outbound Payments APIs: * - * 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. + *
    + *
  • All POST Outbound Payment endpoints (create, withdraw, approve, cancel and etc.) share a + * single rate-limit group of 300 requests per minute. As initiating a payment typically requires + * two API calls (one to create the payment and one to approve it), this allows you to add + * approximately 150 outbound payments per minute.
  • + *
  • All remaining Outbound Payment endpoints are limited to 500 requests per minute.
  • + *
*/ public class OutboundPayment { private OutboundPayment() { @@ -46,16 +51,17 @@ public Integer getAmount() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when the outbound payment was - * created. + * Fixed timestamp, + * recording when the outbound payment was created. */ public String getCreatedAt() { return createdAt; } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency. Currently only - * "GBP" is supported. + * ISO 4217 currency. + * Currently only "GBP" is supported. */ public Currency getCurrency() { return currency; @@ -105,9 +111,15 @@ public Map getMetadata() { /** * 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 &-./"
+ * for this reference is dependent on the scheme.
+ *
+ * Faster Payments + *
    + *
  • 18 characters, including: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + * &-./"
  • + *
+ *
+ *
*/ public String getReference() { return reference; @@ -124,16 +136,27 @@ public Scheme getScheme() { /** * 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 + * and the verification process has begun.
  • + *
  • pending_approval: The payment is awaiting approval.
  • + *
  • scheduled: The payment has passed verification & approval, + * 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 + * or was not approved + * on time.
  • + *
  • failed: The payment was not sent, usually due to an error while or after + * executing.
  • + *
*/ public Status getStatus() { return status; @@ -193,7 +216,9 @@ public String getCreditor() { } /** - * ID of the [customer](#core-endpoints-customers) that receives this outbound payment + * ID of the customer + * that receives this outbound payment */ public String getCustomer() { return customer; @@ -258,20 +283,25 @@ public String getActualAccountName() { /** * Result of the verification, could be one of * - * - `full_match`: The verification has confirmed that the account name exactly matches - * the details provided. - `partial_match`: The verification has confirmed that the - * account name is similar but does not match to the details provided. - `no_match`: The - * verification concludes the provided name does not match the account details. - - * `unable_to_match`: The verification could not be performed due to recipient bank - * issues or technical issues + *
    + *
  • full_match: The verification has confirmed that the account name + * exactly matches the details provided.
  • + *
  • partial_match: The verification has confirmed that the account name + * is similar but does not match to the details provided.
  • + *
  • no_match: The verification concludes the provided name does not + * match the account details.
  • + *
  • unable_to_match: The verification could not be performed due to + * recipient bank issues or technical issues
  • + *
*/ public Result getResult() { return result; } /** - * 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 */ public Type getType() { return type; diff --git a/src/main/java/com/gocardless/resources/OutboundPaymentImport.java b/src/main/java/com/gocardless/resources/OutboundPaymentImport.java index 01f6193f..2a175ca5 100644 --- a/src/main/java/com/gocardless/resources/OutboundPaymentImport.java +++ b/src/main/java/com/gocardless/resources/OutboundPaymentImport.java @@ -7,10 +7,15 @@ * * 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. + *
  3. Retrieve an authorisation link from the response.
  4. + *
  5. Redirect the user to the link to authorise the import.
  6. + *
  7. Once the user authorises the import, the individual outbound payments are automatically + * submitted.
  8. + *
* 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. @@ -50,15 +55,17 @@ public String getAuthorisationUrl() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency. Currently only - * "GBP" is supported. + * ISO 4217 currency. + * Currently only "GBP" is supported. */ public Currency getCurrency() { return currency; @@ -82,11 +89,17 @@ public Links getLinks() { /** * 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 Status getStatus() { return status; diff --git a/src/main/java/com/gocardless/resources/OutboundPaymentImportEntry.java b/src/main/java/com/gocardless/resources/OutboundPaymentImportEntry.java index f82c6950..b9d71c55 100644 --- a/src/main/java/com/gocardless/resources/OutboundPaymentImportEntry.java +++ b/src/main/java/com/gocardless/resources/OutboundPaymentImportEntry.java @@ -34,7 +34,9 @@ public Integer getAmount() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -60,7 +62,9 @@ public Map getMetadata() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this entry was processed. + * Fixed timestamp, + * recording when this entry was processed. */ public String getProcessedAt() { return processedAt; diff --git a/src/main/java/com/gocardless/resources/PayerAuthorisation.java b/src/main/java/com/gocardless/resources/PayerAuthorisation.java index daab01f9..1f0c5c59 100644 --- a/src/main/java/com/gocardless/resources/PayerAuthorisation.java +++ b/src/main/java/com/gocardless/resources/PayerAuthorisation.java @@ -12,41 +12,46 @@ * Billing * Requests. 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 * custom payment pages. * * The process to use the Payer Authorisation API is as follows: * - * 1. Create a Payer Authorisation, either empty or with already available information 2. Update the - * authorisation with additional information or fix any mistakes 3. Submit the authorisation, after - * the payer has reviewed their information 4. [coming soon] Redirect the payer to the verification - * mechanisms from the response of the Submit request (this will be introduced as a non-breaking - * change) 5. Confirm the authorisation to indicate that the resources can be created - * + *
    + *
  1. Create a Payer Authorisation, either empty or with already available information
  2. + *
  3. Update the authorisation with additional information or fix any mistakes
  4. + *
  5. Submit the authorisation, after the payer has reviewed their information
  6. + *
  7. [coming soon] Redirect the payer to the verification mechanisms from the response of the + * Submit request (this will be introduced as a non-breaking change)
  8. + *
  9. Confirm the authorisation to indicate that the resources can be created
  10. + *
* After the Payer Authorisation is confirmed, resources will eventually be created as it's an * 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 + *
  4. Listen to payer_authorisation_completed + * webhook + * (recommended)
  5. + *
  6. Poll the GET * endpoint
  7. *
  8. Poll the GET events API - * https://api.gocardless.com/events?payer_authorisation={id}&action=completed
  9. + * 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 + * account details(account_number, bank_code & branch_code) must be sent together rather than * splitting across different request for both create and update * 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. *

@@ -66,22 +71,26 @@ private PayerAuthorisation() { private Status status; /** - * 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. */ public BankAccount getBankAccount() { return bankAccount; } /** - * [Timestamp](#api-usage-dates-and-times), recording when this Payer Authorisation was created. + * Timestamp, + * recording when this Payer Authorisation was created. */ public String getCreatedAt() { return createdAt; } /** - * All details required for the creation of a [Customer](#core-endpoints-customers). + * All details required for the creation of a Customer. */ public Customer getCustomer() { return customer; @@ -109,7 +118,8 @@ public Links getLinks() { } /** - * All details required for the creation of a [Mandate](#core-endpoints-mandates). + * All details required for the creation of a Mandate. */ public Mandate getMandate() { return mandate; @@ -118,11 +128,17 @@ public Mandate getMandate() { /** * One of: * - * - `created`: The PayerAuthorisation has been created, and not been confirmed yet - - * `submitted`: The payer information has been submitted - `confirmed`: PayerAuthorisation is - * confirmed and resources are ready to be created - `completed`: The PayerAuthorisation has - * been completed and customer, bank_account and mandate has been created - `failed`: The - * PayerAuthorisation has failed and customer, bank_account and mandate is not created + *
    + *
  • created: The PayerAuthorisation has been created, and not been confirmed + * yet
  • + *
  • submitted: The payer information has been submitted
  • + *
  • confirmed: PayerAuthorisation is confirmed and resources are ready to be + * created
  • + *
  • completed: The PayerAuthorisation has been completed and customer, + * bank_account and mandate has been created
  • + *
  • failed: The PayerAuthorisation has failed and customer, bank_account and + * mandate is not created
  • + *
*/ public Status getStatus() { return status; @@ -141,8 +157,9 @@ public enum Status { /** * Represents a bank account resource returned from the API. * - * 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. */ public static class BankAccount { private BankAccount() { @@ -165,16 +182,18 @@ private 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. */ public String getAccountHolderName() { return 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 for more information. Alternatively you can provide an iban. */ public String getAccountNumber() { return accountNumber; @@ -189,8 +208,9 @@ public String getAccountNumberEnding() { } /** - * 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 for more information. */ public String getAccountNumberSuffix() { return accountNumberSuffix; @@ -198,50 +218,57 @@ public String getAccountNumberSuffix() { /** * 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 for more information. */ public AccountType getAccountType() { return accountType; } /** - * Bank code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Bank code - see local + * details for more information. Alternatively you can provide an iban. */ public String getBankCode() { return bankCode; } /** - * Branch code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Branch code - see local + * details for more information. Alternatively you can provide an iban. */ public String getBranchCode() { return branchCode; } /** - * [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. + * ISO + * 3166-1 alpha-2 code. Defaults to the country code of the iban if + * supplied, otherwise is required. */ public String getCountryCode() { return countryCode; } /** - * [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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public String getCurrency() { return 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. IBANs are not accepted for Swedish bank accounts denominated in SEK - you + * must supply + * local + * details. */ public String getIban() { return iban; @@ -266,7 +293,8 @@ public enum AccountType { /** * Represents a customer resource returned from the API. * - * All details required for the creation of a [Customer](#core-endpoints-customers). + * All details required for the creation of a Customer. */ public static class Customer { private Customer() { @@ -318,18 +346,20 @@ public String getCity() { } /** - * Customer's company name. Required unless a `given_name` and `family_name` are provided. - * For Canadian customers, the use of a `company_name` value will mean that any mandate - * created from this customer will be considered to be a "Business PAD" (otherwise, any - * mandate will be considered to be a "Personal PAD"). + * Customer's company name. Required unless a given_name and + * family_name are provided. For Canadian customers, the use of a + * company_name value will mean that any mandate created from this customer + * will be considered to be a "Business PAD" (otherwise, any mandate will be considered to + * be a "Personal PAD"). */ public String getCompanyName() { return 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. */ public String getCountryCode() { return countryCode; @@ -352,23 +382,22 @@ public String getEmail() { } /** - * Customer's surname. Required unless a `company_name` is provided. + * Customer's surname. Required unless a company_name is provided. */ public String getFamilyName() { return familyName; } /** - * Customer's first name. Required unless a `company_name` is provided. + * Customer's first name. Required unless a company_name is provided. */ public String getGivenName() { return givenName; } /** - * An [IETF Language Tag](https://tools.ietf.org/html/rfc5646), used for both language and - * regional variations of our product. - * + * An IETF Language Tag, used for both + * language and regional variations of our product. */ public String getLocale() { return locale; @@ -391,8 +420,8 @@ public String getPostalCode() { /** * 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. - * `CA` for California). + * ISO3166-2:US state code is + * required (e.g. CA for California). */ public String getRegion() { return region; @@ -484,7 +513,8 @@ public String getMandate() { /** * Represents a mandate resource returned from the API. * - * All details required for the creation of a [Mandate](#core-endpoints-mandates). + * All details required for the creation of a Mandate. */ public static class Mandate { private Mandate() { @@ -509,18 +539,18 @@ public Map getMetadata() { * the payer to whom the mandate belongs (i.e. as a result of their completion of a mandate * setup flow in their browser). * - * Not required for creating offline mandates where `authorisation_source` is set to - * telephone or paper. - * + * Not required for creating offline mandates where authorisation_source is set + * to telephone or paper. */ public String getPayerIpAddress() { return 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 requirements. GoCardless will generate a unique reference satisfying the + * different scheme requirements if this field is left blank. */ public String getReference() { return reference; diff --git a/src/main/java/com/gocardless/resources/Payment.java b/src/main/java/com/gocardless/resources/Payment.java index 1e99ea2d..6979116c 100644 --- a/src/main/java/com/gocardless/resources/Payment.java +++ b/src/main/java/com/gocardless/resources/Payment.java @@ -6,12 +6,16 @@ /** * Represents a payment resource returned from the API. * - * 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 + * to a + * creditor, + * taken against a Direct Debit + * mandate. * - * GoCardless will notify you via a [webhook](#appendix-webhooks) whenever the state of a payment - * changes. + * GoCardless will notify you via a + * webhook whenever + * the state of a payment changes. */ public class Payment { private Payment() { @@ -37,19 +41,21 @@ 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) + * Minimum and maximum amounts vary by payment scheme. For more information, see Transaction + * limits * * For Variable Recurring Payments (VRP), this must not exceed the mandate's - * `max_amount_per_payment` constraint. + * max_amount_per_payment constraint. */ public Integer getAmount() { return amount; } /** - * Amount [refunded](#core-endpoints-refunds), in the lowest denomination for the currency (e.g. - * pence in GBP, cents in EUR). + * Amount refunded, in the + * lowest denomination for the currency (e.g. pence in GBP, cents in EUR). */ public Integer getAmountRefunded() { return amountRefunded; @@ -57,24 +63,27 @@ public Integer getAmountRefunded() { /** * 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. + * collected as soon as possible. If the value is before the mandate'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 String getChargeDate() { return chargeDate; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; } /** - * [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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public Currency getCurrency() { return currency; @@ -83,7 +92,9 @@ public Currency getCurrency() { /** * 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)). + * (see compliance + * requirements). */ public String getDescription() { return description; @@ -123,25 +134,76 @@ public Map getMetadata() { /** * 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
+ * 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. + * GoCardless Plus, Pro or Enterprise packages. *

- *

+ *

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

*/ @@ -150,11 +212,12 @@ public String getReference() { } /** - * On failure, automatically retry the payment using [intelligent - * retries](/success-plus/overview). Default is `false`. + * On failure, automatically retry the payment using + * intelligent retries. + * Default is false. *

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

*/ public Boolean getRetryIfPossible() { @@ -173,15 +236,22 @@ public String getScheme() { /** * 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
  • + *
  • 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 Status getStatus() { return status; @@ -230,35 +300,37 @@ private Fx() { private FxCurrency fxCurrency; /** - * Estimated rate that will be used in the foreign exchange of the `amount` into the - * `fx_currency`. This will vary based on the prevailing market rate until the moment that - * it is paid out. Present only before a resource is paid out. Has up to 10 decimal places. + * Estimated rate that will be used in the foreign exchange of the amount into + * the fx_currency. This will vary based on the prevailing market rate until + * the moment that it is paid out. Present only before a resource is paid out. Has up to 10 + * decimal places. */ public String getEstimatedExchangeRate() { return estimatedExchangeRate; } /** - * Rate used in the foreign exchange of the `amount` into the `fx_currency`. Present only - * after a resource is paid out. Has up to 10 decimal places. + * Rate used in the foreign exchange of the amount into the + * fx_currency. Present only after a resource is paid out. Has up to 10 decimal + * places. */ public String getExchangeRate() { return exchangeRate; } /** - * Amount that was paid out in the `fx_currency` after foreign exchange. Present only after - * the resource has been paid out. + * Amount that was paid out in the fx_currency after foreign exchange. Present + * only after the resource has been paid out. */ public Integer getFxAmount() { return fxAmount; } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the currency in - * which amounts will be paid out (after foreign exchange). Currently "AUD", "CAD", "DKK", - * "EUR", "GBP", "NZD", "SEK" and "USD" are supported. Present only if payouts will be (or - * were) made via foreign exchange. + * ISO 4217 code for the + * currency in which amounts will be paid out (after foreign exchange). Currently "AUD", + * "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. Present only if payouts + * will be (or were) made via foreign exchange. */ public FxCurrency getFxCurrency() { return fxCurrency; @@ -295,33 +367,41 @@ private Links() { private String subscription; /** - * ID of [creditor](#core-endpoints-creditors) to which the collected payment will be sent. + * ID of creditor + * to which the collected payment will be sent. */ public String getCreditor() { return creditor; } /** - * ID of [instalment_schedule](#core-endpoints-instalment-schedules) from which this payment - * was created.
- * **Note**: this property will only be present if this payment is part of an instalment - * schedule. + * ID of instalment_schedule + * from which this payment was created.
+ *
+ * Note: this property will only be present if this payment is part of an + * instalment schedule. */ public String getInstalmentSchedule() { return instalmentSchedule; } /** - * ID of the [mandate](#core-endpoints-mandates) against which this payment should be - * collected. + * ID of the mandate + * against which this payment should be collected. */ public String getMandate() { return mandate; } /** - * ID of [payout](#core-endpoints-payouts) which contains the funds from this payment.
- * _Note_: this property will not be present until the payment has been successfully + * ID of payout which + * contains the funds from this payment.
+ *
+ * Note: this property will not be present until the payment has been successfully * collected. */ public String getPayout() { @@ -329,9 +409,12 @@ public String getPayout() { } /** - * ID of [subscription](#core-endpoints-subscriptions) from which this payment was - * created.
- * _Note_: this property will only be present if this payment is part of a subscription. + * ID of subscription + * from which this payment was created.
+ *
+ * Note: this property will only be present if this payment is part of a + * subscription. */ public String getSubscription() { return subscription; diff --git a/src/main/java/com/gocardless/resources/PaymentAccount.java b/src/main/java/com/gocardless/resources/PaymentAccount.java index 70942fcd..3a8d0bd9 100644 --- a/src/main/java/com/gocardless/resources/PaymentAccount.java +++ b/src/main/java/com/gocardless/resources/PaymentAccount.java @@ -3,8 +3,9 @@ /** * Represents a payment account resource returned from the API. * - * Access the details of bank accounts provided for you by GoCardless that are used to fund - * [Outbound Payments](#core-endpoints-outbound-payments). + * Access the details of bank accounts provided for you by GoCardless that are used to fund Outbound + * Payments. */ public class PaymentAccount { private PaymentAccount() { @@ -29,8 +30,9 @@ public Integer getAccountBalance() { /** * 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. + * with the linked creditor. This + * field will be transliterated, upcased and truncated to 18 characters. */ public String getAccountHolderName() { return accountHolderName; @@ -52,8 +54,8 @@ public String getBankName() { } /** - * [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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public String getCurrency() { return currency; @@ -83,7 +85,9 @@ private Links() { private String creditor; /** - * ID of the [creditor](#core-endpoints-creditors) that owns this bank account. + * ID of the creditor + * that owns this bank account. */ public String getCreditor() { return creditor; diff --git a/src/main/java/com/gocardless/resources/PaymentAccountTransaction.java b/src/main/java/com/gocardless/resources/PaymentAccountTransaction.java index 621511fd..32c2b8ad 100644 --- a/src/main/java/com/gocardless/resources/PaymentAccountTransaction.java +++ b/src/main/java/com/gocardless/resources/PaymentAccountTransaction.java @@ -6,8 +6,9 @@ * Represents a payment account transaction resource returned from the API. * * Payment account transactions represent movements of funds on a given payment account. The payment - * account is provisioned by GoCardless and is used to fund [outbound - * payments](#core-endpoints-outbound-payments). + * account is provisioned by GoCardless and is used to fund outbound + * payments. */ public class PaymentAccountTransaction { private PaymentAccountTransaction() { @@ -123,7 +124,9 @@ private Links() { private String payout; /** - * ID of the [outbound_payment](#core-endpoints-outbound-payments) linked to the transaction + * ID of the outbound_payment + * linked to the transaction */ public String getOutboundPayment() { return outboundPayment; @@ -137,7 +140,9 @@ public String getPaymentBankAccount() { } /** - * ID of the [payout](#core-endpoints-payouts) linked to the transaction. + * ID of the payout + * linked to the transaction. */ public String getPayout() { return payout; diff --git a/src/main/java/com/gocardless/resources/Payout.java b/src/main/java/com/gocardless/resources/Payout.java index 2bd039b4..17eed085 100644 --- a/src/main/java/com/gocardless/resources/Payout.java +++ b/src/main/java/com/gocardless/resources/Payout.java @@ -6,9 +6,11 @@ /** * Represents a payout resource returned from the API. * - * 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 + * Payouts represent transfers from GoCardless to a + * creditor. + * Each payout contains the funds collected from one or many + * 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 Payout { @@ -40,24 +42,28 @@ public Integer getAmount() { /** * Date the payout is due to arrive in the creditor's bank account. One of: * - * - `yyyy-mm-dd`: the payout has been paid and is due to arrive in the creditor's bank account - * on this day - `null`: the payout hasn't been paid yet - * + *
    + *
  • yyyy-mm-dd: the payout has been paid and is due to arrive in the creditor's + * bank account on this day
  • + *
  • null: the payout hasn't been paid yet
  • + *
*/ public String getArrivalDate() { return arrivalDate; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; } /** - * [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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public Currency getCurrency() { return currency; @@ -65,13 +71,17 @@ public Currency getCurrency() { /** * Fees that have already been deducted from the payout amount in minor unit (e.g. pence in GBP, - * cents in EUR), inclusive of tax if applicable.
- * For each `late_failure_settled` or `chargeback_settled` action, we refund the transaction - * fees in a payout. This means that a payout can have a negative `deducted_fees` value.
- * This field is calculated as `(GoCardless fees + app fees + surcharge fees) - (refunded fees)` - *
- * If the merchant is invoiced for fees separately from the payout, then `deducted_fees` will be - * 0. + * cents in EUR), inclusive of tax if applicable.
+ *
+ * For each late_failure_settled or chargeback_settled action, we + * refund the transaction fees in a payout. This means that a payout can have a negative + * deducted_fees value.
+ *
+ * This field is calculated as (GoCardless fees + app fees + surcharge fees) - (refunded + * fees)
+ *
+ * If the merchant is invoiced for fees separately from the payout, then + * deducted_fees will be 0. */ public Integer getDeductedFees() { return deductedFees; @@ -94,8 +104,8 @@ public Links getLinks() { /** * 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 Map getMetadata() { return metadata; @@ -118,20 +128,23 @@ public String getReference() { /** * 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 Status getStatus() { return status; } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the currency in - * which tax is paid out to the tax authorities of your tax jurisdiction. Currently “EUR”, - * “GBP”, for French or British merchants, this will be `null` if tax is not applicable - * beta + * ISO 4217 code for the + * currency in which tax is paid out to the tax authorities of your tax jurisdiction. Currently + * “EUR”, “GBP”, for French or British merchants, this will be null if tax is not + * applicable beta */ public String getTaxCurrency() { return taxCurrency; @@ -181,35 +194,37 @@ private Fx() { private FxCurrency fxCurrency; /** - * Estimated rate that will be used in the foreign exchange of the `amount` into the - * `fx_currency`. This will vary based on the prevailing market rate until the moment that - * it is paid out. Present only before a resource is paid out. Has up to 10 decimal places. + * Estimated rate that will be used in the foreign exchange of the amount into + * the fx_currency. This will vary based on the prevailing market rate until + * the moment that it is paid out. Present only before a resource is paid out. Has up to 10 + * decimal places. */ public String getEstimatedExchangeRate() { return estimatedExchangeRate; } /** - * Rate used in the foreign exchange of the `amount` into the `fx_currency`. Present only - * after a resource is paid out. Has up to 10 decimal places. + * Rate used in the foreign exchange of the amount into the + * fx_currency. Present only after a resource is paid out. Has up to 10 decimal + * places. */ public String getExchangeRate() { return exchangeRate; } /** - * Amount that was paid out in the `fx_currency` after foreign exchange. Present only after - * the resource has been paid out. + * Amount that was paid out in the fx_currency after foreign exchange. Present + * only after the resource has been paid out. */ public Integer getFxAmount() { return fxAmount; } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the currency in - * which amounts will be paid out (after foreign exchange). Currently "AUD", "CAD", "DKK", - * "EUR", "GBP", "NZD", "SEK" and "USD" are supported. Present only if payouts will be (or - * were) made via foreign exchange. + * ISO 4217 code for the + * currency in which amounts will be paid out (after foreign exchange). Currently "AUD", + * "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. Present only if payouts + * will be (or were) made via foreign exchange. */ public FxCurrency getFxCurrency() { return fxCurrency; @@ -243,15 +258,18 @@ private Links() { private String creditorBankAccount; /** - * ID of [creditor](#core-endpoints-creditors) who will receive this payout, i.e. the owner - * of the `creditor_bank_account`. + * ID of creditor + * who will receive this payout, i.e. the owner of the creditor_bank_account. */ public String getCreditor() { return creditor; } /** - * ID of [bank account](#core-endpoints-creditor-bank-accounts) which this will be sent to. + * ID of bank + * account which this will be sent to. */ public String getCreditorBankAccount() { return creditorBankAccount; diff --git a/src/main/java/com/gocardless/resources/PayoutItem.java b/src/main/java/com/gocardless/resources/PayoutItem.java index 51c71ea1..46b8c57e 100644 --- a/src/main/java/com/gocardless/resources/PayoutItem.java +++ b/src/main/java/com/gocardless/resources/PayoutItem.java @@ -17,7 +17,6 @@ * 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. - * */ public class PayoutItem { private PayoutItem() { @@ -32,11 +31,14 @@ private PayoutItem() { /** * The positive (credit) or negative (debit) value of the item, in fractional currency; the * lowest denomination for the currency (e.g. pence in GBP, cents in EUR), to one decimal place. + * *

* For accuracy, we store some of our fees to greater precision than we can actually pay out * (for example, a GoCardless fee we record might come to 0.5 pence, but it is not possible to * send a payout via bank transfer including a half penny).
+ *
*
+ *
* To calculate the final amount of the payout, we sum all of the items and then round to the * nearest currency unit. *

@@ -52,8 +54,8 @@ public Links getLinks() { /** * An array of tax items beta * - * _Note_: VAT applies to transaction and surcharge fees for merchants operating in the UK and - * France. + * Note: VAT applies to transaction and surcharge fees for merchants operating in the + * UK and France. */ public List getTaxes() { return taxes; @@ -63,22 +65,27 @@ public List getTaxes() { * The type of the credit (positive) or debit (negative) item in the payout (inclusive of VAT if * applicable). One of: * - * - `payment_paid_out` (credit) - `payment_failed` (debit): The payment failed to be processed. - * - `payment_charged_back` (debit): The payment has been charged back. - `payment_refunded` - * (debit): The payment has been refunded to the customer. - `refund` (debit): A refund sent to - * a customer, not linked to a payment. - `refund_funds_returned` (credit): The refund could not - * be sent to the customer, and the funds have been returned to you. - `gocardless_fee` - * (credit/debit): The fees that GoCardless charged for a payment. In the case of a payment - * failure or chargeback, these will appear as credits. Will include taxes if applicable for - * merchants. - `app_fee` (credit/debit): The optional fees that a partner may have taken for a - * payment. In the case of a payment failure or chargeback, these will appear as credits. - - * `revenue_share` (credit/debit): A share of the fees that GoCardless collected which some - * partner integrations receive when their users take payments. Only shown in partner payouts. - * In the case of a payment failure or chargeback, these will appear as credits. - - * `surcharge_fee` (credit/debit): GoCardless deducted a surcharge fee as the payment failed or - * was charged back, or refunded a surcharge fee as the bank or customer cancelled the - * chargeback. Will include taxes if applicable for merchants. - * + *
    + *
  • payment_paid_out (credit)
  • + *
  • payment_failed (debit): The payment failed to be processed.
  • + *
  • payment_charged_back (debit): The payment has been charged back.
  • + *
  • payment_refunded (debit): The payment has been refunded to the + * customer.
  • + *
  • refund (debit): A refund sent to a customer, not linked to a payment.
  • + *
  • refund_funds_returned (credit): The refund could not be sent to the + * customer, and the funds have been returned to you.
  • + *
  • gocardless_fee (credit/debit): The fees that GoCardless charged for a + * payment. In the case of a payment failure or chargeback, these will appear as credits. Will + * include taxes if applicable for merchants.
  • + *
  • app_fee (credit/debit): The optional fees that a partner may have taken for + * a payment. In the case of a payment failure or chargeback, these will appear as credits.
  • + *
  • revenue_share (credit/debit): A share of the fees that GoCardless collected + * which some partner integrations receive when their users take payments. Only shown in partner + * payouts. In the case of a payment failure or chargeback, these will appear as credits.
  • + *
  • surcharge_fee (credit/debit): GoCardless deducted a surcharge fee as the + * payment failed or was charged back, or refunded a surcharge fee as the bank or customer + * cancelled the chargeback. Will include taxes if applicable for merchants.
  • + *
*/ public Type getType() { return type; @@ -115,8 +122,8 @@ private Links() { /** * Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates - * created before 2016. Present only for the items of type `payment_refunded`, `refund` and - * `refund_funds_returned`. + * created before 2016. Present only for the items of type payment_refunded, + * refund and refund_funds_returned. */ public String getMandate() { return mandate; @@ -131,7 +138,8 @@ public String getPayment() { /** * Unique identifier, beginning with "RF". Present only for the items of type - * `payment_refunded`, `refund` and `refund_funds_returned`. + * payment_refunded, refund and + * refund_funds_returned. */ public String getRefund() { return refund; @@ -164,8 +172,8 @@ public String getAmount() { } /** - * [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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public Currency getCurrency() { return currency; @@ -176,17 +184,17 @@ public Currency getCurrency() { * lowest denomination for the currency (e.g. pence in GBP, cents in EUR), to one decimal * place. * - * When `currency` and `destination_currency` don't match this will be `null` until the - * `exchange_rate` has been finalised. + * When currency and destination_currency don't match this will be + * null until the exchange_rate has been finalised. */ public String getDestinationAmount() { return destinationAmount; } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the currency in - * which tax is paid out to the tax authorities of your tax jurisdiction. Currently “EUR” - * for French merchants and “GBP” for British merchants. + * ISO 4217 code for the + * currency in which tax is paid out to the tax authorities of your tax jurisdiction. + * Currently “EUR” for French merchants and “GBP” for British merchants. */ public String getDestinationCurrency() { return destinationCurrency; @@ -198,9 +206,9 @@ public String getDestinationCurrency() { * Present only if the currency and the destination currency don't match and the exchange * rate has been finalised. * - * You can listen for the payout's [`tax_exchange_rates_confirmed` - * webhook](https://developer.gocardless.com/api-reference/#event-types-payout) to know when - * the exchange rate has been finalised for all fees in the payout. + * You can listen for the payout's tax_exchange_rates_confirmed + * webhook to know when the exchange rate has been finalised for all fees in the payout. */ public String getExchangeRate() { return exchangeRate; diff --git a/src/main/java/com/gocardless/resources/RedirectFlow.java b/src/main/java/com/gocardless/resources/RedirectFlow.java index 371bdcc8..2ac3b6f4 100644 --- a/src/main/java/com/gocardless/resources/RedirectFlow.java +++ b/src/main/java/com/gocardless/resources/RedirectFlow.java @@ -12,32 +12,40 @@ * "https://developer.gocardless.com/api-reference/#billing-requests-billing-requests">Billing * Request flow 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 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`. - * - * 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. + *
    + *
  1. You create + * a redirect flow for your customer, and redirect them to the returned redirect url, e.g. + * https://pay.gocardless.com/flow/RE123.
  2. + *
  3. 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.
  4. + *
  5. You complete + * the redirect flow, which creates a + * customer, + * customer + * bank account, and + * mandate, + * and returns the ID of the mandate. You may wish to create a subscription + * or payment + * at this point.
  6. + *
+ * Once you have completed + * 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. @@ -63,7 +71,8 @@ private RedirectFlow() { * The URL of a confirmation page, which you may optionally redirect the customer to rather than * use your own page, that confirms in their chosen language that their Direct Debit has been * set up successfully. Only returned once the customer has set up their mandate via the payment - * pages and the redirect flow has been [completed](#redirect-flows-complete-a-redirect-flow), + * pages and the redirect flow has been completed, * and only available for 15 minutes from when you complete the redirect flow. The structure of * this URL may change at any time, so you should read it directly from the API response. */ @@ -72,7 +81,9 @@ public String getConfirmationUrl() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -106,8 +117,8 @@ public String getMandateReference() { /** * 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 Map getMetadata() { return metadata; @@ -140,8 +151,8 @@ public String getSessionToken() { } /** - * The URL to redirect to upon successful mandate setup. You must use a URL beginning `https` in - * the live environment. + * The URL to redirect to upon successful mandate setup. You must use a URL beginning + * https in the live environment. */ public String getSuccessRedirectUrl() { return successRedirectUrl; @@ -177,46 +188,58 @@ private Links() { private String mandate; /** - * ID of [billing request](#billing-requests-billing-requests) that a redirect flow can - * create.
- * **Note**: The redirect flow will only create a billing request in the event the redirect - * flow is eligible to send the payer down this new and improved flow + * ID of billing + * request that a redirect flow can create.
+ *
+ * Note: The redirect flow will only create a billing request in the event + * the redirect flow is eligible to send the payer down this new and improved flow */ public String getBillingRequest() { return billingRequest; } /** - * The [creditor](#core-endpoints-creditors) for whom the mandate will be created. The - * `name` of the creditor will be displayed on the payment page. + * The creditor + * for whom the mandate will be created. The name of the creditor will be + * displayed on the payment page. */ public String getCreditor() { return creditor; } /** - * ID of [customer](#core-endpoints-customers) created by this redirect flow.
- * **Note**: this property will not be present until the redirect flow has been successfully - * completed. + * ID of customer + * created by this redirect flow.
+ *
+ * Note: this property will not be present until the redirect flow has been + * successfully completed. */ public String getCustomer() { return customer; } /** - * ID of [customer bank account](#core-endpoints-customer-bank-accounts) created by this - * redirect flow.
- * **Note**: this property will not be present until the redirect flow has been successfully - * completed. + * ID of customer + * bank account created by this redirect flow.
+ *
+ * Note: this property will not be present until the redirect flow has been + * successfully completed. */ public String getCustomerBankAccount() { return customerBankAccount; } /** - * ID of [mandate](#core-endpoints-mandates) created by this redirect flow.
- * **Note**: this property will not be present until the redirect flow has been successfully - * completed. + * ID of mandate + * created by this redirect flow.
+ *
+ * Note: this property will not be present until the redirect flow has been + * successfully completed. */ public String getMandate() { return mandate; diff --git a/src/main/java/com/gocardless/resources/Refund.java b/src/main/java/com/gocardless/resources/Refund.java index 901739b7..fd2e0ba3 100644 --- a/src/main/java/com/gocardless/resources/Refund.java +++ b/src/main/java/com/gocardless/resources/Refund.java @@ -6,11 +6,14 @@ /** * Represents a refund resource returned from the API. * - * 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 + * back to the + * customer. * - * 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 whenever + * a refund is created, and will update the amount_refunded property of the payment. */ public class Refund { private Refund() { @@ -35,15 +38,18 @@ public Integer getAmount() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. This is set to - * the currency of the refund's [payment](#core-endpoints-payments). + * ISO 4217 currency code. + * This is set to the currency of the refund's payment. */ public String getCurrency() { return currency; @@ -74,25 +80,76 @@ public Map getMetadata() { /** * 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
+ * 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. + * GoCardless Plus, Pro or Enterprise packages. *

- *

+ *

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

*/ @@ -103,11 +160,17 @@ public String getReference() { /** * One of: * - * - `created`: the refund has been created - `pending_submission`: the refund has been created, - * but not yet submitted to the banks - `submitted`: the refund has been submitted to the banks - * - `paid`: the refund has been included in a [payout](#core-endpoints-payouts) - `cancelled`: - * the refund has been cancelled - `bounced`: the refund has failed to be paid - - * `funds_returned`: the refund has had its funds returned + *
    + *
  • created: the refund has been created
  • + *
  • pending_submission: the refund has been created, but not yet submitted to + * the banks
  • + *
  • submitted: the refund has been submitted to the banks
  • + *
  • paid: the refund has been included in a payout
  • + *
  • cancelled: the refund has been cancelled
  • + *
  • bounced: the refund has failed to be paid
  • + *
  • funds_returned: the refund has had its funds returned
  • + *
*/ public Status getStatus() { return status; @@ -141,35 +204,37 @@ private Fx() { private FxCurrency fxCurrency; /** - * Estimated rate that will be used in the foreign exchange of the `amount` into the - * `fx_currency`. This will vary based on the prevailing market rate until the moment that - * it is paid out. Present only before a resource is paid out. Has up to 10 decimal places. + * Estimated rate that will be used in the foreign exchange of the amount into + * the fx_currency. This will vary based on the prevailing market rate until + * the moment that it is paid out. Present only before a resource is paid out. Has up to 10 + * decimal places. */ public String getEstimatedExchangeRate() { return estimatedExchangeRate; } /** - * Rate used in the foreign exchange of the `amount` into the `fx_currency`. Present only - * after a resource is paid out. Has up to 10 decimal places. + * Rate used in the foreign exchange of the amount into the + * fx_currency. Present only after a resource is paid out. Has up to 10 decimal + * places. */ public String getExchangeRate() { return exchangeRate; } /** - * Amount that was paid out in the `fx_currency` after foreign exchange. Present only after - * the resource has been paid out. + * Amount that was paid out in the fx_currency after foreign exchange. Present + * only after the resource has been paid out. */ public Integer getFxAmount() { return fxAmount; } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the currency in - * which amounts will be paid out (after foreign exchange). Currently "AUD", "CAD", "DKK", - * "EUR", "GBP", "NZD", "SEK" and "USD" are supported. Present only if payouts will be (or - * were) made via foreign exchange. + * ISO 4217 code for the + * currency in which amounts will be paid out (after foreign exchange). Currently "AUD", + * "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. Present only if payouts + * will be (or were) made via foreign exchange. */ public FxCurrency getFxCurrency() { return fxCurrency; @@ -203,14 +268,18 @@ private Links() { private String payment; /** - * ID of the [mandate](#core-endpoints-mandates) against which the refund is being made. + * ID of the mandate + * against which the refund is being made. */ public String getMandate() { return mandate; } /** - * ID of the [payment](#core-endpoints-payments) against which the refund is being made. + * ID of the payment + * against which the refund is being made. */ public String getPayment() { return payment; diff --git a/src/main/java/com/gocardless/resources/ScenarioSimulator.java b/src/main/java/com/gocardless/resources/ScenarioSimulator.java index 4f9cc8fb..c74a1933 100644 --- a/src/main/java/com/gocardless/resources/ScenarioSimulator.java +++ b/src/main/java/com/gocardless/resources/ScenarioSimulator.java @@ -16,95 +16,126 @@ private ScenarioSimulator() { /** * The unique identifier of the simulator, used to initiate simulations. One of: * - * - `creditor_verification_status_action_required`: Sets a creditor's `verification status` to - * `action required`, meaning that the creditor must provide further information to GoCardless - * in order to verify their account to receive payouts. - - * `creditor_verification_status_in_review`: Sets a creditor's `verification status` to `in - * review`, meaning that the creditor has provided all of the information requested by - * GoCardless to verify their account, and is now awaiting review. - - * `creditor_verification_status_successful`: Sets a creditor's `verification status` to - * `successful`, meaning that the creditor is fully verified and can receive payouts. - - * `payment_confirmed`: Transitions a payment through to `confirmed`. It must start in the - * `pending_submission` state, and its mandate must be in the `activated` state (unless it is a - * payment for ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may be - * `pending_submission`, since their mandates are submitted with their first payment). - - * `payment_paid_out`: Transitions a payment through to `paid_out`, having been collected - * successfully and paid out to you. It must start in the `pending_submission` state, and its - * mandate must be in the `activated` state (unless it is a payment for ACH, BECS, BECS_NZ or - * SEPA, in which cases the mandate may be `pending_submission`, since their mandates are - * submitted with their first payment). - `payment_failed`: Transitions a payment through to - * `failed`. It must start in the `pending_submission` state, and its mandate must be in the - * `activated` state (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which cases the - * mandate may be `pending_submission`, since their mandates are submitted with their first - * payment). - `payment_charged_back`: Behaves the same as the `payout_paid_out` simulator, - * except that the payment is transitioned to `charged_back` after it is paid out, having been - * charged back by the customer. - `payment_chargeback_settled`: Behaves the same as the - * `payment_charged_back` simulator, except that the charged back payment is additionally - * included as a debit item in a payout, thereby settling the charged back payment. - - * `payment_late_failure`: Transitions a payment through to `late_failure`, having been - * apparently collected successfully beforehand. It must start in either the - * `pending_submission` or `paid_out` state, and its mandate must be in the `activated` state - * (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may be - * `pending_submission`, since their mandates are submitted with their first payment). Not - * compatible with Autogiro mandates. - `payment_late_failure_settled`: Behaves the same as the - * `payment_late_failure` simulator, except that the late failure is additionally included as a - * debit item in a payout, thereby settling the late failure. - `payment_submitted`: Transitions - * a payment to `submitted`, without proceeding any further. It must start in the - * `pending_submission` state. - `mandate_activated`: Transitions a mandate through to - * `activated`, having been submitted to the banks and set up successfully. It must start in the - * `pending_submission` state. Not compatible with ACH, BECS, BECS_NZ and SEPA mandates, which - * are submitted and activated with their first payment. - `mandate_customer_approval_granted`: - * Transitions a mandate through to `pending_submission`, as if the customer approved the - * mandate creation. It must start in the `pending_customer_approval` state. Compatible only - * with Bacs and SEPA mandates, which support customer signatures on the mandate. All payments - * associated with the mandate will be transitioned to `pending_submission`. All subscriptions - * associated with the mandate will become `active`. - `mandate_customer_approval_skipped`: - * Transitions a mandate through to `pending_submission`, as if the customer skipped the mandate - * approval during the mandate creation process. It must start in the - * `pending_customer_approval` state. Compatible only with Bacs and SEPA mandates, which support - * customer signatures on the mandate. All payments associated with the mandate will be - * transitioned to `pending_submission`. All subscriptions associated with the mandate will - * become `active`. - `mandate_failed`: Transitions a mandate through to `failed`, having been - * submitted to the banks but found to be invalid (for example due to invalid bank details). It - * must start in the `pending_submission` or `submitted` states. Not compatible with SEPA - * mandates, which are submitted with their first payment. - `mandate_expired`: Transitions a - * mandate through to `expired`, having been submitted to the banks, set up successfully and - * then expired because no collection attempts were made against it for longer than the scheme's - * dormancy period (13 months for Bacs, 3 years for SEPA, 15 months for ACH, Betalingsservice, - * and BECS). It must start in the `pending_submission` state. Not compatible with Autogiro, - * BECS NZ, and PAD mandates, which do not expire. - `mandate_transferred`: Transitions a - * mandate through to `transferred`, having been submitted to the banks, set up successfully and - * then moved to a new bank account due. It must start in the `pending_submission` state. Only - * compatible with Bacs and SEPA mandates. - `mandate_transferred_with_resubmission`: - * Transitions a mandate through `transferred` and resubmits it to the banks, can be caused be - * the UK's Current Account Switching Service (CASS) or when a customer contacts GoCardless to - * change their bank details. It must start in the `pending_submission` state. Only compatible - * with Bacs mandates. - `mandate_suspended_by_payer`: Transitions a mandate to - * `suspended_by_payer`, as if payer has suspended the mandate after it has been setup - * successfully. It must start in the `activated` state. Only compatible with PAY_TO mandates. - - * `refund_paid`: Transitions a refund to `paid`. It must start in either the - * `pending_submission` or `submitted` state. - `refund_settled`: Transitions a refund to - * `paid`, if it's not already, then generates a payout that includes the refund, thereby - * settling the funds. It must start in one of `pending_submission`, `submitted` or `paid` - * states. - `refund_bounced`: Transitions a refund to `bounced`. It must start in either the - * `pending_submission`, `submitted`, or `paid` state. - `refund_returned`: Transitions a refund - * to `refund_returned`. The refund must start in `pending_submission`. - `payout_bounced`: - * Transitions a payout to `bounced`. It must start in the `paid` state. - - * `billing_request_fulfilled`: Authorises the billing request, and then fulfils it. The billing - * request must be in the `pending` state, with all actions completed except for - * `bank_authorisation`. Only billing requests with a `payment_request` are supported. - - * `billing_request_fulfilled_and_payment_failed`: Authorises the billing request, fulfils it, - * and moves the associated payment to `failed`. The billing request must be in the `pending` - * state, with all actions completed except for `bank_authorisation`. Only billing requests with - * a `payment_request` are supported. - - * `billing_request_fulfilled_and_payment_confirmed_to_failed`: Authorises the billing request, - * fulfils it, moves the associated payment to `confirmed` and then moves it to `failed`. The - * billing request must be in the `pending` state, with all actions completed except for - * `bank_authorisation`. Only billing requests with a `payment_request` are supported. - - * `billing_request_fulfilled_and_payment_paid_out`: Authorises the billing request, fulfils it, - * and moves the associated payment to `paid_out`. The billing request must be in the `pending` - * state, with all actions completed except for `bank_authorisation`. Only billing requests with - * a `payment_request` are supported. + *
    + *
  • creditor_verification_status_action_required: Sets a creditor's + * verification status to action required, meaning that the creditor + * must provide further information to GoCardless in order to verify their account to receive + * payouts.
  • + *
  • creditor_verification_status_in_review: Sets a creditor's verification + * status to in review, meaning that the creditor has provided all of the + * information requested by GoCardless to verify their account, and is now awaiting review.
  • + *
  • creditor_verification_status_successful: Sets a creditor's + * verification + * status to successful, meaning that the creditor is fully verified and can + * receive payouts.
  • + *
  • payment_confirmed: Transitions a payment through to confirmed. + * It must start in the pending_submission state, and its mandate must be in the + * activated state (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which + * cases the mandate may be pending_submission, since their mandates are submitted + * with their first payment).
  • + *
  • payment_paid_out: Transitions a payment through to paid_out, + * having been collected successfully and paid out to you. It must start in the + * pending_submission state, and its mandate must be in the activated + * state (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may + * be pending_submission, since their mandates are submitted with their first + * payment).
  • + *
  • payment_failed: Transitions a payment through to failed. It + * must start in the pending_submission state, and its mandate must be in the + * activated state (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which + * cases the mandate may be pending_submission, since their mandates are submitted + * with their first payment).
  • + *
  • payment_charged_back: Behaves the same as the payout_paid_out + * simulator, except that the payment is transitioned to charged_back after it is + * paid out, having been charged back by the customer.
  • + *
  • payment_chargeback_settled: Behaves the same as the + * payment_charged_back simulator, except that the charged back payment is + * additionally included as a debit item in a payout, thereby settling the charged back + * payment.
  • + *
  • payment_late_failure: Transitions a payment through to + * late_failure, having been apparently collected successfully beforehand. It must + * start in either the pending_submission or paid_out state, and its + * mandate must be in the activated state (unless it is a payment for ACH, BECS, + * BECS_NZ or SEPA, in which cases the mandate may be pending_submission, since + * their mandates are submitted with their first payment). Not compatible with Autogiro + * mandates.
  • + *
  • payment_late_failure_settled: Behaves the same as the + * payment_late_failure simulator, except that the late failure is additionally + * included as a debit item in a payout, thereby settling the late failure.
  • + *
  • payment_submitted: Transitions a payment to submitted, without + * proceeding any further. It must start in the pending_submission state.
  • + *
  • mandate_activated: Transitions a mandate through to activated, + * having been submitted to the banks and set up successfully. It must start in the + * pending_submission state. Not compatible with ACH, BECS, BECS_NZ and SEPA + * mandates, which are submitted and activated with their first payment.
  • + *
  • mandate_customer_approval_granted: Transitions a mandate through to + * pending_submission, as if the customer approved the mandate creation. It must + * start in the pending_customer_approval state. Compatible only with Bacs and SEPA + * mandates, which support customer signatures on the mandate. All payments associated with the + * mandate will be transitioned to pending_submission. All subscriptions associated + * with the mandate will become active.
  • + *
  • mandate_customer_approval_skipped: Transitions a mandate through to + * pending_submission, as if the customer skipped the mandate approval during the + * mandate creation process. It must start in the pending_customer_approval state. + * Compatible only with Bacs and SEPA mandates, which support customer signatures on the + * mandate. All payments associated with the mandate will be transitioned to + * pending_submission. All subscriptions associated with the mandate will become + * active.
  • + *
  • mandate_failed: Transitions a mandate through to failed, having + * been submitted to the banks but found to be invalid (for example due to invalid bank + * details). It must start in the pending_submission or submitted + * states. Not compatible with SEPA mandates, which are submitted with their first payment.
  • + *
  • mandate_expired: Transitions a mandate through to expired, + * having been submitted to the banks, set up successfully and then expired because no + * collection attempts were made against it for longer than the scheme's dormancy period (13 + * months for Bacs, 3 years for SEPA, 15 months for ACH, Betalingsservice, and BECS). It must + * start in the pending_submission state. Not compatible with Autogiro, BECS NZ, + * and PAD mandates, which do not expire.
  • + *
  • mandate_transferred: Transitions a mandate through to + * transferred, having been submitted to the banks, set up successfully and then + * moved to a new bank account due. It must start in the pending_submission state. + * Only compatible with Bacs and SEPA mandates.
  • + *
  • mandate_transferred_with_resubmission: Transitions a mandate through + * transferred and resubmits it to the banks, can be caused be the UK's Current + * Account Switching Service (CASS) or when a customer contacts GoCardless to change their bank + * details. It must start in the pending_submission state. Only compatible with + * Bacs mandates.
  • + *
  • mandate_suspended_by_payer: Transitions a mandate to + * suspended_by_payer, as if payer has suspended the mandate after it has been + * setup successfully. It must start in the activated state. Only compatible with + * PAY_TO mandates.
  • + *
  • refund_paid: Transitions a refund to paid. It must start in + * either the pending_submission or submitted state.
  • + *
  • refund_settled: Transitions a refund to paid, if it's not + * already, then generates a payout that includes the refund, thereby settling the funds. It + * must start in one of pending_submission, submitted or + * paid states.
  • + *
  • refund_bounced: Transitions a refund to bounced. It must start + * in either the pending_submission, submitted, or paid + * state.
  • + *
  • refund_returned: Transitions a refund to refund_returned. The + * refund must start in pending_submission.
  • + *
  • payout_bounced: Transitions a payout to bounced. It must start + * in the paid state.
  • + *
  • billing_request_fulfilled: Authorises the billing request, and then fulfils + * it. The billing request must be in the pending state, with all actions completed + * except for bank_authorisation. Only billing requests with a + * payment_request are supported.
  • + *
  • billing_request_fulfilled_and_payment_failed: Authorises the billing + * request, fulfils it, and moves the associated payment to failed. The billing + * request must be in the pending state, with all actions completed except for + * bank_authorisation. Only billing requests with a payment_request + * are supported.
  • + *
  • billing_request_fulfilled_and_payment_confirmed_to_failed: Authorises the + * billing request, fulfils it, moves the associated payment to confirmed and then + * moves it to failed. The billing request must be in the pending + * state, with all actions completed except for bank_authorisation. Only billing + * requests with a payment_request are supported.
  • + *
  • billing_request_fulfilled_and_payment_paid_out: Authorises the billing + * request, fulfils it, and moves the associated payment to paid_out. The billing + * request must be in the pending state, with all actions completed except for + * bank_authorisation. Only billing requests with a payment_request + * are supported.
  • + *
*/ public String getId() { return id; diff --git a/src/main/java/com/gocardless/resources/SchemeIdentifier.java b/src/main/java/com/gocardless/resources/SchemeIdentifier.java index e3f4655d..cf2644fd 100644 --- a/src/main/java/com/gocardless/resources/SchemeIdentifier.java +++ b/src/main/java/com/gocardless/resources/SchemeIdentifier.java @@ -7,7 +7,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 SchemeIdentifier { private SchemeIdentifier() { @@ -69,15 +68,18 @@ public String getCity() { } /** - * [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. */ public String getCountryCode() { return countryCode; } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; @@ -108,8 +110,9 @@ public String getId() { * The minimum interval, in working days, between the sending of a pre-notification to the * customer, and the charge date of a payment using this scheme identifier. * - * By default, GoCardless sends these notifications automatically. Please see our [compliance - * requirements](#appendix-compliance-requirements) for more details. + * By default, GoCardless sends these notifications automatically. Please see our compliance + * requirements for more details. */ public Integer getMinimumAdvanceNotice() { return minimumAdvanceNotice; @@ -159,8 +162,8 @@ public Scheme getScheme() { } /** - * The status of the scheme identifier. Only `active` scheme identifiers will be applied to a - * creditor and used against payments. + * The status of the scheme identifier. Only active scheme identifiers will be + * applied to a creditor and used against payments. */ public Status getStatus() { return status; diff --git a/src/main/java/com/gocardless/resources/Subscription.java b/src/main/java/com/gocardless/resources/Subscription.java index 2d925f91..026ef6bf 100644 --- a/src/main/java/com/gocardless/resources/Subscription.java +++ b/src/main/java/com/gocardless/resources/Subscription.java @@ -7,39 +7,48 @@ /** * Represents a subscription resource returned from the API. * - * Subscriptions create [payments](#core-endpoints-payments) according to a schedule. + * Subscriptions create + * payments + * according to a schedule. * - * ### Recurrence Rules + *

Recurrence Rules

The following rules apply when specifying recurrence: * - * 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: - * - * | __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 | + *
    + *
  • If day_of_month and start_date are not provided + * start_date will be the + * mandate'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 | | + * :---------------- | :--------------------------------------------- | + * :----------------------------------------- | | 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 | - * - * ### Rolling dates + * | 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 | * - * When a charge date falls on a non-business day, one of two things will happen: + *

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. + *
    + *
  • 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.
  • + *
*/ public class Subscription { private Subscription() { @@ -92,41 +101,49 @@ public Integer getCount() { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; } /** - * [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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public String getCurrency() { return currency; } /** - * As per RFC 2445. The day of the month to charge customers on. `1`-`28` or `-1` to indicate - * the last day of the month. + * As per RFC 2445. The day of the month to charge customers on. 1 + *
    + *
  • + *
+ * 28 or -1 to indicate the last day of the month. */ public Integer getDayOfMonth() { return dayOfMonth; } /** - * The earliest date that will be used as a `charge_date` on payments created for this - * subscription if it is resumed. Only present for `paused` subscriptions. This value will - * change over time. + * The earliest date that will be used as a charge_date on payments created for + * this subscription if it is resumed. Only present for paused subscriptions. This + * value will change over time. */ public String getEarliestChargeDateAfterResume() { return earliestChargeDateAfterResume; } /** - * 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. - *
+ * 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. @@ -144,15 +161,17 @@ public String getId() { } /** - * Number of `interval_units` between customer charge dates. Must be greater than or equal to - * `1`. Must result in at least one charge date per year. Defaults to `1`. + * Number of interval_units between customer charge dates. Must be greater than or + * equal to 1. Must result in at least one charge date per year. Defaults to + * 1. */ public Integer getInterval() { return interval; } /** - * The unit of time between customer charge dates. One of `weekly`, `monthly` or `yearly`. + * The unit of time between customer charge dates. One of weekly, + * monthly or yearly. */ public IntervalUnit getIntervalUnit() { return intervalUnit; @@ -172,8 +191,7 @@ public Map getMetadata() { /** * Name of the month on which to charge a customer. Must be lowercase. Only applies when the - * interval_unit is `yearly`. - * + * interval_unit is yearly. */ public Month getMonth() { return month; @@ -196,8 +214,11 @@ public Boolean getParentPlanPaused() { /** * 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.
+ * will appear on your customer's bank statement. See the documentation for the + * create + * payment endpoint for more details.
+ *
+ * *

* Restricted: You need your own Service User Number to specify a payment * reference for Bacs payments. @@ -208,11 +229,12 @@ public String getPaymentReference() { } /** - * On failure, automatically retry payments using [intelligent retries](/success-plus/overview). - * Default is `false`. + * On failure, automatically retry payments using + * intelligent retries. + * Default is false. *

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

*/ public Boolean getRetryIfPossible() { @@ -220,11 +242,12 @@ public Boolean getRetryIfPossible() { } /** - * 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'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 String getStartDate() { return startDate; @@ -233,12 +256,18 @@ public String getStartDate() { /** * One of: * - * - `pending_customer_approval`: the subscription is waiting for customer approval before - * becoming active - `customer_approval_denied`: the customer did not approve the subscription - - * `active`: the subscription is currently active and will continue to create payments - - * `finished`: all of the payments scheduled for creation under this subscription have been - * created - `cancelled`: the subscription has been cancelled and will no longer create payments - * - `paused`: the subscription has been paused and will not create payments + *
    + *
  • pending_customer_approval: the subscription is waiting for customer approval + * before becoming active
  • + *
  • customer_approval_denied: the customer did not approve the subscription
  • + *
  • active: the subscription is currently active and will continue to create + * payments
  • + *
  • finished: all of the payments scheduled for creation under this subscription + * have been created
  • + *
  • cancelled: the subscription has been cancelled and will no longer create + * payments
  • + *
  • paused: the subscription has been paused and will not create payments
  • + *
*/ public Status getStatus() { return status; @@ -300,8 +329,9 @@ private Links() { private String mandate; /** - * ID of the associated [mandate](#core-endpoints-mandates) which the subscription will - * create payments against. + * ID of the associated mandate + * which the subscription will create payments against. */ public String getMandate() { return mandate; diff --git a/src/main/java/com/gocardless/resources/TaxRate.java b/src/main/java/com/gocardless/resources/TaxRate.java index e8eca81a..bcc42683 100644 --- a/src/main/java/com/gocardless/resources/TaxRate.java +++ b/src/main/java/com/gocardless/resources/TaxRate.java @@ -5,7 +5,9 @@ * * 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. */ public class TaxRate { private TaxRate() { diff --git a/src/main/java/com/gocardless/resources/TransferredMandate.java b/src/main/java/com/gocardless/resources/TransferredMandate.java index 26219732..ceb170b7 100644 --- a/src/main/java/com/gocardless/resources/TransferredMandate.java +++ b/src/main/java/com/gocardless/resources/TransferredMandate.java @@ -16,8 +16,9 @@ private TransferredMandate() { private String publicKeyId; /** - * Encrypted customer bank account details, containing: `iban`, `account_holder_name`, - * `swift_bank_code`, `swift_branch_code`, `swift_account_number` + * Encrypted customer bank account details, containing: iban, + * account_holder_name, swift_bank_code, + * swift_branch_code, swift_account_number */ public String getEncryptedCustomerBankDetails() { return encryptedCustomerBankDetails; @@ -56,7 +57,8 @@ private Links() { private String mandate; /** - * The ID of the updated [customer_bank_account](#core-endpoints-customer-bank-accounts) + * The ID of the updated customer_bank_account */ public String getCustomerBankAccount() { return customerBankAccount; diff --git a/src/main/java/com/gocardless/resources/VerificationDetail.java b/src/main/java/com/gocardless/resources/VerificationDetail.java index 192f7ffd..0d6ab436 100644 --- a/src/main/java/com/gocardless/resources/VerificationDetail.java +++ b/src/main/java/com/gocardless/resources/VerificationDetail.java @@ -139,8 +139,9 @@ public String getCity() { } /** - * [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. */ public String getCountryCode() { return countryCode; @@ -195,7 +196,8 @@ private Links() { private String creditor; /** - * ID of the [creditor](#core-endpoints-creditors) + * ID of the creditor */ public String getCreditor() { return creditor; diff --git a/src/main/java/com/gocardless/resources/Webhook.java b/src/main/java/com/gocardless/resources/Webhook.java index 55d2135a..736efa20 100644 --- a/src/main/java/com/gocardless/resources/Webhook.java +++ b/src/main/java/com/gocardless/resources/Webhook.java @@ -27,7 +27,9 @@ private Webhook() { private String url; /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public String getCreatedAt() { return createdAt; diff --git a/src/main/java/com/gocardless/services/BalanceService.java b/src/main/java/com/gocardless/services/BalanceService.java index d40980ad..7331575a 100644 --- a/src/main/java/com/gocardless/services/BalanceService.java +++ b/src/main/java/com/gocardless/services/BalanceService.java @@ -28,9 +28,10 @@ public BalanceService(HttpClient httpClient) { } /** - * 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. + * Returns a cursor-paginated + * 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()); @@ -43,9 +44,10 @@ public BalanceListRequest> all() { /** * Request class for {@link BalanceService#list }. * - * 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. + * Returns a cursor-paginated + * 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; @@ -67,8 +69,8 @@ public BalanceListRequest withBefore(String before) { } /** - * ID of a creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). + * ID of a creditor. */ 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 79271b69..ae896368 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 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 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 a4d89375..4e2b77e2 100644 --- a/src/main/java/com/gocardless/services/BankAccountHolderVerificationService.java +++ b/src/main/java/com/gocardless/services/BankAccountHolderVerificationService.java @@ -68,8 +68,9 @@ 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 */ 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 44d43715..74cf403f 100644 --- a/src/main/java/com/gocardless/services/BankAuthorisationService.java +++ b/src/main/java/com/gocardless/services/BankAuthorisationService.java @@ -56,9 +56,9 @@ public BankAuthorisationCreateRequest withLinks(Links links) { } /** - * ID of the billing request - * (https://developer.gocardless.com/api-reference/#billing-requests-billing-requests) - * against which this authorisation was created. + * ID of the billing + * request against which this authorisation was created. */ public BankAuthorisationCreateRequest withLinksBillingRequest(String billingRequest) { if (links == null) { @@ -71,26 +71,27 @@ public BankAuthorisationCreateRequest withLinksBillingRequest(String billingRequ /** * URL that the payer can be redirected to after authorising the payment. * - * On completion of bank authorisation, the query parameter of either `outcome=success` or - * `outcome=failure` will be appended to the `redirect_uri` to indicate the result of the - * bank authorisation. If the bank authorisation is expired, the query parameter - * `outcome=timeout` will be appended to the `redirect_uri`, in which case you should prompt - * the user to try the bank authorisation step again. + * On completion of bank authorisation, the query parameter of either + * outcome=success or outcome=failure will be appended to the + * redirect_uri to indicate the result of the bank authorisation. If the bank + * authorisation is expired, the query parameter outcome=timeout will be + * appended to the redirect_uri, in which case you should prompt the user to + * try the bank authorisation step again. * - * 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` - * (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) + * 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, + * BANK_AUTHORISATION_DENIED, + * or BANK_AUTHORISATION_FAILED * 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`. + * The BillingRequestFlow ID will also be appended to the redirect_uri as query + * parameter id=BRF123. * - * Defaults to `https://pay.gocardless.com/billing/static/thankyou`. + * Defaults to https://pay.gocardless.com/billing/static/thankyou. */ public BankAuthorisationCreateRequest withRedirectUri(String redirectUri) { this.redirectUri = redirectUri; @@ -144,9 +145,9 @@ public static class Links { private String billingRequest; /** - * ID of the billing request - * (https://developer.gocardless.com/api-reference/#billing-requests-billing-requests) - * against which this authorisation was created. + * ID of the billing + * request 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 eb4a51f5..f2664a58 100644 --- a/src/main/java/com/gocardless/services/BankDetailsLookupService.java +++ b/src/main/java/com/gocardless/services/BankDetailsLookupService.java @@ -28,22 +28,23 @@ 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 - * (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. + * If your request returns an + * error 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 - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) or an IBAN. + * Bank account details may be supplied using + * local + * details or an IBAN. * - * 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. + * 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 - * modulus or reachability checking but not for payment collection, please get in touch. + * 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() { return new BankDetailsLookupCreateRequest(httpClient); @@ -59,22 +60,23 @@ 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 - * (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. + * If your request returns an + * error 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 - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) or an IBAN. + * Bank account details may be supplied using + * local + * details or an IBAN. * - * 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. + * 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 - * modulus or reachability checking but not for payment collection, please get in touch. + * 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 extends PostRequest { @@ -95,9 +97,9 @@ public BankDetailsLookupCreateRequest withAccountHolderName(String accountHolder } /** - * 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`. + * Bank account number - see local + * details for more information. Alternatively you can provide an iban. */ public BankDetailsLookupCreateRequest withAccountNumber(String accountNumber) { this.accountNumber = accountNumber; @@ -105,9 +107,9 @@ public BankDetailsLookupCreateRequest withAccountNumber(String accountNumber) { } /** - * Bank code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Bank code - see local + * details for more information. Alternatively you can provide an iban. */ public BankDetailsLookupCreateRequest withBankCode(String bankCode) { this.bankCode = bankCode; @@ -115,9 +117,9 @@ public BankDetailsLookupCreateRequest withBankCode(String bankCode) { } /** - * Branch code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Branch code - see local + * details for more information. Alternatively you can provide an iban. */ public BankDetailsLookupCreateRequest withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -125,9 +127,9 @@ public BankDetailsLookupCreateRequest withBranchCode(String branchCode) { } /** - * 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. + * ISO + * 3166-1 alpha-2 code. Must be provided if specifying local details. */ public BankDetailsLookupCreateRequest withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -135,8 +137,9 @@ public BankDetailsLookupCreateRequest withCountryCode(String countryCode) { } /** - * International Bank Account Number. Alternatively you can provide local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details). + * International Bank Account Number. Alternatively you can provide local + * 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 25a51ae8..df6022ab 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 code. */ public BillingRequestFlowCreateRequest withLanguage(String language) { this.language = language; @@ -104,9 +104,9 @@ public BillingRequestFlowCreateRequest withLinks(Links links) { } /** - * ID of the billing request - * (https://developer.gocardless.com/api-reference/#billing-requests-billing-requests) - * against which this flow was created. + * ID of the billing + * request against which this flow was created. */ public BillingRequestFlowCreateRequest withLinksBillingRequest(String billingRequest) { if (links == null) { @@ -166,9 +166,9 @@ public BillingRequestFlowCreateRequest withPrefilledBankAccount( /** * Bank account type for USD-denominated bank accounts. Must not be provided for bank - * accounts in other currencies. See local details - * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for - * more information. + * accounts in other currencies. See local + * details for more information. */ public BillingRequestFlowCreateRequest withPrefilledBankAccountAccountType( PrefilledBankAccount.AccountType accountType) { @@ -238,8 +238,8 @@ public BillingRequestFlowCreateRequest withPrefilledCustomerCity(String city) { } /** - * Customer's company name. Company name should only be provided if `given_name` and - * `family_name` are null. + * Customer's company name. Company name should only be provided if given_name + * and family_name are null. */ public BillingRequestFlowCreateRequest withPrefilledCustomerCompanyName( String companyName) { @@ -251,8 +251,9 @@ 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. */ public BillingRequestFlowCreateRequest withPrefilledCustomerCountryCode( String countryCode) { @@ -418,9 +419,9 @@ public static class Links { private String billingRequest; /** - * ID of the billing request - * (https://developer.gocardless.com/api-reference/#billing-requests-billing-requests) - * against which this flow was created. + * ID of the billing + * request against which this flow was created. */ public Links withBillingRequest(String billingRequest) { this.billingRequest = billingRequest; @@ -433,9 +434,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) - * for more information. + * accounts in other currencies. See local + * details for more information. */ public PrefilledBankAccount withAccountType(AccountType accountType) { this.accountType = accountType; @@ -503,8 +504,8 @@ public PrefilledCustomer withCity(String city) { } /** - * Customer's company name. Company name should only be provided if `given_name` and - * `family_name` are null. + * Customer's company name. Company name should only be provided if + * given_name and family_name are null. */ public PrefilledCustomer withCompanyName(String companyName) { this.companyName = companyName; @@ -512,8 +513,9 @@ 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. */ 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 60424de8..a0176e11 100644 --- a/src/main/java/com/gocardless/services/BillingRequestService.java +++ b/src/main/java/com/gocardless/services/BillingRequestService.java @@ -16,10 +16,12 @@ * 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 - * `instalment_schedule_request` are only supported for ACH and PAD schemes. + * See 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; @@ -33,16 +35,18 @@ public BillingRequestService(HttpClient httpClient) { } /** - * Important: All properties associated with subscription_request and - * instalment_schedule_request are only supported for ACH and PAD schemes. + *

+ * 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. @@ -55,8 +59,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. @@ -64,15 +68,15 @@ 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 - * 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. + * 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) - * 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. + * BACS scheme Payer + * Name Verification 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. */ public BillingRequestCollectBankAccountRequest collectBankAccount(String identity) { return new BillingRequestCollectBankAccountRequest(httpClient, identity); @@ -102,9 +106,9 @@ public BillingRequestCancelRequest cancel(String identity) { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * billing requests. + * Returns a cursor-paginated + * list of your billing requests. */ public BillingRequestListRequest> list() { return new BillingRequestListRequest<>(httpClient, @@ -161,8 +165,10 @@ public BillingRequestSelectInstitutionRequest selectInstitution(String identity) /** * Request class for {@link BillingRequestService#create }. * - * Important: All properties associated with subscription_request and - * instalment_schedule_request are only supported for ACH and PAD schemes. + *

+ * 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 { @@ -181,9 +187,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 for more information. */ public BillingRequestCreateRequest withFallbackEnabled(Boolean fallbackEnabled) { this.fallbackEnabled = fallbackEnabled; @@ -210,8 +216,8 @@ public BillingRequestCreateRequest withInstalmentScheduleRequestAppFee(Integer a } /** - * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently - * "USD" and "CAD" are supported. + * ISO 4217 currency code. + * Currently "USD" and "CAD" are supported. */ public BillingRequestCreateRequest withInstalmentScheduleRequestCurrency(String currency) { if (instalmentScheduleRequest == null) { @@ -222,9 +228,10 @@ public BillingRequestCreateRequest withInstalmentScheduleRequestCurrency(String } /** - * An explicit array of instalment payments, each specifying at least an `amount` and - * `charge_date`. See create (with dates) - * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-dates) + * An explicit array of instalment payments, each specifying at least an amount + * and charge_date. See create + * (with dates) */ public BillingRequestCreateRequest withInstalmentScheduleRequestInstalmentsWithDates( List instalmentsWithDates) { @@ -237,9 +244,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) - * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-schedule) + * to be collected, with a specified start date for the first payment. See create + * (with schedule) */ public BillingRequestCreateRequest withInstalmentScheduleRequestInstalmentsWithSchedule( InstalmentsWithSchedule instalmentsWithSchedule) { @@ -277,10 +284,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 - * (https://developer.gocardless.com/api-reference/#payments-create-a-payment) for more - * details. + * and will appear on your customer's bank statement. See the documentation for the create + * payment endpoint for more details.
+ *
*/ public BillingRequestCreateRequest withInstalmentScheduleRequestPaymentReference( String paymentReference) { @@ -292,10 +299,13 @@ public BillingRequestCreateRequest withInstalmentScheduleRequestPaymentReference } /** - * 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). + * On failure, automatically retry payments using + * intelligent retries. + * Default is false. + *

+ * Important: To be able to use intelligent retries, Success+ needs to be + * enabled in GoCardless dashboard. + *

*/ public BillingRequestCreateRequest withInstalmentScheduleRequestRetryIfPossible( Boolean retryIfPossible) { @@ -327,9 +337,9 @@ public BillingRequestCreateRequest withLinks(Links links) { } /** - * ID of the associated creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only required - * if your account manages multiple creditors. + * ID of the associated creditor. + * Only required if your account manages multiple creditors. */ public BillingRequestCreateRequest withLinksCreditor(String creditor) { if (links == null) { @@ -340,9 +350,9 @@ public BillingRequestCreateRequest withLinksCreditor(String creditor) { } /** - * ID of the customer - * (https://developer.gocardless.com/api-reference/#core-endpoints-customers) against which - * this request should be made. + * ID of the customer + * against which this request should be made. */ public BillingRequestCreateRequest withLinksCustomer(String customer) { if (links == null) { @@ -353,8 +363,8 @@ public BillingRequestCreateRequest withLinksCustomer(String customer) { } /** - * (Optional) ID of the customer_bank_account - * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts) + * (Optional) ID of the customer_bank_account * against which this request should be made. */ public BillingRequestCreateRequest withLinksCustomerBankAccount( @@ -372,8 +382,8 @@ 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. * * 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 @@ -391,8 +401,9 @@ 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. + * 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. */ public BillingRequestCreateRequest withMandateRequestConsentType(String consentType) { if (mandateRequest == null) { @@ -415,7 +426,7 @@ public BillingRequestCreateRequest withMandateRequestConstraints(Constraints con } /** - * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 currency code. */ public BillingRequestCreateRequest withMandateRequestCurrency(String currency) { if (mandateRequest == null) { @@ -440,9 +451,12 @@ public BillingRequestCreateRequest withMandateRequestDescription(String descript /** * This field will decide how GoCardless handles settlement of funds from the customer. * - * - `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. + *
    + *
  • 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) { @@ -467,10 +481,10 @@ public BillingRequestCreateRequest withMandateRequestMetadata( } /** - * 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. + * Unique reference. Different schemes have different length and character + * set 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) { @@ -510,23 +524,28 @@ 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 - * - * 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`. + *
    + *
  • 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. + * 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. + * See Billing + * Requests: Creating Verified Mandates for more information. */ public BillingRequestCreateRequest withMandateRequestVerify(MandateRequest.Verify verify) { if (mandateRequest == null) { @@ -572,9 +591,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 for the complete list of valid codes. */ public BillingRequestCreateRequest withPaymentPurposeCode(String paymentPurposeCode) { this.paymentPurposeCode = paymentPurposeCode; @@ -611,9 +630,9 @@ public BillingRequestCreateRequest withPaymentRequestAppFee(Integer appFee) { } /** - * 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. + * ISO 4217 currency code. + * GBP and EUR supported; GBP with your customers in + * the UK and for EUR with your customers in supported Eurozone countries only. */ public BillingRequestCreateRequest withPaymentRequestCurrency(String currency) { if (paymentRequest == null) { @@ -638,9 +657,12 @@ public BillingRequestCreateRequest withPaymentRequestDescription(String descript /** * This field will decide how GoCardless handles settlement of funds from the customer. * - * - `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. + *
    + *
  • 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) { @@ -678,11 +700,16 @@ public BillingRequestCreateRequest withPaymentRequestReference(String reference) } /** - * 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. + * On failure, automatically retry payments using + * intelligent retries. + * Default is false. + *

+ * Important: To be able to use intelligent retries, Success+ needs to be + * enabled in GoCardless dashboard. + *

+ *

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

*/ public BillingRequestCreateRequest withPaymentRequestRetryIfPossible( Boolean retryIfPossible) { @@ -694,11 +721,12 @@ public BillingRequestCreateRequest withPaymentRequestRetryIfPossible( } /** - * (Optional) A scheme used for Open Banking payments. Currently `faster_payments` is - * supported in the UK (GBP) and `sepa_credit_transfer` and `sepa_instant_credit_transfer` - * are supported in supported Eurozone countries (EUR). For Eurozone countries, - * `sepa_credit_transfer` is used as the default. Please be aware that - * `sepa_instant_credit_transfer` may incur an additional fee for your customer. + * (Optional) A scheme used for Open Banking payments. Currently + * faster_payments is supported in the UK (GBP) and + * sepa_credit_transfer and sepa_instant_credit_transfer are + * supported in supported Eurozone countries (EUR). For Eurozone countries, + * sepa_credit_transfer is used as the default. Please be aware that + * sepa_instant_credit_transfer may incur an additional fee for your customer. */ public BillingRequestCreateRequest withPaymentRequestScheme(String scheme) { if (paymentRequest == null) { @@ -711,9 +739,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 for the complete list of valid codes. */ public BillingRequestCreateRequest withPurposeCode(PurposeCode purposeCode) { this.purposeCode = purposeCode; @@ -762,8 +790,8 @@ public BillingRequestCreateRequest withSubscriptionRequestCount(Integer count) { } /** - * 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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public BillingRequestCreateRequest withSubscriptionRequestCurrency(String currency) { if (subscriptionRequest == null) { @@ -774,8 +802,11 @@ public BillingRequestCreateRequest withSubscriptionRequestCurrency(String curren } /** - * As per RFC 2445. The day of the month to charge customers on. `1`-`28` or `-1` to - * indicate the last day of the month. + * As per RFC 2445. The day of the month to charge customers on. 1 + *
    + *
  • + *
+ * 28 or -1 to indicate the last day of the month. */ public BillingRequestCreateRequest withSubscriptionRequestDayOfMonth(Integer dayOfMonth) { if (subscriptionRequest == null) { @@ -786,8 +817,9 @@ public BillingRequestCreateRequest withSubscriptionRequestDayOfMonth(Integer day } /** - * Number of `interval_units` between customer charge dates. Must be greater than or equal - * to `1`. Must result in at least one charge date per year. Defaults to `1`. + * Number of interval_units between customer charge dates. Must be greater than + * or equal to 1. Must result in at least one charge date per year. Defaults to + * 1. */ public BillingRequestCreateRequest withSubscriptionRequestInterval(Integer interval) { if (subscriptionRequest == null) { @@ -798,7 +830,8 @@ public BillingRequestCreateRequest withSubscriptionRequestInterval(Integer inter } /** - * The unit of time between customer charge dates. One of `weekly`, `monthly` or `yearly`. + * The unit of time between customer charge dates. One of weekly, + * monthly or yearly. */ public BillingRequestCreateRequest withSubscriptionRequestIntervalUnit( SubscriptionRequest.IntervalUnit intervalUnit) { @@ -824,7 +857,7 @@ public BillingRequestCreateRequest withSubscriptionRequestMetadata( /** * Name of the month on which to charge a customer. Must be lowercase. Only applies when the - * interval_unit is `yearly`. + * interval_unit is yearly. */ public BillingRequestCreateRequest withSubscriptionRequestMonth( SubscriptionRequest.Month month) { @@ -849,10 +882,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 - * (https://developer.gocardless.com/api-reference/#payments-create-a-payment) for more - * details. + * and will appear on your customer's bank statement. See the documentation for the create + * payment endpoint for more details.
+ *
*/ public BillingRequestCreateRequest withSubscriptionRequestPaymentReference( String paymentReference) { @@ -864,10 +897,13 @@ public BillingRequestCreateRequest withSubscriptionRequestPaymentReference( } /** - * 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). + * On failure, automatically retry payments using + * intelligent retries. + * Default is false. + *

+ * Important: To be able to use intelligent retries, Success+ needs to be + * enabled in GoCardless dashboard. + *

*/ public BillingRequestCreateRequest withSubscriptionRequestRetryIfPossible( Boolean retryIfPossible) { @@ -880,10 +916,11 @@ public BillingRequestCreateRequest withSubscriptionRequestRetryIfPossible( /** * The date on which the first payment should be charged. If fulfilled after this date, this - * will be set as the mandate'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`. + * will be set as the mandate'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 BillingRequestCreateRequest withSubscriptionRequestStartDate(String startDate) { if (subscriptionRequest == null) { @@ -1027,11 +1064,12 @@ public static class InstalmentsWithDates { * 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) + * Transaction + * limits * * For Variable Recurring Payments (VRP), this must not exceed the mandate's - * `max_amount_per_payment` constraint. + * max_amount_per_payment constraint. */ public InstalmentsWithDates withAmount(Integer amount) { this.amount = amount; @@ -1040,9 +1078,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates), it will be - * automatically rolled forwards to that date. + * next_possible_charge_date on the mandate, + * it will be automatically rolled forwards to that date. */ public InstalmentsWithDates withChargeDate(String chargeDate) { this.chargeDate = chargeDate; @@ -1052,8 +1090,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#appendix-compliance-requirements)). + * send its own notifications (see compliance + * requirements). */ public InstalmentsWithDates withDescription(String description) { this.description = description; @@ -1091,8 +1130,8 @@ public InstalmentsWithSchedule withAmounts(List amounts) { } /** - * Number of `interval_units` between charge dates. Must be greater than or equal to - * `1`. + * Number of interval_units between charge dates. Must be greater than or + * equal to 1. */ public InstalmentsWithSchedule withInterval(Integer interval) { this.interval = interval; @@ -1100,8 +1139,8 @@ public InstalmentsWithSchedule withInterval(Integer interval) { } /** - * The unit of time between customer charge dates. One of `weekly`, `monthly` or - * `yearly`. + * The unit of time between customer charge dates. One of weekly, + * monthly or yearly. */ public InstalmentsWithSchedule withIntervalUnit(IntervalUnit intervalUnit) { this.intervalUnit = intervalUnit; @@ -1110,11 +1149,12 @@ public InstalmentsWithSchedule withIntervalUnit(IntervalUnit intervalUnit) { /** * 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` + * mandate'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; @@ -1174,8 +1214,8 @@ public InstalmentScheduleRequest withAppFee(Integer appFee) { } /** - * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - * Currently "USD" and "CAD" are supported. + * ISO 4217 currency + * code. Currently "USD" and "CAD" are supported. */ public InstalmentScheduleRequest withCurrency(String currency) { this.currency = currency; @@ -1183,9 +1223,10 @@ public InstalmentScheduleRequest withCurrency(String currency) { } /** - * An explicit array of instalment payments, each specifying at least an `amount` and - * `charge_date`. See create (with dates) - * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-dates) + * An explicit array of instalment payments, each specifying at least an + * amount and charge_date. See create + * (with dates) */ public InstalmentScheduleRequest withInstalmentsWithDates( List instalmentsWithDates) { @@ -1196,8 +1237,9 @@ 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) - * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-schedule) + * create + * (with schedule) */ public InstalmentScheduleRequest withInstalmentsWithSchedule( InstalmentsWithSchedule instalmentsWithSchedule) { @@ -1226,9 +1268,10 @@ 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 - * (https://developer.gocardless.com/api-reference/#payments-create-a-payment) for more - * details. + * the create + * payment endpoint for more details.
+ *
*/ public InstalmentScheduleRequest withPaymentReference(String paymentReference) { this.paymentReference = paymentReference; @@ -1236,10 +1279,14 @@ public InstalmentScheduleRequest withPaymentReference(String paymentReference) { } /** - * 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). + * On failure, automatically retry payments using + * intelligent + * retries. Default is false. + *

+ * Important: To be able to use intelligent retries, Success+ needs to + * be enabled in GoCardless + * dashboard. + *

*/ public InstalmentScheduleRequest withRetryIfPossible(Boolean retryIfPossible) { this.retryIfPossible = retryIfPossible; @@ -1264,9 +1311,9 @@ public static class Links { private String customerBankAccount; /** - * ID of the associated creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only - * required if your account manages multiple creditors. + * ID of the associated creditor. + * Only required if your account manages multiple creditors. */ public Links withCreditor(String creditor) { this.creditor = creditor; @@ -1274,9 +1321,9 @@ public Links withCreditor(String creditor) { } /** - * ID of the customer - * (https://developer.gocardless.com/api-reference/#core-endpoints-customers) against - * which this request should be made. + * ID of the customer + * against which this request should be made. */ public Links withCustomer(String customer) { this.customer = customer; @@ -1284,8 +1331,8 @@ public Links withCustomer(String customer) { } /** - * (Optional) ID of the customer_bank_account - * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts) + * (Optional) ID of the customer_bank_account * against which this request should be made. */ public Links withCustomerBankAccount(String customerBankAccount) { @@ -1301,21 +1348,27 @@ public static class PeriodicLimits { private Period period; /** - * The alignment of the period. Defaults to `creation_date` if not specified. + * 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 + *
    + *
  • 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` - 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 + *
    + *
  • 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`. + * Note: Has no effect when period is flexible. */ public PeriodicLimits withAlignment(Alignment alignment) { this.alignment = alignment; @@ -1325,7 +1378,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; @@ -1336,7 +1389,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; @@ -1420,8 +1473,8 @@ 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 - * PayTo and VRP. + * 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; @@ -1431,7 +1484,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; @@ -1441,10 +1494,10 @@ public Constraints withPaymentMethod(String paymentMethod) { /** * 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. + * max_amount_per_payment which caps a single payment. * - * Note: Required for VRP, where exactly one periodic limit must be provided. Optional - * for PayTo. + * Note: Required for VRP, where exactly one periodic limit must be provided. + * Optional for PayTo. */ public Constraints withPeriodicLimits(List periodicLimits) { this.periodicLimits = periodicLimits; @@ -1497,8 +1550,8 @@ 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. * * 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) @@ -1513,9 +1566,10 @@ 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 - * PAD schemes. + * 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. */ public MandateRequest withConsentType(String consentType) { this.consentType = consentType; @@ -1532,7 +1586,8 @@ public MandateRequest withConstraints(Constraints constraints) { } /** - * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 currency + * code. */ public MandateRequest withCurrency(String currency) { this.currency = currency; @@ -1551,9 +1606,12 @@ public MandateRequest withDescription(String description) { /** * This field will decide how GoCardless handles settlement of funds from the customer. * - * - `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. + *
    + *
  • 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; @@ -1570,10 +1628,10 @@ public MandateRequest withMetadata(Map metadata) { } /** - * 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. + * Unique reference. Different schemes have different length and character + * set 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; @@ -1604,25 +1662,29 @@ 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 - * - * 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`. + *
    + *
  • 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. + * 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. + * See Billing + * Requests: Creating Verified Mandates for more information. */ public MandateRequest withVerify(Verify verify) { this.verify = verify; @@ -1699,9 +1761,10 @@ public PaymentRequest withAppFee(Integer appFee) { } /** - * 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. + * ISO 4217 currency + * code. GBP and EUR supported; GBP with your + * customers in the UK and for EUR with your customers in supported + * Eurozone countries only. */ public PaymentRequest withCurrency(String currency) { this.currency = currency; @@ -1720,9 +1783,12 @@ public PaymentRequest withDescription(String description) { /** * This field will decide how GoCardless handles settlement of funds from the customer. * - * - `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. + *
    + *
  • 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; @@ -1749,11 +1815,17 @@ public PaymentRequest withReference(String reference) { } /** - * 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. + * On failure, automatically retry payments using + * intelligent + * retries. Default is false. + *

+ * Important: To be able to use intelligent retries, Success+ needs to + * be enabled in GoCardless + * dashboard. + *

+ *

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

*/ public PaymentRequest withRetryIfPossible(Boolean retryIfPossible) { this.retryIfPossible = retryIfPossible; @@ -1761,11 +1833,12 @@ public PaymentRequest withRetryIfPossible(Boolean retryIfPossible) { } /** - * (Optional) A scheme used for Open Banking payments. Currently `faster_payments` is - * supported in the UK (GBP) and `sepa_credit_transfer` and - * `sepa_instant_credit_transfer` are supported in supported Eurozone countries (EUR). - * For Eurozone countries, `sepa_credit_transfer` is used as the default. Please be - * aware that `sepa_instant_credit_transfer` may incur an additional fee for your + * (Optional) A scheme used for Open Banking payments. Currently + * faster_payments is supported in the UK (GBP) and + * sepa_credit_transfer and sepa_instant_credit_transfer are + * supported in supported Eurozone countries (EUR). For Eurozone countries, + * sepa_credit_transfer is used as the default. Please be aware that + * sepa_instant_credit_transfer may incur an additional fee for your * customer. */ public PaymentRequest withScheme(String scheme) { @@ -1828,8 +1901,9 @@ public SubscriptionRequest withCount(Integer count) { } /** - * 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. + * ISO 4217 currency + * code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + * supported. */ public SubscriptionRequest withCurrency(String currency) { this.currency = currency; @@ -1837,8 +1911,11 @@ public SubscriptionRequest withCurrency(String currency) { } /** - * As per RFC 2445. The day of the month to charge customers on. `1`-`28` or `-1` to - * indicate the last day of the month. + * As per RFC 2445. The day of the month to charge customers on. 1 + *
    + *
  • + *
+ * 28 or -1 to indicate the last day of the month. */ public SubscriptionRequest withDayOfMonth(Integer dayOfMonth) { this.dayOfMonth = dayOfMonth; @@ -1846,8 +1923,9 @@ public SubscriptionRequest withDayOfMonth(Integer dayOfMonth) { } /** - * Number of `interval_units` between customer charge dates. Must be greater than or - * equal to `1`. Must result in at least one charge date per year. Defaults to `1`. + * Number of interval_units between customer charge dates. Must be greater + * than or equal to 1. Must result in at least one charge date per year. + * Defaults to 1. */ public SubscriptionRequest withInterval(Integer interval) { this.interval = interval; @@ -1855,8 +1933,8 @@ public SubscriptionRequest withInterval(Integer interval) { } /** - * The unit of time between customer charge dates. One of `weekly`, `monthly` or - * `yearly`. + * The unit of time between customer charge dates. One of weekly, + * monthly or yearly. */ public SubscriptionRequest withIntervalUnit(IntervalUnit intervalUnit) { this.intervalUnit = intervalUnit; @@ -1874,7 +1952,7 @@ 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`. + * the interval_unit is yearly. */ public SubscriptionRequest withMonth(Month month) { this.month = month; @@ -1893,9 +1971,10 @@ 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 - * (https://developer.gocardless.com/api-reference/#payments-create-a-payment) for more - * details. + * the create + * payment endpoint for more details.
+ *
*/ public SubscriptionRequest withPaymentReference(String paymentReference) { this.paymentReference = paymentReference; @@ -1903,10 +1982,14 @@ public SubscriptionRequest withPaymentReference(String paymentReference) { } /** - * 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). + * On failure, automatically retry payments using + * intelligent + * retries. Default is false. + *

+ * Important: To be able to use intelligent retries, Success+ needs to + * be enabled in GoCardless + * dashboard. + *

*/ public SubscriptionRequest withRetryIfPossible(Boolean retryIfPossible) { this.retryIfPossible = retryIfPossible; @@ -1915,10 +1998,11 @@ public SubscriptionRequest withRetryIfPossible(Boolean retryIfPossible) { /** * The date on which the first payment should be charged. If fulfilled after this date, - * this will be set as the mandate'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`. + * this will be set as the mandate'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 SubscriptionRequest withStartDate(String startDate) { this.startDate = startDate; @@ -1965,8 +2049,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. @@ -1987,10 +2071,11 @@ public BillingRequestCollectCustomerDetailsRequest withCustomer(Customer custome } /** - * Customer's company name. Required unless a `given_name` and `family_name` are provided. - * For Canadian customers, the use of a `company_name` value will mean that any mandate - * created from this customer will be considered to be a "Business PAD" (otherwise, any - * mandate will be considered to be a "Personal PAD"). + * Customer's company name. Required unless a given_name and + * family_name are provided. For Canadian customers, the use of a + * company_name value will mean that any mandate created from this customer + * will be considered to be a "Business PAD" (otherwise, any mandate will be considered to + * be a "Personal PAD"). */ public BillingRequestCollectCustomerDetailsRequest withCustomerCompanyName( String companyName) { @@ -2014,7 +2099,7 @@ public BillingRequestCollectCustomerDetailsRequest withCustomerEmail(String emai } /** - * Customer's surname. Required unless a `company_name` is provided. + * Customer's surname. Required unless a company_name is provided. */ public BillingRequestCollectCustomerDetailsRequest withCustomerFamilyName( String familyName) { @@ -2026,7 +2111,7 @@ public BillingRequestCollectCustomerDetailsRequest withCustomerFamilyName( } /** - * Customer's first name. Required unless a `company_name` is provided. + * Customer's first name. Required unless a company_name is provided. */ public BillingRequestCollectCustomerDetailsRequest withCustomerGivenName(String givenName) { if (customer == null) { @@ -2037,14 +2122,14 @@ public BillingRequestCollectCustomerDetailsRequest withCustomerGivenName(String } /** - * 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 - * (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". + * ISO 639-1 code. Used + * as the language for notification emails sent by GoCardless if your organisation does not + * send its own (see 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) { @@ -2068,8 +2153,8 @@ public BillingRequestCollectCustomerDetailsRequest withCustomerMetadata( } /** - * ITU E.123 (https://en.wikipedia.org/wiki/E.123) formatted phone number, including country - * code. + * ITU E.123 formatted phone number, + * including country code. */ public BillingRequestCollectCustomerDetailsRequest withCustomerPhoneNumber( String phoneNumber) { @@ -2135,8 +2220,9 @@ 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. */ public BillingRequestCollectCustomerDetailsRequest withCustomerBillingDetailCountryCode( String countryCode) { @@ -2165,8 +2251,8 @@ public BillingRequestCollectCustomerDetailsRequest withCustomerBillingDetailDani * the payer to whom the mandate belongs (i.e. as a result of their completion of a mandate * setup flow in their browser). * - * Not required for creating offline mandates where `authorisation_source` is set to - * telephone or paper. + * Not required for creating offline mandates where authorisation_source is set + * to telephone or paper. */ public BillingRequestCollectCustomerDetailsRequest withCustomerBillingDetailIpAddress( String ipAddress) { @@ -2191,8 +2277,8 @@ 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. - * `CA` for California). + * ISO3166-2:US state code is + * required (e.g. CA for California). */ public BillingRequestCollectCustomerDetailsRequest withCustomerBillingDetailRegion( String region) { @@ -2271,10 +2357,11 @@ public static class Customer { private String phoneNumber; /** - * Customer's company name. Required unless a `given_name` and `family_name` are - * provided. For Canadian customers, the use of a `company_name` value will mean that - * any mandate created from this customer will be considered to be a "Business PAD" - * (otherwise, any mandate will be considered to be a "Personal PAD"). + * Customer's company name. Required unless a given_name and + * family_name are provided. For Canadian customers, the use of a + * company_name value will mean that any mandate created from this customer + * will be considered to be a "Business PAD" (otherwise, any mandate will be considered + * to be a "Personal PAD"). */ public Customer withCompanyName(String companyName) { this.companyName = companyName; @@ -2291,7 +2378,7 @@ public Customer withEmail(String email) { } /** - * Customer's surname. Required unless a `company_name` is provided. + * Customer's surname. Required unless a company_name is provided. */ public Customer withFamilyName(String familyName) { this.familyName = familyName; @@ -2299,7 +2386,7 @@ public Customer withFamilyName(String familyName) { } /** - * Customer's first name. Required unless a `company_name` is provided. + * Customer's first name. Required unless a company_name is provided. */ public Customer withGivenName(String givenName) { this.givenName = givenName; @@ -2307,14 +2394,14 @@ public Customer withGivenName(String givenName) { } /** - * 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 - * (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". + * ISO 639-1 code. + * Used as the language for notification emails sent by GoCardless if your organisation + * does not send its own (see 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 Customer withLanguage(String language) { this.language = language; @@ -2331,8 +2418,8 @@ public Customer withMetadata(Map metadata) { } /** - * ITU E.123 (https://en.wikipedia.org/wiki/E.123) formatted phone number, including - * country code. + * ITU E.123 formatted phone number, + * including country code. */ public Customer withPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; @@ -2385,8 +2472,9 @@ 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. */ public CustomerBillingDetail withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -2407,8 +2495,8 @@ public CustomerBillingDetail withDanishIdentityNumber(String danishIdentityNumbe * address of the payer to whom the mandate belongs (i.e. as a result of their * completion of a mandate setup flow in their browser). * - * Not required for creating offline mandates where `authorisation_source` is set to - * telephone or paper. + * Not required for creating offline mandates where authorisation_source is + * set to telephone or paper. */ public CustomerBillingDetail withIpAddress(String ipAddress) { this.ipAddress = ipAddress; @@ -2425,8 +2513,8 @@ 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 - * (e.g. `CA` for California). + * ISO3166-2:US state code is + * required (e.g. CA for California). */ public CustomerBillingDetail withRegion(String region) { this.region = region; @@ -2449,8 +2537,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. @@ -2458,15 +2546,15 @@ 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 - * 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. + * 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) - * 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. + * BACS scheme Payer + * Name Verification 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. */ public static final class BillingRequestCollectBankAccountRequest extends PostRequest { @@ -2488,8 +2576,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). + * unless the request includes a customer + * bank account token. */ public BillingRequestCollectBankAccountRequest withAccountHolderName( String accountHolderName) { @@ -2498,9 +2587,9 @@ public BillingRequestCollectBankAccountRequest withAccountHolderName( } /** - * 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`. + * Bank account number - see local + * details for more information. Alternatively you can provide an iban. */ public BillingRequestCollectBankAccountRequest withAccountNumber(String accountNumber) { this.accountNumber = accountNumber; @@ -2508,9 +2597,9 @@ public BillingRequestCollectBankAccountRequest withAccountNumber(String accountN } /** - * 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. + * Account number suffix (only for bank accounts denominated in NZD) - see local + * details for more information. */ public BillingRequestCollectBankAccountRequest withAccountNumberSuffix( String accountNumberSuffix) { @@ -2520,9 +2609,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 - * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for - * more information. + * bank accounts in other currencies. See local + * details for more information. */ public BillingRequestCollectBankAccountRequest withAccountType(AccountType accountType) { this.accountType = accountType; @@ -2530,9 +2619,9 @@ public BillingRequestCollectBankAccountRequest withAccountType(AccountType accou } /** - * Bank code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Bank code - see local + * details for more information. Alternatively you can provide an iban. */ public BillingRequestCollectBankAccountRequest withBankCode(String bankCode) { this.bankCode = bankCode; @@ -2540,9 +2629,9 @@ public BillingRequestCollectBankAccountRequest withBankCode(String bankCode) { } /** - * Branch code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Branch code - see local + * details for more information. Alternatively you can provide an iban. */ public BillingRequestCollectBankAccountRequest withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -2550,9 +2639,10 @@ 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). - * Defaults to the country code of the `iban` if supplied, otherwise is required. + * ISO + * 3166-1 alpha-2 code. Defaults to the country code of the iban if + * supplied, otherwise is required. */ public BillingRequestCollectBankAccountRequest withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -2560,8 +2650,8 @@ public BillingRequestCollectBankAccountRequest withCountryCode(String countryCod } /** - * 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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public BillingRequestCollectBankAccountRequest withCurrency(String currency) { this.currency = currency; @@ -2569,10 +2659,12 @@ public BillingRequestCollectBankAccountRequest withCurrency(String currency) { } /** - * 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). + * International Bank Account Number. Alternatively you can provide local + * details. IBANs are not accepted for Swedish bank accounts denominated in SEK - you + * must supply + * local + * details. */ public BillingRequestCollectBankAccountRequest withIban(String iban) { this.iban = iban; @@ -2908,9 +3000,9 @@ protected String getRequestEnvelope() { /** * Request class for {@link BillingRequestService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * billing requests. + * Returns a cursor-paginated + * list of your billing requests. */ public static final class BillingRequestListRequest extends ListRequest { private String createdAt; @@ -2934,9 +3026,9 @@ public BillingRequestListRequest withBefore(String before) { } /** - * Fixed timestamp - * (https://developer.gocardless.com/api-reference/#api-usage-dates-and-times), recording - * when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public BillingRequestListRequest withCreatedAt(String createdAt) { this.createdAt = createdAt; @@ -2944,9 +3036,9 @@ public BillingRequestListRequest withCreatedAt(String createdAt) { } /** - * 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. + * ID of a customer. + * If specified, this endpoint will return all requests for the given customer. */ public BillingRequestListRequest withCustomer(String customer) { this.customer = customer; @@ -2964,10 +3056,15 @@ 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; @@ -3073,7 +3170,7 @@ public static final class BillingRequestNotifyRequest extends PostRequestemail. */ public BillingRequestNotifyRequest withNotificationType(String notificationType) { this.notificationType = notificationType; @@ -3200,8 +3297,8 @@ public static final class BillingRequestChooseCurrencyRequest private Map metadata; /** - * 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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public BillingRequestChooseCurrencyRequest withCurrency(String currency) { this.currency = currency; @@ -3286,10 +3383,10 @@ 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) - * alpha-2 code. The country code of the institution. If nothing is provided, institutions - * with the country code 'GB' are returned by default. + * ISO + * 3166-1 alpha-2 code. The country code of the institution. If nothing is provided, + * institutions with the country code 'GB' are returned by default. */ public BillingRequestSelectInstitutionRequest withCountryCode(String countryCode) { this.countryCode = countryCode; diff --git a/src/main/java/com/gocardless/services/BillingRequestTemplateService.java b/src/main/java/com/gocardless/services/BillingRequestTemplateService.java index c54b6a69..1d6a9a75 100644 --- a/src/main/java/com/gocardless/services/BillingRequestTemplateService.java +++ b/src/main/java/com/gocardless/services/BillingRequestTemplateService.java @@ -36,9 +36,9 @@ public BillingRequestTemplateService(HttpClient httpClient) { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * Billing Request Templates. + * Returns a cursor-paginated + * list of your Billing Request Templates. */ public BillingRequestTemplateListRequest> list() { return new BillingRequestTemplateListRequest<>(httpClient, @@ -75,9 +75,9 @@ public BillingRequestTemplateUpdateRequest update(String identity) { /** * Request class for {@link BillingRequestTemplateService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * Billing Request Templates. + * Returns a cursor-paginated + * list of your Billing Request Templates. */ public static final class BillingRequestTemplateListRequest extends ListRequest { @@ -108,11 +108,12 @@ public BillingRequestTemplateListRequest withLimit(Integer limit) { } /** - * (Optional) A scheme used for Open Banking payments. Currently `faster_payments` is - * supported in the UK (GBP) and `sepa_credit_transfer` and `sepa_instant_credit_transfer` - * are supported in supported Eurozone countries (EUR). For Eurozone countries, - * `sepa_credit_transfer` is used as the default. Please be aware that - * `sepa_instant_credit_transfer` may incur an additional fee for your customer. + * (Optional) A scheme used for Open Banking payments. Currently + * faster_payments is supported in the UK (GBP) and + * sepa_credit_transfer and sepa_instant_credit_transfer are + * supported in supported Eurozone countries (EUR). For Eurozone countries, + * sepa_credit_transfer is used as the default. Please be aware that + * sepa_instant_credit_transfer may incur an additional fee for your customer. */ public BillingRequestTemplateListRequest withPaymentRequestScheme( String paymentRequestScheme) { @@ -229,9 +230,9 @@ public BillingRequestTemplateCreateRequest withLinks(Links links) { } /** - * ID of the associated creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only required - * if your account manages multiple creditors. + * ID of the associated creditor. + * Only required if your account manages multiple creditors. */ public BillingRequestTemplateCreateRequest withLinksCreditor(String creditor) { if (links == null) { @@ -269,7 +270,8 @@ 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) { @@ -283,7 +285,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) { @@ -297,10 +299,10 @@ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsPaymentM /** * 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. + * max_amount_per_payment which caps a single payment. * - * Note: Required for VRP, where exactly one periodic limit must be provided. Optional for - * PayTo. + * Note: Required for VRP, where exactly one periodic limit must be provided. + * Optional for PayTo. */ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsPeriodicLimits( List periodicLimits) { @@ -327,7 +329,7 @@ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsStartDat } /** - * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 currency code. */ public BillingRequestTemplateCreateRequest withMandateRequestCurrency( String mandateRequestCurrency) { @@ -431,9 +433,9 @@ public BillingRequestTemplateCreateRequest withPaymentRequestAmount( } /** - * 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. + * ISO 4217 currency code. + * GBP and EUR supported; GBP with your customers in + * the UK and for EUR with your customers in supported Eurozone countries only. */ public BillingRequestTemplateCreateRequest withPaymentRequestCurrency( String paymentRequestCurrency) { @@ -477,11 +479,12 @@ public BillingRequestTemplateCreateRequest withPaymentRequestMetadata(String key } /** - * (Optional) A scheme used for Open Banking payments. Currently `faster_payments` is - * supported in the UK (GBP) and `sepa_credit_transfer` and `sepa_instant_credit_transfer` - * are supported in supported Eurozone countries (EUR). For Eurozone countries, - * `sepa_credit_transfer` is used as the default. Please be aware that - * `sepa_instant_credit_transfer` may incur an additional fee for your customer. + * (Optional) A scheme used for Open Banking payments. Currently + * faster_payments is supported in the UK (GBP) and + * sepa_credit_transfer and sepa_instant_credit_transfer are + * supported in supported Eurozone countries (EUR). For Eurozone countries, + * sepa_credit_transfer is used as the default. Please be aware that + * sepa_instant_credit_transfer may incur an additional fee for your customer. */ public BillingRequestTemplateCreateRequest withPaymentRequestScheme( String paymentRequestScheme) { @@ -547,9 +550,9 @@ public static class Links { private String creditor; /** - * ID of the associated creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only - * required if your account manages multiple creditors. + * ID of the associated creditor. + * Only required if your account manages multiple creditors. */ public Links withCreditor(String creditor) { this.creditor = creditor; @@ -564,21 +567,27 @@ public static class PeriodicLimits { private Period period; /** - * The alignment of the period. Defaults to `creation_date` if not specified. + * 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 + *
    + *
  • 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` - 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 + *
    + *
  • 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`. + * Note: Has no effect when period is flexible. */ public PeriodicLimits withAlignment(Alignment alignment) { this.alignment = alignment; @@ -588,7 +597,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; @@ -599,7 +608,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; @@ -683,8 +692,8 @@ 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 - * PayTo and VRP. + * 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; @@ -694,7 +703,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; @@ -704,10 +713,10 @@ public MandateRequestConstraints withPaymentMethod(String paymentMethod) { /** * 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. + * max_amount_per_payment which caps a single payment. * - * Note: Required for VRP, where exactly one periodic limit must be provided. Optional - * for PayTo. + * Note: Required for VRP, where exactly one periodic limit must be provided. + * Optional for PayTo. */ public MandateRequestConstraints withPeriodicLimits( List periodicLimits) { @@ -781,7 +790,8 @@ 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) { @@ -795,7 +805,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) { @@ -809,10 +819,10 @@ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsPaymentM /** * 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. + * max_amount_per_payment which caps a single payment. * - * Note: Required for VRP, where exactly one periodic limit must be provided. Optional for - * PayTo. + * Note: Required for VRP, where exactly one periodic limit must be provided. + * Optional for PayTo. */ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsPeriodicLimits( List periodicLimits) { @@ -839,7 +849,7 @@ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsStartDat } /** - * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 currency code. */ public BillingRequestTemplateUpdateRequest withMandateRequestCurrency( String mandateRequestCurrency) { @@ -943,9 +953,9 @@ public BillingRequestTemplateUpdateRequest withPaymentRequestAmount( } /** - * 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. + * ISO 4217 currency code. + * GBP and EUR supported; GBP with your customers in + * the UK and for EUR with your customers in supported Eurozone countries only. */ public BillingRequestTemplateUpdateRequest withPaymentRequestCurrency( String paymentRequestCurrency) { @@ -989,11 +999,12 @@ public BillingRequestTemplateUpdateRequest withPaymentRequestMetadata(String key } /** - * (Optional) A scheme used for Open Banking payments. Currently `faster_payments` is - * supported in the UK (GBP) and `sepa_credit_transfer` and `sepa_instant_credit_transfer` - * are supported in supported Eurozone countries (EUR). For Eurozone countries, - * `sepa_credit_transfer` is used as the default. Please be aware that - * `sepa_instant_credit_transfer` may incur an additional fee for your customer. + * (Optional) A scheme used for Open Banking payments. Currently + * faster_payments is supported in the UK (GBP) and + * sepa_credit_transfer and sepa_instant_credit_transfer are + * supported in supported Eurozone countries (EUR). For Eurozone countries, + * sepa_credit_transfer is used as the default. Please be aware that + * sepa_instant_credit_transfer may incur an additional fee for your customer. */ public BillingRequestTemplateUpdateRequest withPaymentRequestScheme( String paymentRequestScheme) { @@ -1054,21 +1065,27 @@ public static class PeriodicLimits { private Period period; /** - * The alignment of the period. Defaults to `creation_date` if not specified. + * 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 + *
    + *
  • 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` - 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 + *
    + *
  • 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`. + * Note: Has no effect when period is flexible. */ public PeriodicLimits withAlignment(Alignment alignment) { this.alignment = alignment; @@ -1078,7 +1095,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; @@ -1089,7 +1106,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; @@ -1173,8 +1190,8 @@ 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 - * PayTo and VRP. + * 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; @@ -1184,7 +1201,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; @@ -1194,10 +1211,10 @@ public MandateRequestConstraints withPaymentMethod(String paymentMethod) { /** * 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. + * max_amount_per_payment which caps a single payment. * - * Note: Required for VRP, where exactly one periodic limit must be provided. Optional - * for PayTo. + * 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 4b9f7677..aa362f5b 100644 --- a/src/main/java/com/gocardless/services/BillingRequestWithActionService.java +++ b/src/main/java/com/gocardless/services/BillingRequestWithActionService.java @@ -15,9 +15,8 @@ * 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 for how-to's, explanations and tutorials. */ public class BillingRequestWithActionService { private final HttpClient httpClient; @@ -131,9 +130,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 for more information. */ public BillingRequestWithActionCreateWithActionsRequest withFallbackEnabled( Boolean fallbackEnabled) { @@ -147,9 +146,9 @@ public BillingRequestWithActionCreateWithActionsRequest withLinks(Links links) { } /** - * ID of the associated creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only required - * if your account manages multiple creditors. + * ID of the associated creditor. + * Only required if your account manages multiple creditors. */ public BillingRequestWithActionCreateWithActionsRequest withLinksCreditor(String creditor) { if (links == null) { @@ -160,9 +159,9 @@ public BillingRequestWithActionCreateWithActionsRequest withLinksCreditor(String } /** - * ID of the customer - * (https://developer.gocardless.com/api-reference/#core-endpoints-customers) against which - * this request should be made. + * ID of the customer + * against which this request should be made. */ public BillingRequestWithActionCreateWithActionsRequest withLinksCustomer(String customer) { if (links == null) { @@ -173,8 +172,8 @@ public BillingRequestWithActionCreateWithActionsRequest withLinksCustomer(String } /** - * (Optional) ID of the customer_bank_account - * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts) + * (Optional) ID of the customer_bank_account * against which this request should be made. */ public BillingRequestWithActionCreateWithActionsRequest withLinksCustomerBankAccount( @@ -193,8 +192,8 @@ 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. * * 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 @@ -224,7 +223,7 @@ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestConstr } /** - * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 currency code. */ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestCurrency( String currency) { @@ -251,9 +250,12 @@ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestDescri /** * This field will decide how GoCardless handles settlement of funds from the customer. * - * - `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. + *
    + *
  • 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) { @@ -278,10 +280,10 @@ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestMetada } /** - * 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. + * Unique reference. Different schemes have different length and character + * set requirements. GoCardless will generate a unique reference satisfying the + * different scheme requirements if this field is left blank. */ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestReference( String reference) { @@ -324,23 +326,28 @@ 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 - * - * 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`. + *
    + *
  • 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. + * 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. + * See Billing + * Requests: Creating Verified Mandates for more information. */ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestVerify( MandateRequest.Verify verify) { @@ -389,9 +396,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 for the complete list of valid codes. */ public BillingRequestWithActionCreateWithActionsRequest withPaymentPurposeCode( String paymentPurposeCode) { @@ -432,9 +439,9 @@ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestAppFee } /** - * 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. + * ISO 4217 currency code. + * GBP and EUR supported; GBP with your customers in + * the UK and for EUR with your customers in supported Eurozone countries only. */ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestCurrency( String currency) { @@ -461,9 +468,12 @@ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestDescri /** * This field will decide how GoCardless handles settlement of funds from the customer. * - * - `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. + *
    + *
  • 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) { @@ -502,11 +512,16 @@ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestRefere } /** - * 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. + * On failure, automatically retry payments using + * intelligent retries. + * Default is false. + *

+ * Important: To be able to use intelligent retries, Success+ needs to be + * enabled in GoCardless dashboard. + *

+ *

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

*/ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestRetryIfPossible( Boolean retryIfPossible) { @@ -518,11 +533,12 @@ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestRetryI } /** - * (Optional) A scheme used for Open Banking payments. Currently `faster_payments` is - * supported in the UK (GBP) and `sepa_credit_transfer` and `sepa_instant_credit_transfer` - * are supported in supported Eurozone countries (EUR). For Eurozone countries, - * `sepa_credit_transfer` is used as the default. Please be aware that - * `sepa_instant_credit_transfer` may incur an additional fee for your customer. + * (Optional) A scheme used for Open Banking payments. Currently + * faster_payments is supported in the UK (GBP) and + * sepa_credit_transfer and sepa_instant_credit_transfer are + * supported in supported Eurozone countries (EUR). For Eurozone countries, + * sepa_credit_transfer is used as the default. Please be aware that + * sepa_instant_credit_transfer may incur an additional fee for your customer. */ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestScheme( String scheme) { @@ -536,9 +552,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 for the complete list of valid codes. */ public BillingRequestWithActionCreateWithActionsRequest withPurposeCode( PurposeCode purposeCode) { @@ -674,8 +690,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). + * unless the request includes a customer + * bank account token. */ public CollectBankAccount withAccountHolderName(String accountHolderName) { this.accountHolderName = accountHolderName; @@ -683,9 +700,9 @@ public CollectBankAccount withAccountHolderName(String accountHolderName) { } /** - * 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`. + * Bank account number - see local + * details for more information. Alternatively you can provide an iban. */ public CollectBankAccount withAccountNumber(String accountNumber) { this.accountNumber = accountNumber; @@ -693,9 +710,9 @@ public CollectBankAccount withAccountNumber(String accountNumber) { } /** - * 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. + * Account number suffix (only for bank accounts denominated in NZD) - see local + * details for more information. */ public CollectBankAccount withAccountNumberSuffix(String accountNumberSuffix) { this.accountNumberSuffix = accountNumberSuffix; @@ -704,9 +721,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 - * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) - * for more information. + * for bank accounts in other currencies. See local + * details for more information. */ public CollectBankAccount withAccountType(AccountType accountType) { this.accountType = accountType; @@ -714,9 +731,9 @@ public CollectBankAccount withAccountType(AccountType accountType) { } /** - * Bank code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for - * more information. Alternatively you can provide an `iban`. + * Bank code - see local + * details for more information. Alternatively you can provide an iban. */ public CollectBankAccount withBankCode(String bankCode) { this.bankCode = bankCode; @@ -724,9 +741,9 @@ public CollectBankAccount withBankCode(String bankCode) { } /** - * Branch code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for - * more information. Alternatively you can provide an `iban`. + * Branch code - see local + * details for more information. Alternatively you can provide an iban. */ public CollectBankAccount withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -734,9 +751,10 @@ 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). - * Defaults to the country code of the `iban` if supplied, otherwise is required. + * ISO + * 3166-1 alpha-2 code. Defaults to the country code of the iban if + * supplied, otherwise is required. */ public CollectBankAccount withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -744,8 +762,9 @@ public CollectBankAccount withCountryCode(String countryCode) { } /** - * 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. + * ISO 4217 currency + * code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + * supported. */ public CollectBankAccount withCurrency(String currency) { this.currency = currency; @@ -753,10 +772,12 @@ public CollectBankAccount withCurrency(String currency) { } /** - * 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). + * International Bank Account Number. Alternatively you can provide local + * details. IBANs are not accepted for Swedish bank accounts denominated in SEK - + * you must supply local + * details. */ public CollectBankAccount withIban(String iban) { this.iban = iban; @@ -842,10 +863,11 @@ public static class Customer { private String phoneNumber; /** - * Customer's company name. Required unless a `given_name` and `family_name` are - * provided. For Canadian customers, the use of a `company_name` value will mean that - * any mandate created from this customer will be considered to be a "Business PAD" - * (otherwise, any mandate will be considered to be a "Personal PAD"). + * Customer's company name. Required unless a given_name and + * family_name are provided. For Canadian customers, the use of a + * company_name value will mean that any mandate created from this customer + * will be considered to be a "Business PAD" (otherwise, any mandate will be considered + * to be a "Personal PAD"). */ public Customer withCompanyName(String companyName) { this.companyName = companyName; @@ -862,7 +884,7 @@ public Customer withEmail(String email) { } /** - * Customer's surname. Required unless a `company_name` is provided. + * Customer's surname. Required unless a company_name is provided. */ public Customer withFamilyName(String familyName) { this.familyName = familyName; @@ -870,7 +892,7 @@ public Customer withFamilyName(String familyName) { } /** - * Customer's first name. Required unless a `company_name` is provided. + * Customer's first name. Required unless a company_name is provided. */ public Customer withGivenName(String givenName) { this.givenName = givenName; @@ -878,14 +900,14 @@ public Customer withGivenName(String givenName) { } /** - * 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 - * (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". + * ISO 639-1 code. + * Used as the language for notification emails sent by GoCardless if your organisation + * does not send its own (see 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 Customer withLanguage(String language) { this.language = language; @@ -902,8 +924,8 @@ public Customer withMetadata(Map metadata) { } /** - * ITU E.123 (https://en.wikipedia.org/wiki/E.123) formatted phone number, including - * country code. + * ITU E.123 formatted phone number, + * including country code. */ public Customer withPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; @@ -982,8 +1004,9 @@ 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. */ public CustomerBillingDetail withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -1004,8 +1027,8 @@ public CustomerBillingDetail withDanishIdentityNumber(String danishIdentityNumbe * address of the payer to whom the mandate belongs (i.e. as a result of their * completion of a mandate setup flow in their browser). * - * Not required for creating offline mandates where `authorisation_source` is set to - * telephone or paper. + * Not required for creating offline mandates where authorisation_source is + * set to telephone or paper. */ public CustomerBillingDetail withIpAddress(String ipAddress) { this.ipAddress = ipAddress; @@ -1022,8 +1045,8 @@ 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 - * (e.g. `CA` for California). + * ISO3166-2:US state code is + * required (e.g. CA for California). */ public CustomerBillingDetail withRegion(String region) { this.region = region; @@ -1151,9 +1174,9 @@ public static class SelectInstitution { private String institution; /** - * 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, + * ISO + * 3166-1 alpha-2 code. The country code of the institution. If nothing is provided, * institutions with the country code 'GB' are returned by default. */ public SelectInstitution withCountryCode(String countryCode) { @@ -1233,9 +1256,9 @@ public static class Links { private String customerBankAccount; /** - * ID of the associated creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only - * required if your account manages multiple creditors. + * ID of the associated creditor. + * Only required if your account manages multiple creditors. */ public Links withCreditor(String creditor) { this.creditor = creditor; @@ -1243,9 +1266,9 @@ public Links withCreditor(String creditor) { } /** - * ID of the customer - * (https://developer.gocardless.com/api-reference/#core-endpoints-customers) against - * which this request should be made. + * ID of the customer + * against which this request should be made. */ public Links withCustomer(String customer) { this.customer = customer; @@ -1253,8 +1276,8 @@ public Links withCustomer(String customer) { } /** - * (Optional) ID of the customer_bank_account - * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts) + * (Optional) ID of the customer_bank_account * against which this request should be made. */ public Links withCustomerBankAccount(String customerBankAccount) { @@ -1270,21 +1293,27 @@ public static class PeriodicLimits { private Period period; /** - * The alignment of the period. Defaults to `creation_date` if not specified. + * 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 + *
    + *
  • 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` - 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 + *
    + *
  • 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`. + * Note: Has no effect when period is flexible. */ public PeriodicLimits withAlignment(Alignment alignment) { this.alignment = alignment; @@ -1294,7 +1323,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; @@ -1305,7 +1334,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; @@ -1389,8 +1418,8 @@ 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 - * PayTo and VRP. + * 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; @@ -1400,7 +1429,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; @@ -1410,10 +1439,10 @@ public Constraints withPaymentMethod(String paymentMethod) { /** * 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. + * max_amount_per_payment which caps a single payment. * - * Note: Required for VRP, where exactly one periodic limit must be provided. Optional - * for PayTo. + * Note: Required for VRP, where exactly one periodic limit must be provided. + * Optional for PayTo. */ public Constraints withPeriodicLimits(List periodicLimits) { this.periodicLimits = periodicLimits; @@ -1465,8 +1494,8 @@ 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. * * 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) @@ -1489,7 +1518,8 @@ public MandateRequest withConstraints(Constraints constraints) { } /** - * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 currency + * code. */ public MandateRequest withCurrency(String currency) { this.currency = currency; @@ -1508,9 +1538,12 @@ public MandateRequest withDescription(String description) { /** * This field will decide how GoCardless handles settlement of funds from the customer. * - * - `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. + *
    + *
  • 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; @@ -1527,10 +1560,10 @@ public MandateRequest withMetadata(Map metadata) { } /** - * 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. + * Unique reference. Different schemes have different length and character + * set 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; @@ -1561,25 +1594,29 @@ 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 - * - * 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`. + *
    + *
  • 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. + * 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. + * See Billing + * Requests: Creating Verified Mandates for more information. */ public MandateRequest withVerify(Verify verify) { this.verify = verify; @@ -1656,9 +1693,10 @@ public PaymentRequest withAppFee(Integer appFee) { } /** - * 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. + * ISO 4217 currency + * code. GBP and EUR supported; GBP with your + * customers in the UK and for EUR with your customers in supported + * Eurozone countries only. */ public PaymentRequest withCurrency(String currency) { this.currency = currency; @@ -1677,9 +1715,12 @@ public PaymentRequest withDescription(String description) { /** * This field will decide how GoCardless handles settlement of funds from the customer. * - * - `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. + *
    + *
  • 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; @@ -1706,11 +1747,17 @@ public PaymentRequest withReference(String reference) { } /** - * 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. + * On failure, automatically retry payments using + * intelligent + * retries. Default is false. + *

+ * Important: To be able to use intelligent retries, Success+ needs to + * be enabled in GoCardless + * dashboard. + *

+ *

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

*/ public PaymentRequest withRetryIfPossible(Boolean retryIfPossible) { this.retryIfPossible = retryIfPossible; @@ -1718,11 +1765,12 @@ public PaymentRequest withRetryIfPossible(Boolean retryIfPossible) { } /** - * (Optional) A scheme used for Open Banking payments. Currently `faster_payments` is - * supported in the UK (GBP) and `sepa_credit_transfer` and - * `sepa_instant_credit_transfer` are supported in supported Eurozone countries (EUR). - * For Eurozone countries, `sepa_credit_transfer` is used as the default. Please be - * aware that `sepa_instant_credit_transfer` may incur an additional fee for your + * (Optional) A scheme used for Open Banking payments. Currently + * faster_payments is supported in the UK (GBP) and + * sepa_credit_transfer and sepa_instant_credit_transfer are + * supported in supported Eurozone countries (EUR). For Eurozone countries, + * sepa_credit_transfer is used as the default. Please be aware that + * sepa_instant_credit_transfer may incur an additional fee for your * customer. */ public PaymentRequest withScheme(String scheme) { diff --git a/src/main/java/com/gocardless/services/BlockService.java b/src/main/java/com/gocardless/services/BlockService.java index 4886a47b..440cac2d 100644 --- a/src/main/java/com/gocardless/services/BlockService.java +++ b/src/main/java/com/gocardless/services/BlockService.java @@ -23,16 +23,19 @@ * * Please note: * - * - Payments and subscriptions cannot be created against a mandate in blocked state. - A mandate - * can never be transitioned out of the blocked state. - * + *
    + *
  • Payments and subscriptions cannot be created against a mandate in blocked state.
  • + *
  • A mandate can never be transitioned out of the blocked state.
  • + *
* The one exception to this is when blocking a 'bank_name'. This block will prevent bank accounts * from being created for banks that match the given name. To ensure we match bank names correctly * 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 - * (mailto:help@gocardless.com) if you would like to use this API. + *

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

*/ public class BlockService { private final HttpClient httpClient; @@ -60,9 +63,9 @@ public BlockGetRequest get(String identity) { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * blocks. + * Returns a cursor-paginated + * list of your blocks. */ public BlockListRequest> list() { return new BlockListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -244,9 +247,9 @@ protected Class getResponseClass() { /** * Request class for {@link BlockService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * blocks. + * Returns a cursor-paginated + * list of your blocks. */ public static final class BlockListRequest extends ListRequest { private String block; @@ -272,7 +275,8 @@ public BlockListRequest withBefore(String before) { } /** - * ID of a Block (https://developer.gocardless.com/api-reference/#core-endpoints-blocks). + * ID of a Block. */ public BlockListRequest withBlock(String block) { this.block = block; @@ -289,9 +293,9 @@ public BlockListRequest withBlockType(String blockType) { } /** - * Fixed timestamp - * (https://developer.gocardless.com/api-reference/#api-usage-dates-and-times), recording - * when this resource was created. + * Fixed timestamp, + * recording when this resource was created. */ public BlockListRequest withCreatedAt(String createdAt) { this.createdAt = createdAt; @@ -317,9 +321,9 @@ public BlockListRequest withReasonType(String reasonType) { } /** - * Fixed timestamp - * (https://developer.gocardless.com/api-reference/#api-usage-dates-and-times), recording - * when this resource was updated. + * Fixed timestamp, + * 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 f4d9ad93..1cd2b03e 100644 --- a/src/main/java/com/gocardless/services/CreditorBankAccountService.java +++ b/src/main/java/com/gocardless/services/CreditorBankAccountService.java @@ -12,17 +12,20 @@ /** * Service class for working with creditor bank account resources. * - * 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. + * Creditor Bank Accounts hold the bank details of a + * creditor. + * These are the bank accounts which your + * 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. + * 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,9 +47,9 @@ public CreditorBankAccountCreateRequest create() { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * creditor bank accounts. + * Returns a cursor-paginated + * list of your creditor bank accounts. */ public CreditorBankAccountListRequest> list() { return new CreditorBankAccountListRequest<>(httpClient, @@ -68,7 +71,8 @@ public CreditorBankAccountGetRequest get(String identity) { /** * Immediately disables the bank account, no money can be paid out to a disabled account. * - * This will return a `disable_failed` error if the bank account has already been disabled. + * This will return a disable_failed error if the bank account has already been + * disabled. * * A disabled bank account can be re-enabled by creating a new bank account resource with the * same details. @@ -98,9 +102,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 - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). This field - * will be transliterated, upcased and truncated to 18 characters. + * stored with the linked creditor. + * This field will be transliterated, upcased and truncated to 18 characters. */ public CreditorBankAccountCreateRequest withAccountHolderName(String accountHolderName) { this.accountHolderName = accountHolderName; @@ -108,9 +112,9 @@ public CreditorBankAccountCreateRequest withAccountHolderName(String accountHold } /** - * 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`. + * Bank account number - see local + * details for more information. Alternatively you can provide an iban. */ public CreditorBankAccountCreateRequest withAccountNumber(String accountNumber) { this.accountNumber = accountNumber; @@ -119,9 +123,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 - * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for - * more information. + * bank accounts in other currencies. See local + * details for more information. */ public CreditorBankAccountCreateRequest withAccountType(AccountType accountType) { this.accountType = accountType; @@ -129,9 +133,9 @@ public CreditorBankAccountCreateRequest withAccountType(AccountType accountType) } /** - * Bank code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Bank code - see local + * details for more information. Alternatively you can provide an iban. */ public CreditorBankAccountCreateRequest withBankCode(String bankCode) { this.bankCode = bankCode; @@ -139,9 +143,9 @@ public CreditorBankAccountCreateRequest withBankCode(String bankCode) { } /** - * Branch code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Branch code - see local + * details for more information. Alternatively you can provide an iban. */ public CreditorBankAccountCreateRequest withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -149,9 +153,10 @@ 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). - * Defaults to the country code of the `iban` if supplied, otherwise is required. + * ISO + * 3166-1 alpha-2 code. Defaults to the country code of the iban if + * supplied, otherwise is required. */ public CreditorBankAccountCreateRequest withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -159,8 +164,8 @@ public CreditorBankAccountCreateRequest withCountryCode(String countryCode) { } /** - * 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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public CreditorBankAccountCreateRequest withCurrency(String currency) { this.currency = currency; @@ -168,10 +173,12 @@ public CreditorBankAccountCreateRequest withCurrency(String currency) { } /** - * 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). + * International Bank Account Number. Alternatively you can provide local + * details. IBANs are not accepted for Swedish bank accounts denominated in SEK - you + * must supply + * local + * details. */ public CreditorBankAccountCreateRequest withIban(String iban) { this.iban = iban; @@ -184,9 +191,9 @@ public CreditorBankAccountCreateRequest withLinks(Links links) { } /** - * ID of the creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors) that owns this - * bank account. + * ID of the creditor + * that owns this bank account. */ public CreditorBankAccountCreateRequest withLinksCreditor(String creditor) { if (links == null) { @@ -218,8 +225,8 @@ public CreditorBankAccountCreateRequest withMetadata(String key, String value) { } /** - * Defaults to `true`. When this is set to `true`, it will cause this bank account to be set - * as the account that GoCardless will pay out to. + * Defaults to true. When this is set to true, it will cause this + * bank account to be set as the account that GoCardless will pay out to. */ public CreditorBankAccountCreateRequest withSetAsDefaultPayoutAccount( Boolean setAsDefaultPayoutAccount) { @@ -287,9 +294,9 @@ public static class Links { private String creditor; /** - * ID of the creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors) that owns - * this bank account. + * ID of the creditor + * that owns this bank account. */ public Links withCreditor(String creditor) { this.creditor = creditor; @@ -301,9 +308,9 @@ public Links withCreditor(String creditor) { /** * Request class for {@link CreditorBankAccountService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * creditor bank accounts. + * Returns a cursor-paginated + * list of your creditor bank accounts. */ public static final class CreditorBankAccountListRequest extends ListRequest { @@ -385,8 +392,8 @@ public CreditorBankAccountListRequest withCreditor(String creditor) { } /** - * If `true`, only return enabled bank accounts. If `false`, only return disabled bank - * accounts. + * If true, only return enabled bank accounts. If false, only + * return disabled bank accounts. */ public CreditorBankAccountListRequest withEnabled(Boolean enabled) { this.enabled = enabled; @@ -547,7 +554,8 @@ protected Class getResponseClass() { * * Immediately disables the bank account, no money can be paid out to a disabled account. * - * This will return a `disable_failed` error if the bank account has already been disabled. + * This will return a disable_failed error if the bank account has already been + * disabled. * * A disabled bank account can be re-enabled by creating a new bank account resource with the * same details. diff --git a/src/main/java/com/gocardless/services/CreditorService.java b/src/main/java/com/gocardless/services/CreditorService.java index 4ec55c67..cadb7b6e 100644 --- a/src/main/java/com/gocardless/services/CreditorService.java +++ b/src/main/java/com/gocardless/services/CreditorService.java @@ -12,10 +12,11 @@ /** * Service class for working with creditor resources. * - * 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. + * Each + * payment + * 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. @@ -39,9 +40,9 @@ public CreditorCreateRequest create() { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * creditors. + * Returns a cursor-paginated + * list of your creditors. */ public CreditorListRequest> list() { return new CreditorListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -79,8 +80,8 @@ public static final class CreditorCreateRequest extends IdempotentPostRequestbank_reference_prefix was ACME, the bank reference + * of a payout sent to that creditor could be ACME-8G7Q8. * * This prefix is also used for refunds in EUR and GBP. */ @@ -90,8 +91,9 @@ public CreditorCreateRequest withBankReferencePrefix(String bankReferencePrefix) } /** - * 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. */ public CreditorCreateRequest withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -99,8 +101,9 @@ public CreditorCreateRequest withCountryCode(String countryCode) { } /** - * The type of business of the creditor. Currently, `individual`, `company`, `charity`, - * `partnership`, and `trust` are supported. + * The type of business of the creditor. Currently, individual, + * company, charity, partnership, and + * trust are supported. */ public CreditorCreateRequest withCreditorType(CreditorType creditorType) { this.creditorType = creditorType; @@ -190,9 +193,9 @@ public String toString() { /** * Request class for {@link CreditorService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * creditors. + * Returns a cursor-paginated + * list of your creditors. */ public static final class CreditorListRequest extends ListRequest { private CreatedAt createdAt; @@ -456,8 +459,8 @@ public CreditorUpdateRequest withAddressLine3(String addressLine3) { /** * Prefix for the bank reference of payouts sent to this creditor. For instance, if the - * creditor's `bank_reference_prefix` was `ACME`, the bank reference of a payout sent to - * that creditor could be `ACME-8G7Q8`. + * creditor's bank_reference_prefix was ACME, the bank reference + * of a payout sent to that creditor could be ACME-8G7Q8. * * This prefix is also used for refunds in EUR and GBP. */ @@ -475,8 +478,9 @@ 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. */ public CreditorUpdateRequest withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -489,9 +493,9 @@ public CreditorUpdateRequest withLinks(Links links) { } /** - * 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. + * ID of the bank + * account which is set up to receive payouts in AUD. */ public CreditorUpdateRequest withLinksDefaultAudPayoutAccount( String defaultAudPayoutAccount) { @@ -503,9 +507,9 @@ public CreditorUpdateRequest withLinksDefaultAudPayoutAccount( } /** - * 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. + * ID of the bank + * account which is set up to receive payouts in CAD. */ public CreditorUpdateRequest withLinksDefaultCadPayoutAccount( String defaultCadPayoutAccount) { @@ -517,9 +521,9 @@ public CreditorUpdateRequest withLinksDefaultCadPayoutAccount( } /** - * 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. + * ID of the bank + * account which is set up to receive payouts in DKK. */ public CreditorUpdateRequest withLinksDefaultDkkPayoutAccount( String defaultDkkPayoutAccount) { @@ -531,9 +535,9 @@ public CreditorUpdateRequest withLinksDefaultDkkPayoutAccount( } /** - * 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. + * ID of the bank + * account which is set up to receive payouts in EUR. */ public CreditorUpdateRequest withLinksDefaultEurPayoutAccount( String defaultEurPayoutAccount) { @@ -545,9 +549,9 @@ public CreditorUpdateRequest withLinksDefaultEurPayoutAccount( } /** - * 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. + * ID of the bank + * account which is set up to receive payouts in GBP. */ public CreditorUpdateRequest withLinksDefaultGbpPayoutAccount( String defaultGbpPayoutAccount) { @@ -559,9 +563,9 @@ public CreditorUpdateRequest withLinksDefaultGbpPayoutAccount( } /** - * 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. + * ID of the bank + * account which is set up to receive payouts in NZD. */ public CreditorUpdateRequest withLinksDefaultNzdPayoutAccount( String defaultNzdPayoutAccount) { @@ -573,9 +577,9 @@ public CreditorUpdateRequest withLinksDefaultNzdPayoutAccount( } /** - * 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. + * ID of the bank + * account which is set up to receive payouts in SEK. */ public CreditorUpdateRequest withLinksDefaultSekPayoutAccount( String defaultSekPayoutAccount) { @@ -587,9 +591,9 @@ public CreditorUpdateRequest withLinksDefaultSekPayoutAccount( } /** - * 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. + * ID of the bank + * account which is set up to receive payouts in USD. */ public CreditorUpdateRequest withLinksDefaultUsdPayoutAccount( String defaultUsdPayoutAccount) { @@ -672,9 +676,9 @@ public static class Links { private String defaultUsdPayoutAccount; /** - * 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. + * ID of the bank + * account which is set up to receive payouts in AUD. */ public Links withDefaultAudPayoutAccount(String defaultAudPayoutAccount) { this.defaultAudPayoutAccount = defaultAudPayoutAccount; @@ -682,9 +686,9 @@ public Links withDefaultAudPayoutAccount(String defaultAudPayoutAccount) { } /** - * 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. + * ID of the bank + * account which is set up to receive payouts in CAD. */ public Links withDefaultCadPayoutAccount(String defaultCadPayoutAccount) { this.defaultCadPayoutAccount = defaultCadPayoutAccount; @@ -692,9 +696,9 @@ public Links withDefaultCadPayoutAccount(String defaultCadPayoutAccount) { } /** - * 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. + * ID of the bank + * account which is set up to receive payouts in DKK. */ public Links withDefaultDkkPayoutAccount(String defaultDkkPayoutAccount) { this.defaultDkkPayoutAccount = defaultDkkPayoutAccount; @@ -702,9 +706,9 @@ public Links withDefaultDkkPayoutAccount(String defaultDkkPayoutAccount) { } /** - * 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. + * ID of the bank + * account which is set up to receive payouts in EUR. */ public Links withDefaultEurPayoutAccount(String defaultEurPayoutAccount) { this.defaultEurPayoutAccount = defaultEurPayoutAccount; @@ -712,9 +716,9 @@ public Links withDefaultEurPayoutAccount(String defaultEurPayoutAccount) { } /** - * 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. + * ID of the bank + * account which is set up to receive payouts in GBP. */ public Links withDefaultGbpPayoutAccount(String defaultGbpPayoutAccount) { this.defaultGbpPayoutAccount = defaultGbpPayoutAccount; @@ -722,9 +726,9 @@ public Links withDefaultGbpPayoutAccount(String defaultGbpPayoutAccount) { } /** - * 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. + * ID of the bank + * account which is set up to receive payouts in NZD. */ public Links withDefaultNzdPayoutAccount(String defaultNzdPayoutAccount) { this.defaultNzdPayoutAccount = defaultNzdPayoutAccount; @@ -732,9 +736,9 @@ public Links withDefaultNzdPayoutAccount(String defaultNzdPayoutAccount) { } /** - * 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. + * ID of the bank + * account which is set up to receive payouts in SEK. */ public Links withDefaultSekPayoutAccount(String defaultSekPayoutAccount) { this.defaultSekPayoutAccount = defaultSekPayoutAccount; @@ -742,9 +746,9 @@ public Links withDefaultSekPayoutAccount(String defaultSekPayoutAccount) { } /** - * 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. + * ID of the bank + * account 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 fcaefb1c..7b8e4a13 100644 --- a/src/main/java/com/gocardless/services/CurrencyExchangeRateService.java +++ b/src/main/java/com/gocardless/services/CurrencyExchangeRateService.java @@ -25,9 +25,9 @@ public CurrencyExchangeRateService(HttpClient httpClient) { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of all - * exchange rates. + * Returns a cursor-paginated + * list of all exchange rates. */ public CurrencyExchangeRateListRequest> list() { return new CurrencyExchangeRateListRequest<>(httpClient, @@ -42,9 +42,9 @@ public CurrencyExchangeRateListRequest> all() { /** * Request class for {@link CurrencyExchangeRateService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of all - * exchange rates. + * Returns a cursor-paginated + * 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 ab9f0c7d..f66055cd 100644 --- a/src/main/java/com/gocardless/services/CustomerBankAccountService.java +++ b/src/main/java/com/gocardless/services/CustomerBankAccountService.java @@ -12,20 +12,20 @@ /** * Service class for working with customer bank account resources. * - * 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). + * Customer Bank Accounts hold the bank details of a + * customer. + * They always belong to a + * customer, + * and may be linked to several Direct Debit + * 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. + * 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 - * (https://developer.gocardless.com/api-reference/#bank-details-lookups-perform-a-bank-details-lookup), + * Note: To ensure the customer's bank accounts are valid, verify them first using bank_details_lookups, * before proceeding with creating the accounts */ public class CustomerBankAccountService { @@ -45,21 +45,27 @@ public CustomerBankAccountService(HttpClient httpClient) { * * There are three different ways to supply bank account 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) - * - * 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). + * + * For more information on the different fields required in each country, see + * local + * bank details. */ public CustomerBankAccountCreateRequest create() { return new CustomerBankAccountCreateRequest(httpClient); } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * bank accounts. + * Returns a cursor-paginated + * list of your bank accounts. */ public CustomerBankAccountListRequest> list() { return new CustomerBankAccountListRequest<>(httpClient, @@ -88,7 +94,8 @@ public CustomerBankAccountUpdateRequest update(String identity) { /** * Immediately cancels all associated mandates and cancellable payments. * - * This will return a `disable_failed` error if the bank account has already been disabled. + * This will return a disable_failed error if the bank account has already been + * disabled. * * A disabled bank account can be re-enabled by creating a new bank account resource with the * same details. @@ -104,12 +111,18 @@ public CustomerBankAccountDisableRequest disable(String identity) { * * There are three different ways to supply bank account 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) - * - * 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). + * + * For more information on the different fields required in each country, see + * local + * bank details. */ public static final class CustomerBankAccountCreateRequest extends IdempotentPostRequest { @@ -128,8 +141,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). + * unless the request includes a customer + * bank account token. */ public CustomerBankAccountCreateRequest withAccountHolderName(String accountHolderName) { this.accountHolderName = accountHolderName; @@ -137,9 +151,9 @@ public CustomerBankAccountCreateRequest withAccountHolderName(String accountHold } /** - * 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`. + * Bank account number - see local + * details for more information. Alternatively you can provide an iban. */ public CustomerBankAccountCreateRequest withAccountNumber(String accountNumber) { this.accountNumber = accountNumber; @@ -148,9 +162,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 - * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for - * more information. + * bank accounts in other currencies. See local + * details for more information. */ public CustomerBankAccountCreateRequest withAccountType(AccountType accountType) { this.accountType = accountType; @@ -158,9 +172,9 @@ public CustomerBankAccountCreateRequest withAccountType(AccountType accountType) } /** - * Bank code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Bank code - see local + * details for more information. Alternatively you can provide an iban. */ public CustomerBankAccountCreateRequest withBankCode(String bankCode) { this.bankCode = bankCode; @@ -168,9 +182,9 @@ public CustomerBankAccountCreateRequest withBankCode(String bankCode) { } /** - * Branch code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Branch code - see local + * details for more information. Alternatively you can provide an iban. */ public CustomerBankAccountCreateRequest withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -178,9 +192,10 @@ 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). - * Defaults to the country code of the `iban` if supplied, otherwise is required. + * ISO + * 3166-1 alpha-2 code. Defaults to the country code of the iban if + * supplied, otherwise is required. */ public CustomerBankAccountCreateRequest withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -188,8 +203,8 @@ public CustomerBankAccountCreateRequest withCountryCode(String countryCode) { } /** - * 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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public CustomerBankAccountCreateRequest withCurrency(String currency) { this.currency = currency; @@ -197,10 +212,12 @@ public CustomerBankAccountCreateRequest withCurrency(String currency) { } /** - * 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). + * International Bank Account Number. Alternatively you can provide local + * details. IBANs are not accepted for Swedish bank accounts denominated in SEK - you + * must supply + * local + * details. */ public CustomerBankAccountCreateRequest withIban(String iban) { this.iban = iban; @@ -213,9 +230,9 @@ public CustomerBankAccountCreateRequest withLinks(Links links) { } /** - * ID of the customer - * (https://developer.gocardless.com/api-reference/#core-endpoints-customers) that owns this - * bank account. + * ID of the customer + * that owns this bank account. */ public CustomerBankAccountCreateRequest withLinksCustomer(String customer) { if (links == null) { @@ -226,9 +243,9 @@ public CustomerBankAccountCreateRequest withLinksCustomer(String customer) { } /** - * 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. + * ID of a customer + * bank account token to use in place of bank account parameters. */ public CustomerBankAccountCreateRequest withLinksCustomerBankAccountToken( String customerBankAccountToken) { @@ -321,9 +338,9 @@ public static class Links { private String customerBankAccountToken; /** - * ID of the customer - * (https://developer.gocardless.com/api-reference/#core-endpoints-customers) that owns - * this bank account. + * ID of the customer + * that owns this bank account. */ public Links withCustomer(String customer) { this.customer = customer; @@ -331,9 +348,9 @@ public Links withCustomer(String customer) { } /** - * 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. + * ID of a customer + * bank account token to use in place of bank account parameters. */ public Links withCustomerBankAccountToken(String customerBankAccountToken) { this.customerBankAccountToken = customerBankAccountToken; @@ -345,9 +362,9 @@ public Links withCustomerBankAccountToken(String customerBankAccountToken) { /** * Request class for {@link CustomerBankAccountService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * bank accounts. + * Returns a cursor-paginated + * list of your bank accounts. */ public static final class CustomerBankAccountListRequest extends ListRequest { @@ -660,7 +677,8 @@ protected boolean hasBody() { * * Immediately cancels all associated mandates and cancellable payments. * - * This will return a `disable_failed` error if the bank account has already been disabled. + * This will return a disable_failed error if the bank account has already been + * disabled. * * A disabled bank account can be re-enabled by creating a new bank account resource with the * same details. diff --git a/src/main/java/com/gocardless/services/CustomerNotificationService.java b/src/main/java/com/gocardless/services/CustomerNotificationService.java index d454d69d..565678ff 100644 --- a/src/main/java/com/gocardless/services/CustomerNotificationService.java +++ b/src/main/java/com/gocardless/services/CustomerNotificationService.java @@ -10,13 +10,15 @@ * * Customer Notifications represent the notification which is due to be sent to a customer after an * event has happened. The event, the resource and the customer to be notified are all identified in - * the `links` property. + * the links property. * * 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 - * (mailto:help@gocardless.com) if you would like to use this API. + *

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

*/ public class CustomerNotificationService { private final HttpClient httpClient; @@ -33,8 +35,8 @@ public CustomerNotificationService(HttpClient httpClient) { /** * "Handling" a notification means that you have sent the notification yourself (and don't want * 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. + * 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); @@ -45,8 +47,8 @@ public CustomerNotificationHandleRequest handle(String identity) { * * "Handling" a notification means that you have sent the notification yourself (and don't want * 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. + * 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 bdaad5b0..16253bc8 100644 --- a/src/main/java/com/gocardless/services/CustomerService.java +++ b/src/main/java/com/gocardless/services/CustomerService.java @@ -12,11 +12,10 @@ /** * Service class for working with customer resources. * - * 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). + * Customer objects hold the contact details for a customer. A customer can have several customer + * bank accounts, which in turn can have several Direct Debit + * mandates. */ public class CustomerService { private final HttpClient httpClient; @@ -37,9 +36,9 @@ public CustomerCreateRequest create() { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * customers. + * Returns a cursor-paginated + * list of your customers. */ public CustomerListRequest> list() { return new CustomerListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -67,7 +66,10 @@ 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); @@ -129,10 +131,11 @@ public CustomerCreateRequest withCity(String city) { } /** - * Customer's company name. Required unless a `given_name` and `family_name` are provided. - * For Canadian customers, the use of a `company_name` value will mean that any mandate - * created from this customer will be considered to be a "Business PAD" (otherwise, any - * mandate will be considered to be a "Personal PAD"). + * Customer's company name. Required unless a given_name and + * family_name are provided. For Canadian customers, the use of a + * company_name value will mean that any mandate created from this customer + * will be considered to be a "Business PAD" (otherwise, any mandate will be considered to + * be a "Personal PAD"). */ public CustomerCreateRequest withCompanyName(String companyName) { this.companyName = companyName; @@ -140,8 +143,9 @@ 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. */ public CustomerCreateRequest withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -167,7 +171,7 @@ public CustomerCreateRequest withEmail(String email) { } /** - * Customer's surname. Required unless a `company_name` is provided. + * Customer's surname. Required unless a company_name is provided. */ public CustomerCreateRequest withFamilyName(String familyName) { this.familyName = familyName; @@ -175,7 +179,7 @@ public CustomerCreateRequest withFamilyName(String familyName) { } /** - * Customer's first name. Required unless a `company_name` is provided. + * Customer's first name. Required unless a company_name is provided. */ public CustomerCreateRequest withGivenName(String givenName) { this.givenName = givenName; @@ -183,13 +187,13 @@ public CustomerCreateRequest withGivenName(String givenName) { } /** - * 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 - * (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". + * ISO 639-1 code. Used + * as the language for notification emails sent by GoCardless if your organisation does not + * send its own (see 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; @@ -218,8 +222,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 formatted phone number, + * including country code. */ public CustomerCreateRequest withPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; @@ -236,8 +240,8 @@ 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. - * `CA` for California). + * ISO3166-2:US state code is + * required (e.g. CA for California). */ public CustomerCreateRequest withRegion(String region) { this.region = region; @@ -301,9 +305,9 @@ protected boolean hasBody() { /** * Request class for {@link CustomerService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * customers. + * Returns a cursor-paginated + * list of your customers. */ public static final class CustomerListRequest extends ListRequest { private ActionRequired actionRequired; @@ -386,8 +390,8 @@ public CustomerListRequest withCreatedAtLte(String lte) { } /** - * 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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public CustomerListRequest withCurrency(Currency currency) { this.currency = currency; @@ -405,7 +409,10 @@ public CustomerListRequest withLimit(Integer limit) { /** * The direction to sort in. One of: * - * - `asc` - `desc` + *
    + *
  • asc
  • + *
  • desc
  • + *
*/ public CustomerListRequest withSortDirection(SortDirection sortDirection) { this.sortDirection = sortDirection; @@ -415,7 +422,11 @@ 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; @@ -681,10 +692,11 @@ public CustomerUpdateRequest withCity(String city) { } /** - * Customer's company name. Required unless a `given_name` and `family_name` are provided. - * For Canadian customers, the use of a `company_name` value will mean that any mandate - * created from this customer will be considered to be a "Business PAD" (otherwise, any - * mandate will be considered to be a "Personal PAD"). + * Customer's company name. Required unless a given_name and + * family_name are provided. For Canadian customers, the use of a + * company_name value will mean that any mandate created from this customer + * will be considered to be a "Business PAD" (otherwise, any mandate will be considered to + * be a "Personal PAD"). */ public CustomerUpdateRequest withCompanyName(String companyName) { this.companyName = companyName; @@ -692,8 +704,9 @@ 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. */ public CustomerUpdateRequest withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -719,7 +732,7 @@ public CustomerUpdateRequest withEmail(String email) { } /** - * Customer's surname. Required unless a `company_name` is provided. + * Customer's surname. Required unless a company_name is provided. */ public CustomerUpdateRequest withFamilyName(String familyName) { this.familyName = familyName; @@ -727,7 +740,7 @@ public CustomerUpdateRequest withFamilyName(String familyName) { } /** - * Customer's first name. Required unless a `company_name` is provided. + * Customer's first name. Required unless a company_name is provided. */ public CustomerUpdateRequest withGivenName(String givenName) { this.givenName = givenName; @@ -735,13 +748,13 @@ public CustomerUpdateRequest withGivenName(String givenName) { } /** - * 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 - * (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". + * ISO 639-1 code. Used + * as the language for notification emails sent by GoCardless if your organisation does not + * send its own (see 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 +783,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 formatted phone number, + * including country code. */ public CustomerUpdateRequest withPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; @@ -788,8 +801,8 @@ 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. - * `CA` for California). + * ISO3166-2:US state code is + * required (e.g. CA for California). */ public CustomerUpdateRequest withRegion(String region) { this.region = region; @@ -850,7 +863,10 @@ 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 08333b85..bb4e53cd 100644 --- a/src/main/java/com/gocardless/services/EventService.java +++ b/src/main/java/com/gocardless/services/EventService.java @@ -14,13 +14,16 @@ * 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 - * (https://developer.gocardless.com/api-reference/#event-types) for a complete list of event types. + * corresponding event getting included in API responses. See + * here 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. + *

+ * 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; @@ -34,13 +37,15 @@ public EventService(HttpClient httpClient) { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * events. + * Returns a cursor-paginated + * 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. + *

+ * 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,13 +65,15 @@ public EventGetRequest get(String identity) { /** * Request class for {@link EventService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * events. + * Returns a cursor-paginated + * 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. + *

+ * 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; @@ -89,7 +96,7 @@ public static final class EventListRequest extends ListRequest { private String subscription; /** - * Limit to events with a given `action`. + * Limit to events with a given action. */ public EventListRequest withAction(String action) { this.action = action; @@ -113,9 +120,10 @@ public EventListRequest withBefore(String before) { } /** - * 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. + * ID of a billing + * request. If specified, this endpoint will return all events for the given billing + * request. */ public EventListRequest withBillingRequest(String billingRequest) { this.billingRequest = billingRequest; @@ -172,9 +180,9 @@ public EventListRequest withCreatedAtLte(String lte) { } /** - * 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. + * ID of an creditor. + * If specified, this endpoint will return all events for the given creditor. */ public EventListRequest withCreditor(String creditor) { this.creditor = creditor; @@ -190,12 +198,23 @@ 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: + * 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; @@ -203,9 +222,10 @@ public EventListRequest withInclude(Include include) { } /** - * 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. + * ID of an instalment + * schedule. If specified, this endpoint will return all events for the given instalment + * schedule. */ public EventListRequest withInstalmentSchedule(String instalmentSchedule) { this.instalmentSchedule = instalmentSchedule; @@ -221,9 +241,9 @@ public EventListRequest withLimit(Integer limit) { } /** - * 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. + * ID of a mandate. If + * specified, this endpoint will return all events for the given mandate. */ public EventListRequest withMandate(String mandate) { this.mandate = mandate; @@ -231,9 +251,9 @@ public EventListRequest withMandate(String mandate) { } /** - * 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. + * ID of an outbound_payment. + * If specified, this endpoint will return all events for the given payment. */ public EventListRequest withOutboundPayment(String outboundPayment) { this.outboundPayment = outboundPayment; @@ -250,8 +270,9 @@ public EventListRequest withParentEvent(String parentEvent) { } /** - * ID of a payer authorisation - * (https://developer.gocardless.com/api-reference/#core-endpoints-payer-authorisations). + * ID of a payer + * authorisation. */ public EventListRequest withPayerAuthorisation(String payerAuthorisation) { this.payerAuthorisation = payerAuthorisation; @@ -259,9 +280,9 @@ public EventListRequest withPayerAuthorisation(String payerAuthorisation) { } /** - * 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. + * ID of a payment. If + * specified, this endpoint will return all events for the given payment. */ public EventListRequest withPayment(String payment) { this.payment = payment; @@ -278,8 +299,9 @@ public EventListRequest withPaymentAccountTransaction(String paymentAccountTr } /** - * 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. + * ID of a payout. If + * specified, this endpoint will return all events for the given payout. */ public EventListRequest withPayout(String payout) { this.payout = payout; @@ -287,8 +309,9 @@ public EventListRequest withPayout(String payout) { } /** - * 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. + * ID of a refund. If + * specified, this endpoint will return all events for the given refund. */ public EventListRequest withRefund(String refund) { this.refund = refund; @@ -297,14 +320,28 @@ public EventListRequest withRefund(String refund) { /** * Type of resource that you'd like to get all events for. Cannot be used together with the - * `billing_request`, `creditor`, `export`,`instalment_schedule`, `mandate`, - * `payer_authorisation`, `payment`, `payout`, `refund`, `scheme_identifier`, - * `subscription`, `outbound_payment` or `payment_account_transaction` parameters. The type - * can be one of: + * billing_request, creditor, + * export,instalment_schedule, mandate, + * 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; @@ -312,9 +349,10 @@ public EventListRequest withResourceType(ResourceType resourceType) { } /** - * 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. + * ID of a scheme + * identifier. If specified, this endpoint will return all events for the given scheme + * identifier. */ public EventListRequest withSchemeIdentifier(String schemeIdentifier) { this.schemeIdentifier = schemeIdentifier; @@ -322,9 +360,9 @@ public EventListRequest withSchemeIdentifier(String schemeIdentifier) { } /** - * 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. + * ID of a subscription. + * 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 c4888653..460c7e7c 100644 --- a/src/main/java/com/gocardless/services/InstalmentScheduleService.java +++ b/src/main/java/com/gocardless/services/InstalmentScheduleService.java @@ -15,9 +15,9 @@ * Service class for working with instalment schedule resources. * * Instalment schedules are objects which represent a collection of related payments, with the - * intention to collect the `total_amount` specified. The API supports both schedule-based creation - * (similar to subscriptions) as well as explicit selection of differing payment amounts and charge - * dates. + * intention to collect the total_amount specified. The API supports both + * schedule-based creation (similar to subscriptions) as well as explicit selection of differing + * payment amounts and charge dates. * * Unlike subscriptions, the payments are created immediately, so the instalment schedule cannot be * modified once submitted and instead can only be cancelled (which will cancel any of the payments @@ -40,15 +40,18 @@ 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 - * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-schedule). + * the scheduling + * version. * - * The `instalments` property is an array of payment properties (`amount` and `charge_date`). + * The instalments property is an array of payment properties (amount + * and charge_date). * * 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 - * the instalment schedule will either have the status `success` and link to the created - * payments, or the status `error` and detailed information about the failures. + * status as pending initially. When processing has completed, a subsequent GET + * request for the instalment schedule will either have the status success and link + * to the created payments, or the status error and detailed information about the + * failures. */ public InstalmentScheduleCreateWithDatesRequest createWithDates() { return new InstalmentScheduleCreateWithDatesRequest(httpClient); @@ -57,22 +60,24 @@ 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 - * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-dates). + * individual dates, please check out the alternative + * version. * * 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 - * the instalment schedule will either have the status `success` and link to the created - * payments, or the status `error` and detailed information about the failures. + * status as pending initially. When processing has completed, a subsequent GET + * request for the instalment schedule will either have the status success and link + * to the created payments, or the status error and detailed information about the + * failures. */ public InstalmentScheduleCreateWithScheduleRequest createWithSchedule() { return new InstalmentScheduleCreateWithScheduleRequest(httpClient); } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * instalment schedules. + * Returns a cursor-paginated + * list of your instalment schedules. */ public InstalmentScheduleListRequest> list() { return new InstalmentScheduleListRequest<>(httpClient, @@ -101,8 +106,8 @@ public InstalmentScheduleUpdateRequest update(String identity) { /** * Immediately cancels an instalment schedule; no further payments will be collected for it. * - * This will fail with a `cancellation_failed` error if the instalment schedule is already - * cancelled or has completed. + * This will fail with a cancellation_failed error if the instalment schedule is + * already cancelled or has completed. */ public InstalmentScheduleCancelRequest cancel(String identity) { return new InstalmentScheduleCancelRequest(httpClient, identity); @@ -113,15 +118,18 @@ 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 - * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-schedule). + * the scheduling + * version. * - * The `instalments` property is an array of payment properties (`amount` and `charge_date`). + * The instalments property is an array of payment properties (amount + * and charge_date). * * 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 - * the instalment schedule will either have the status `success` and link to the created - * payments, or the status `error` and detailed information about the failures. + * status as pending initially. When processing has completed, a subsequent GET + * request for the instalment schedule will either have the status success and link + * to the created payments, or the status error and detailed information about the + * failures. */ public static final class InstalmentScheduleCreateWithDatesRequest extends IdempotentPostRequest { @@ -146,8 +154,8 @@ public InstalmentScheduleCreateWithDatesRequest withAppFee(Integer appFee) { } /** - * 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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public InstalmentScheduleCreateWithDatesRequest withCurrency(Currency currency) { this.currency = currency; @@ -155,9 +163,10 @@ public InstalmentScheduleCreateWithDatesRequest withCurrency(Currency currency) } /** - * An explicit array of instalment payments, each specifying at least an `amount` and - * `charge_date`. See create (with dates) - * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-dates) + * An explicit array of instalment payments, each specifying at least an amount + * and charge_date. See create + * (with dates) */ public InstalmentScheduleCreateWithDatesRequest withInstalments( List instalments) { @@ -166,9 +175,10 @@ public InstalmentScheduleCreateWithDatesRequest withInstalments( } /** - * An explicit array of instalment payments, each specifying at least an `amount` and - * `charge_date`. See create (with dates) - * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-dates) + * An explicit array of instalment payments, each specifying at least an amount + * and charge_date. See create + * (with dates) */ public InstalmentScheduleCreateWithDatesRequest withInstalments(Instalments instalments) { if (this.instalments == null) { @@ -184,9 +194,9 @@ public InstalmentScheduleCreateWithDatesRequest withLinks(Links links) { } /** - * ID of the associated mandate - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) which the - * instalment schedule will create payments against. + * ID of the associated mandate + * which the instalment schedule will create payments against. */ public InstalmentScheduleCreateWithDatesRequest withLinksMandate(String mandate) { if (links == null) { @@ -228,51 +238,78 @@ 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 + * limit for this reference is dependent on the scheme.
+ *
+ * ACH *
    *
  • 10 characters
  • *
- * Autogiro + *
+ *
+ * Autogiro *
    *
  • 11 characters
  • *
- * Bacs + *
+ *
+ * Bacs *
    *
  • 10 characters
  • *
- * BECS + *
+ *
+ * BECS *
    *
  • 30 characters
  • *
- * BECS NZ + *
+ *
+ * BECS NZ *
    *
  • 12 characters
  • *
- * Betalingsservice + *
+ *
+ * Betalingsservice *
    *
  • 30 characters
  • *
- * Faster Payments + *
+ *
+ * Faster Payments *
    *
  • 18 characters
  • *
- * PAD + *
+ *
+ * PAD *
    *
  • scheme doesn't offer references
  • *
- * PayTo + *
+ *
+ * PayTo *
    *
  • 18 characters
  • *
- * SEPA + *
+ *
+ * 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 (https://gocardless.com/pricing). 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. + *

+ *

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

*/ public InstalmentScheduleCreateWithDatesRequest withPaymentReference( String paymentReference) { @@ -281,10 +318,13 @@ public InstalmentScheduleCreateWithDatesRequest withPaymentReference( } /** - * 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). + * On failure, automatically retry payments using + * intelligent retries. + * Default is false. + *

+ * Important: To be able to use intelligent retries, Success+ needs to be + * enabled in GoCardless dashboard. + *

*/ public InstalmentScheduleCreateWithDatesRequest withRetryIfPossible( Boolean retryIfPossible) { @@ -375,11 +415,12 @@ public static class Instalments { * 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) + * Transaction + * limits * * For Variable Recurring Payments (VRP), this must not exceed the mandate's - * `max_amount_per_payment` constraint. + * max_amount_per_payment constraint. */ public Instalments withAmount(Integer amount) { this.amount = amount; @@ -388,9 +429,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates), it will be - * automatically rolled forwards to that date. + * next_possible_charge_date on the mandate, + * it will be automatically rolled forwards to that date. */ public Instalments withChargeDate(String chargeDate) { this.chargeDate = chargeDate; @@ -400,8 +441,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#appendix-compliance-requirements)). + * send its own notifications (see compliance + * requirements). */ public Instalments withDescription(String description) { this.description = description; @@ -413,9 +455,9 @@ public static class Links { private String mandate; /** - * ID of the associated mandate - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) which the - * instalment schedule will create payments against. + * ID of the associated mandate + * which the instalment schedule will create payments against. */ public Links withMandate(String mandate) { this.mandate = mandate; @@ -429,13 +471,15 @@ 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 - * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-dates). + * individual dates, please check out the alternative + * version. * * 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 - * the instalment schedule will either have the status `success` and link to the created - * payments, or the status `error` and detailed information about the failures. + * status as pending initially. When processing has completed, a subsequent GET + * request for the instalment schedule will either have the status success and link + * to the created payments, or the status error and detailed information about the + * failures. */ public static final class InstalmentScheduleCreateWithScheduleRequest extends IdempotentPostRequest { @@ -460,8 +504,8 @@ public InstalmentScheduleCreateWithScheduleRequest withAppFee(Integer appFee) { } /** - * 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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public InstalmentScheduleCreateWithScheduleRequest withCurrency(Currency currency) { this.currency = currency; @@ -470,9 +514,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) - * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-schedule) + * to be collected, with a specified start date for the first payment. See create + * (with schedule) */ public InstalmentScheduleCreateWithScheduleRequest withInstalments( Instalments instalments) { @@ -494,7 +538,8 @@ public InstalmentScheduleCreateWithScheduleRequest withInstalmentsAmounts( } /** - * Number of `interval_units` between charge dates. Must be greater than or equal to `1`. + * Number of interval_units between charge dates. Must be greater than or equal + * to 1. */ public InstalmentScheduleCreateWithScheduleRequest withInstalmentsInterval( Integer interval) { @@ -506,7 +551,8 @@ public InstalmentScheduleCreateWithScheduleRequest withInstalmentsInterval( } /** - * The unit of time between customer charge dates. One of `weekly`, `monthly` or `yearly`. + * The unit of time between customer charge dates. One of weekly, + * monthly or yearly. */ public InstalmentScheduleCreateWithScheduleRequest withInstalmentsIntervalUnit( Instalments.IntervalUnit intervalUnit) { @@ -518,11 +564,12 @@ public InstalmentScheduleCreateWithScheduleRequest withInstalmentsIntervalUnit( } /** - * 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` + * The date on which the first payment should be charged. Must be on or after the mandate'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) { @@ -539,9 +586,9 @@ public InstalmentScheduleCreateWithScheduleRequest withLinks(Links links) { } /** - * ID of the associated mandate - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) which the - * instalment schedule will create payments against. + * ID of the associated mandate + * which the instalment schedule will create payments against. */ public InstalmentScheduleCreateWithScheduleRequest withLinksMandate(String mandate) { if (links == null) { @@ -584,51 +631,78 @@ 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 + * limit for this reference is dependent on the scheme.
+ *
+ * ACH *
    *
  • 10 characters
  • *
- * Autogiro + *
+ *
+ * Autogiro *
    *
  • 11 characters
  • *
- * Bacs + *
+ *
+ * Bacs *
    *
  • 10 characters
  • *
- * BECS + *
+ *
+ * BECS *
    *
  • 30 characters
  • *
- * BECS NZ + *
+ *
+ * BECS NZ *
    *
  • 12 characters
  • *
- * Betalingsservice + *
+ *
+ * Betalingsservice *
    *
  • 30 characters
  • *
- * Faster Payments + *
+ *
+ * Faster Payments *
    *
  • 18 characters
  • *
- * PAD + *
+ *
+ * PAD *
    *
  • scheme doesn't offer references
  • *
- * PayTo + *
+ *
+ * PayTo *
    *
  • 18 characters
  • *
- * SEPA + *
+ *
+ * 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 (https://gocardless.com/pricing). 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. + *

+ *

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

*/ public InstalmentScheduleCreateWithScheduleRequest withPaymentReference( String paymentReference) { @@ -637,10 +711,13 @@ public InstalmentScheduleCreateWithScheduleRequest withPaymentReference( } /** - * 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). + * On failure, automatically retry payments using + * intelligent retries. + * Default is false. + *

+ * Important: To be able to use intelligent retries, Success+ needs to be + * enabled in GoCardless dashboard. + *

*/ public InstalmentScheduleCreateWithScheduleRequest withRetryIfPossible( Boolean retryIfPossible) { @@ -738,8 +815,8 @@ public Instalments withAmounts(List amounts) { } /** - * Number of `interval_units` between charge dates. Must be greater than or equal to - * `1`. + * Number of interval_units between charge dates. Must be greater than or + * equal to 1. */ public Instalments withInterval(Integer interval) { this.interval = interval; @@ -747,8 +824,8 @@ public Instalments withInterval(Integer interval) { } /** - * The unit of time between customer charge dates. One of `weekly`, `monthly` or - * `yearly`. + * The unit of time between customer charge dates. One of weekly, + * monthly or yearly. */ public Instalments withIntervalUnit(IntervalUnit intervalUnit) { this.intervalUnit = intervalUnit; @@ -757,11 +834,12 @@ public Instalments withIntervalUnit(IntervalUnit intervalUnit) { /** * 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` + * mandate'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; @@ -786,9 +864,9 @@ public static class Links { private String mandate; /** - * ID of the associated mandate - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) which the - * instalment schedule will create payments against. + * ID of the associated mandate + * which the instalment schedule will create payments against. */ public Links withMandate(String mandate) { this.mandate = mandate; @@ -800,9 +878,9 @@ public Links withMandate(String mandate) { /** * Request class for {@link InstalmentScheduleService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * instalment schedules. + * Returns a cursor-paginated + * list of your instalment schedules. */ public static final class InstalmentScheduleListRequest extends ListRequest { @@ -877,8 +955,8 @@ public InstalmentScheduleListRequest withCreatedAtLte(String lte) { } /** - * ID of the associated customer - * (https://developer.gocardless.com/api-reference/#core-endpoints-customers). + * ID of the associated customer. */ public InstalmentScheduleListRequest withCustomer(String customer) { this.customer = customer; @@ -894,9 +972,9 @@ public InstalmentScheduleListRequest withLimit(Integer limit) { } /** - * ID of the associated mandate - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) which the - * instalment schedule will create payments against. + * ID of the associated mandate + * which the instalment schedule will create payments against. */ public InstalmentScheduleListRequest withMandate(String mandate) { this.mandate = mandate; @@ -1156,8 +1234,8 @@ protected boolean hasBody() { * * Immediately cancels an instalment schedule; no further payments will be collected for it. * - * This will fail with a `cancellation_failed` error if the instalment schedule is already - * cancelled or has completed. + * This will fail with a cancellation_failed error if the instalment schedule is + * already cancelled or has completed. */ public static final class InstalmentScheduleCancelRequest extends PostRequest { diff --git a/src/main/java/com/gocardless/services/InstitutionService.java b/src/main/java/com/gocardless/services/InstitutionService.java index e36adc52..a69dcbfe 100644 --- a/src/main/java/com/gocardless/services/InstitutionService.java +++ b/src/main/java/com/gocardless/services/InstitutionService.java @@ -12,9 +12,9 @@ /** * Service class for working with institution resources. * - * Institutions that are supported when creating Bank Authorisations - * (https://developer.gocardless.com/api-reference/#billing-requests-bank-authorisations) for a - * particular country or purpose. + * Institutions that are supported when creating Bank + * Authorisations for a particular country or purpose. * * Not all institutions support both Payment Initiation (PIS) and Account Information (AIS) * services. @@ -74,10 +74,10 @@ public InstitutionListRequest withBranchCode(String branchCode) { } /** - * 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. + * ISO + * 3166-1 alpha-2 code. The country code of the institution. If nothing is provided, + * institutions with the country code 'GB' are returned by default. */ public InstitutionListRequest withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -85,9 +85,9 @@ public InstitutionListRequest withCountryCode(String countryCode) { } /** - * The feature that institutions support. The available options include `pis`, and - * `vrp_sweeping`. If nothing is provided, institutions supporting 'pis' are returned by - * default. + * The feature that institutions support. The available options include pis, + * and vrp_sweeping. If nothing is provided, institutions supporting 'pis' are + * returned by default. */ public InstitutionListRequest withFeature(String feature) { this.feature = feature; @@ -95,9 +95,10 @@ public InstitutionListRequest withFeature(String feature) { } /** - * The scheme that institutions support. The available options include `faster_payments`, - * `sepa_credit_transfer`, and `sepa_instant_credit_transfer`. If nothing is provided, - * institutions supporting 'faster_payments' are returned by default. + * The scheme that institutions support. The available options include + * faster_payments, sepa_credit_transfer, and + * sepa_instant_credit_transfer. If nothing is provided, institutions + * supporting 'faster_payments' are returned by default. */ public InstitutionListRequest withScheme(String scheme) { this.scheme = scheme; @@ -166,10 +167,10 @@ 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) - * alpha-2 code. The country code of the institution. If nothing is provided, institutions - * with the country code 'GB' are returned by default. + * ISO + * 3166-1 alpha-2 code. The country code of the institution. If nothing is provided, + * institutions with the country code 'GB' are returned by default. */ public InstitutionListForBillingRequestRequest withCountryCode(String countryCode) { this.countryCode = countryCode; diff --git a/src/main/java/com/gocardless/services/LogoService.java b/src/main/java/com/gocardless/services/LogoService.java index 2119f202..602197ef 100644 --- a/src/main/java/com/gocardless/services/LogoService.java +++ b/src/main/java/com/gocardless/services/LogoService.java @@ -6,9 +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 (https://developer.gocardless.com/api-reference/#billing-requests-billing-request-flows) - * payment pages. + * Logos are image uploads that, when associated with a creditor, are shown on the billing + * request flow payment pages. */ public class LogoService { private final HttpClient httpClient; @@ -27,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. */ public LogoCreateForCreditorRequest createForCreditor() { return new LogoCreateForCreditorRequest(httpClient); @@ -42,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. */ 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 7a28a7cf..67d76992 100644 --- a/src/main/java/com/gocardless/services/MandateImportEntryService.java +++ b/src/main/java/com/gocardless/services/MandateImportEntryService.java @@ -11,26 +11,31 @@ /** * Service class for working with mandate import entry resources. * - * 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. + * Mandate Import Entries are added to a + * Mandate + * Import. 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. 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) + *
    + *
  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. + *
+ * 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, 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. * - * 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 - * (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 - * (mailto:help@gocardless.com) if you would like to use this API. + *

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

*/ public class MandateImportEntryService { private final HttpClient httpClient; @@ -45,12 +50,13 @@ public MandateImportEntryService(HttpClient httpClient) { } /** - * 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. + * For an existing mandate + * import, 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. + * this limit, the API will return a record_limit_exceeded error. */ public MandateImportEntryCreateRequest create() { return new MandateImportEntryCreateRequest(httpClient); @@ -60,8 +66,8 @@ public MandateImportEntryCreateRequest create() { * For an existing mandate import, this endpoint lists all of the entries attached. * * 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). + * your system (using the record_identifier that you provided when creating the + * mandate import). */ public MandateImportEntryListRequest> list() { return new MandateImportEntryListRequest<>(httpClient, @@ -76,12 +82,13 @@ public MandateImportEntryListRequest> all() { /** * Request class for {@link MandateImportEntryService#create }. * - * 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. + * For an existing mandate + * import, 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. + * this limit, the API will return a record_limit_exceeded error. */ public static final class MandateImportEntryCreateRequest extends PostRequest { @@ -99,7 +106,7 @@ public MandateImportEntryCreateRequest withAmendment(Amendment amendment) { /** * The creditor identifier of the direct debit originator. Required if mandate import scheme - * is `sepa`. + * is sepa. */ public MandateImportEntryCreateRequest withAmendmentOriginalCreditorId( String originalCreditorId) { @@ -124,7 +131,7 @@ public MandateImportEntryCreateRequest withAmendmentOriginalCreditorName( /** * The unique SEPA reference for the mandate being amended. Required if mandate import - * scheme is `sepa`. + * scheme is sepa. */ public MandateImportEntryCreateRequest withAmendmentOriginalMandateReference( String originalMandateReference) { @@ -144,8 +151,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). + * unless the request includes a customer + * bank account token. */ public MandateImportEntryCreateRequest withBankAccountAccountHolderName( String accountHolderName) { @@ -157,9 +165,9 @@ public MandateImportEntryCreateRequest withBankAccountAccountHolderName( } /** - * 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`. + * Bank account number - see local + * details for more information. Alternatively you can provide an iban. */ public MandateImportEntryCreateRequest withBankAccountAccountNumber(String accountNumber) { if (bankAccount == null) { @@ -171,9 +179,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 - * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for - * more information. + * bank accounts in other currencies. See local + * details for more information. */ public MandateImportEntryCreateRequest withBankAccountAccountType( BankAccount.AccountType accountType) { @@ -185,9 +193,9 @@ public MandateImportEntryCreateRequest withBankAccountAccountType( } /** - * Bank code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Bank code - see local + * details for more information. Alternatively you can provide an iban. */ public MandateImportEntryCreateRequest withBankAccountBankCode(String bankCode) { if (bankAccount == null) { @@ -198,9 +206,9 @@ public MandateImportEntryCreateRequest withBankAccountBankCode(String bankCode) } /** - * Branch code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Branch code - see local + * details for more information. Alternatively you can provide an iban. */ public MandateImportEntryCreateRequest withBankAccountBranchCode(String branchCode) { if (bankAccount == null) { @@ -211,9 +219,10 @@ 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). - * Defaults to the country code of the `iban` if supplied, otherwise is required. + * ISO + * 3166-1 alpha-2 code. Defaults to the country code of the iban if + * supplied, otherwise is required. */ public MandateImportEntryCreateRequest withBankAccountCountryCode(String countryCode) { if (bankAccount == null) { @@ -224,10 +233,12 @@ public MandateImportEntryCreateRequest withBankAccountCountryCode(String country } /** - * 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). + * International Bank Account Number. Alternatively you can provide local + * details. IBANs are not accepted for Swedish bank accounts denominated in SEK - you + * must supply + * local + * details. */ public MandateImportEntryCreateRequest withBankAccountIban(String iban) { if (bankAccount == null) { @@ -257,7 +268,7 @@ public MandateImportEntryCreateRequest withCustomer(Customer customer) { /** * The first line of the customer's address. Required if mandate import scheme is either - * `bacs` or `sepa`. + * bacs or sepa. */ public MandateImportEntryCreateRequest withCustomerAddressLine1(String addressLine1) { if (customer == null) { @@ -301,10 +312,11 @@ public MandateImportEntryCreateRequest withCustomerCity(String city) { } /** - * Customer's company name. Required unless a `given_name` and `family_name` are provided. - * For Canadian customers, the use of a `company_name` value will mean that any mandate - * created from this customer will be considered to be a "Business PAD" (otherwise, any - * mandate will be considered to be a "Personal PAD"). + * Customer's company name. Required unless a given_name and + * family_name are provided. For Canadian customers, the use of a + * company_name value will mean that any mandate created from this customer + * will be considered to be a "Business PAD" (otherwise, any mandate will be considered to + * be a "Personal PAD"). */ public MandateImportEntryCreateRequest withCustomerCompanyName(String companyName) { if (customer == null) { @@ -315,8 +327,9 @@ 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. */ public MandateImportEntryCreateRequest withCustomerCountryCode(String countryCode) { if (customer == null) { @@ -352,7 +365,7 @@ public MandateImportEntryCreateRequest withCustomerEmail(String email) { } /** - * Customer's surname. Required unless a `company_name` is provided. + * Customer's surname. Required unless a company_name is provided. */ public MandateImportEntryCreateRequest withCustomerFamilyName(String familyName) { if (customer == null) { @@ -363,7 +376,7 @@ public MandateImportEntryCreateRequest withCustomerFamilyName(String familyName) } /** - * Customer's first name. Required unless a `company_name` is provided. + * Customer's first name. Required unless a company_name is provided. */ public MandateImportEntryCreateRequest withCustomerGivenName(String givenName) { if (customer == null) { @@ -374,13 +387,13 @@ public MandateImportEntryCreateRequest withCustomerGivenName(String givenName) { } /** - * 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 - * (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". + * ISO 639-1 code. Used + * as the language for notification emails sent by GoCardless if your organisation does not + * send its own (see 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) { @@ -403,8 +416,8 @@ public MandateImportEntryCreateRequest withCustomerMetadata(Map } /** - * ITU E.123 (https://en.wikipedia.org/wiki/E.123) formatted phone number, including country - * code. + * ITU E.123 formatted phone number, + * including country code. */ public MandateImportEntryCreateRequest withCustomerPhoneNumber(String phoneNumber) { if (customer == null) { @@ -415,7 +428,8 @@ public MandateImportEntryCreateRequest withCustomerPhoneNumber(String phoneNumbe } /** - * The customer's postal code. Required if mandate import scheme is either `bacs` or `sepa`. + * The customer's postal code. Required if mandate import scheme is either bacs + * or sepa. */ public MandateImportEntryCreateRequest withCustomerPostalCode(String postalCode) { if (customer == null) { @@ -427,8 +441,8 @@ 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. - * `CA` for California). + * ISO3166-2:US state code is + * required (e.g. CA for California). */ public MandateImportEntryCreateRequest withCustomerRegion(String region) { if (customer == null) { @@ -474,8 +488,8 @@ 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. * * 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 @@ -504,10 +518,10 @@ public MandateImportEntryCreateRequest withMandateMetadata(Map m } /** - * 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. + * Unique reference. Different schemes have different length and character + * set 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) { @@ -562,7 +576,7 @@ public static class Amendment { /** * The creditor identifier of the direct debit originator. Required if mandate import - * scheme is `sepa`. + * scheme is sepa. */ public Amendment withOriginalCreditorId(String originalCreditorId) { this.originalCreditorId = originalCreditorId; @@ -579,7 +593,7 @@ public Amendment withOriginalCreditorName(String originalCreditorName) { /** * The unique SEPA reference for the mandate being amended. Required if mandate import - * scheme is `sepa`. + * scheme is sepa. */ public Amendment withOriginalMandateReference(String originalMandateReference) { this.originalMandateReference = originalMandateReference; @@ -601,8 +615,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). + * unless the request includes a customer + * bank account token. */ public BankAccount withAccountHolderName(String accountHolderName) { this.accountHolderName = accountHolderName; @@ -610,9 +625,9 @@ public BankAccount withAccountHolderName(String accountHolderName) { } /** - * 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`. + * Bank account number - see local + * details for more information. Alternatively you can provide an iban. */ public BankAccount withAccountNumber(String accountNumber) { this.accountNumber = accountNumber; @@ -621,9 +636,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 - * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) - * for more information. + * for bank accounts in other currencies. See local + * details for more information. */ public BankAccount withAccountType(AccountType accountType) { this.accountType = accountType; @@ -631,9 +646,9 @@ public BankAccount withAccountType(AccountType accountType) { } /** - * Bank code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for - * more information. Alternatively you can provide an `iban`. + * Bank code - see local + * details for more information. Alternatively you can provide an iban. */ public BankAccount withBankCode(String bankCode) { this.bankCode = bankCode; @@ -641,9 +656,9 @@ public BankAccount withBankCode(String bankCode) { } /** - * Branch code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for - * more information. Alternatively you can provide an `iban`. + * Branch code - see local + * details for more information. Alternatively you can provide an iban. */ public BankAccount withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -651,9 +666,10 @@ 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). - * Defaults to the country code of the `iban` if supplied, otherwise is required. + * ISO + * 3166-1 alpha-2 code. Defaults to the country code of the iban if + * supplied, otherwise is required. */ public BankAccount withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -661,10 +677,12 @@ public BankAccount withCountryCode(String countryCode) { } /** - * 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). + * International Bank Account Number. Alternatively you can provide local + * details. IBANs are not accepted for Swedish bank accounts denominated in SEK - + * you must supply local + * details. */ public BankAccount withIban(String iban) { this.iban = iban; @@ -713,7 +731,7 @@ public static class Customer { /** * The first line of the customer's address. Required if mandate import scheme is either - * `bacs` or `sepa`. + * bacs or sepa. */ public Customer withAddressLine1(String addressLine1) { this.addressLine1 = addressLine1; @@ -745,10 +763,11 @@ public Customer withCity(String city) { } /** - * Customer's company name. Required unless a `given_name` and `family_name` are - * provided. For Canadian customers, the use of a `company_name` value will mean that - * any mandate created from this customer will be considered to be a "Business PAD" - * (otherwise, any mandate will be considered to be a "Personal PAD"). + * Customer's company name. Required unless a given_name and + * family_name are provided. For Canadian customers, the use of a + * company_name value will mean that any mandate created from this customer + * will be considered to be a "Business PAD" (otherwise, any mandate will be considered + * to be a "Personal PAD"). */ public Customer withCompanyName(String companyName) { this.companyName = companyName; @@ -756,8 +775,9 @@ 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. */ public Customer withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -783,7 +803,7 @@ public Customer withEmail(String email) { } /** - * Customer's surname. Required unless a `company_name` is provided. + * Customer's surname. Required unless a company_name is provided. */ public Customer withFamilyName(String familyName) { this.familyName = familyName; @@ -791,7 +811,7 @@ public Customer withFamilyName(String familyName) { } /** - * Customer's first name. Required unless a `company_name` is provided. + * Customer's first name. Required unless a company_name is provided. */ public Customer withGivenName(String givenName) { this.givenName = givenName; @@ -799,13 +819,13 @@ public Customer withGivenName(String givenName) { } /** - * 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 - * (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". + * ISO 639-1 code. + * Used as the language for notification emails sent by GoCardless if your organisation + * does not send its own (see 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 Customer withLanguage(String language) { this.language = language; @@ -822,8 +842,8 @@ public Customer withMetadata(Map metadata) { } /** - * ITU E.123 (https://en.wikipedia.org/wiki/E.123) formatted phone number, including - * country code. + * ITU E.123 formatted phone number, + * including country code. */ public Customer withPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; @@ -831,8 +851,8 @@ public Customer withPhoneNumber(String phoneNumber) { } /** - * The customer's postal code. Required if mandate import scheme is either `bacs` or - * `sepa`. + * The customer's postal code. Required if mandate import scheme is either + * bacs or sepa. */ public Customer withPostalCode(String postalCode) { this.postalCode = postalCode; @@ -841,8 +861,8 @@ 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 - * (e.g. `CA` for California). + * ISO3166-2:US state code is + * required (e.g. CA for California). */ public Customer withRegion(String region) { this.region = region; @@ -879,8 +899,8 @@ 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. * * 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) @@ -903,10 +923,10 @@ public Mandate withMetadata(Map metadata) { } /** - * 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. + * Unique reference. Different schemes have different length and character + * set 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; @@ -934,8 +954,8 @@ public String toString() { * For an existing mandate import, this endpoint lists all of the entries attached. * * 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). + * your system (using the record_identifier that you provided when creating the + * mandate import). */ public static final class MandateImportEntryListRequest extends ListRequest { @@ -977,9 +997,12 @@ 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 49e82bee..a2c43acb 100644 --- a/src/main/java/com/gocardless/services/MandateImportService.java +++ b/src/main/java/com/gocardless/services/MandateImportService.java @@ -14,35 +14,44 @@ * * The process is as follows: * - * 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 - * + *
    + *
  1. Create + * a mandate import
  2. + *
  3. Add + * entries to the import
  4. + *
  5. Submit + * the import
  6. + *
  7. Wait until a member of the GoCardless team approves the import, at which point the mandates + * will be created
  8. + *
  9. Link + * up the mandates in your system
  10. + *
* 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 - * (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). + * We will issue a mandate_created webhook for each entry, which will be the same as + * the webhooks triggered when + * creating a + * mandate using the mandates API. Once these webhooks start arriving, any reconciliation can + * now be accomplished by checking + * the current status of the mandate import and linking + * up the mandates to your system. * + *

* 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 - * (mailto:help@gocardless.com) if you would like to use this API. + *

+ *

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

*/ public class MandateImportService { private final HttpClient httpClient; @@ -58,8 +67,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#mandate-imports-submit-a-mandate-import) it. + * import, you should submit + * it. */ public MandateImportCreateRequest create() { return new MandateImportCreateRequest(httpClient); @@ -98,8 +108,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#mandate-imports-submit-a-mandate-import) it. + * import, you should submit + * 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 202c59dc..79fc83b9 100644 --- a/src/main/java/com/gocardless/services/MandatePdfService.java +++ b/src/main/java/com/gocardless/services/MandatePdfService.java @@ -7,9 +7,9 @@ /** * Service class for working with mandate pdf resources. * - * 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. + * Mandate PDFs allow you to easily display scheme-rules + * compliant Direct Debit mandates to your customers. */ public class MandatePdfService { private final HttpClient httpClient; @@ -26,23 +26,25 @@ 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 - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates). + * or inferred from the ID of an existing mandate. * * 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 - * scheme. + * To generate a PDF mandate in another language, set the Accept-Language header + * when creating the PDF mandate to the relevant + * ISO 639-1 language code + * supported for the scheme. * * | Scheme | Supported languages | | :--------------- | * :------------------------------------------------------------------------------------------------------------------------------------------- - * | | ACH | English (`en`) | | Autogiro | English (`en`), Swedish (`sv`) | | Bacs | English - * (`en`) | | BECS | English (`en`) | | BECS NZ | English (`en`) | | Betalingsservice | Danish - * (`da`), English (`en`) | | PAD | English (`en`) | | SEPA Core | Danish (`da`), Dutch (`nl`), - * English (`en`), French (`fr`), German (`de`), Italian (`it`), Portuguese (`pt`), Spanish - * (`es`), Swedish (`sv`) | + * | | ACH | English (en) | | Autogiro | English (en), Swedish + * (sv) | | Bacs | English (en) | | BECS | English (en) | + * | BECS NZ | English (en) | | Betalingsservice | Danish (da), + * English (en) | | PAD | English (en) | | SEPA Core | Danish + * (da), Dutch (nl), English (en), French + * (fr), German (de), Italian (it), Portuguese + * (pt), Spanish (es), Swedish (sv) | */ public MandatePdfCreateRequest create() { return new MandatePdfCreateRequest(httpClient); @@ -54,23 +56,25 @@ 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 - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates). + * or inferred from the ID of an existing mandate. * * 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 - * scheme. + * To generate a PDF mandate in another language, set the Accept-Language header + * when creating the PDF mandate to the relevant + * ISO 639-1 language code + * supported for the scheme. * * | Scheme | Supported languages | | :--------------- | * :------------------------------------------------------------------------------------------------------------------------------------------- - * | | ACH | English (`en`) | | Autogiro | English (`en`), Swedish (`sv`) | | Bacs | English - * (`en`) | | BECS | English (`en`) | | BECS NZ | English (`en`) | | Betalingsservice | Danish - * (`da`), English (`en`) | | PAD | English (`en`) | | SEPA Core | Danish (`da`), Dutch (`nl`), - * English (`en`), French (`fr`), German (`de`), Italian (`it`), Portuguese (`pt`), Spanish - * (`es`), Swedish (`sv`) | + * | | ACH | English (en) | | Autogiro | English (en), Swedish + * (sv) | | Bacs | English (en) | | BECS | English (en) | + * | BECS NZ | English (en) | | Betalingsservice | Danish (da), + * English (en) | | PAD | English (en) | | SEPA Core | Danish + * (da), Dutch (nl), English (en), French + * (fr), German (de), Italian (it), Portuguese + * (pt), Spanish (es), Swedish (sv) | */ public static final class MandatePdfCreateRequest extends PostRequest { private String accountHolderName; @@ -103,8 +107,9 @@ public static final class MandatePdfCreateRequest extends PostRequestcustomer. + * This field cannot exceed 18 characters. */ public MandatePdfCreateRequest withAccountHolderName(String accountHolderName) { this.accountHolderName = accountHolderName; @@ -112,9 +117,9 @@ public MandatePdfCreateRequest withAccountHolderName(String accountHolderName) { } /** - * 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`. + * Bank account number - see local + * details for more information. Alternatively you can provide an iban. */ public MandatePdfCreateRequest withAccountNumber(String accountNumber) { this.accountNumber = accountNumber; @@ -123,9 +128,9 @@ public MandatePdfCreateRequest 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 - * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for - * more information. + * bank accounts in other currencies. See local + * details for more information. */ public MandatePdfCreateRequest withAccountType(AccountType accountType) { this.accountType = accountType; @@ -157,9 +162,9 @@ public MandatePdfCreateRequest withAddressLine3(String addressLine3) { } /** - * Bank code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Bank code - see local + * details for more information. Alternatively you can provide an iban. */ public MandatePdfCreateRequest withBankCode(String bankCode) { this.bankCode = bankCode; @@ -167,9 +172,9 @@ public MandatePdfCreateRequest withBankCode(String bankCode) { } /** - * SWIFT BIC. Will be derived automatically if a valid `iban` or local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) are - * provided. + * SWIFT BIC. Will be derived automatically if a valid iban or local + * details are provided. */ public MandatePdfCreateRequest withBic(String bic) { this.bic = bic; @@ -177,9 +182,9 @@ public MandatePdfCreateRequest withBic(String bic) { } /** - * Branch code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Branch code - see local + * details for more information. Alternatively you can provide an iban. */ public MandatePdfCreateRequest withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -204,9 +209,9 @@ public MandatePdfCreateRequest withCompanyName(String companyName) { } /** - * ISO 3166-1 - * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - * alpha-2 code. Required if providing local details. + * ISO + * 3166-1 alpha-2 code. Required if providing local details. */ public MandatePdfCreateRequest withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -224,7 +229,7 @@ public MandatePdfCreateRequest withDanishIdentityNumber(String danishIdentityNum /** * The customer's family name (i.e. last name). Used to populate the "Customer Name or - * Company name" field on the PDF. Ignored if `company_name` is provided. + * Company name" field on the PDF. Ignored if company_name is provided. */ public MandatePdfCreateRequest withFamilyName(String familyName) { this.familyName = familyName; @@ -233,7 +238,7 @@ public MandatePdfCreateRequest withFamilyName(String familyName) { /** * The customer's given name (i.e. first name). Used to populate the "Customer Name or - * Company name" field on the PDF. Ignored if `company_name` is provided. + * Company name" field on the PDF. Ignored if company_name is provided. */ public MandatePdfCreateRequest withGivenName(String givenName) { this.givenName = givenName; @@ -241,9 +246,9 @@ public MandatePdfCreateRequest withGivenName(String givenName) { } /** - * International Bank Account Number. Alternatively you can provide local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details). IBANs - * cannot be provided for Autogiro mandates. + * International Bank Account Number. Alternatively you can provide local + * details. IBANs cannot be provided for Autogiro mandates. */ public MandatePdfCreateRequest withIban(String iban) { this.iban = iban; @@ -256,9 +261,9 @@ public MandatePdfCreateRequest withLinks(Links links) { } /** - * ID of an existing creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only required - * if your account manages multiple creditors. + * ID of an existing creditor. + * Only required if your account manages multiple creditors. */ public MandatePdfCreateRequest withLinksCreditor(String creditor) { if (links == null) { @@ -269,10 +274,10 @@ public MandatePdfCreateRequest withLinksCreditor(String creditor) { } /** - * ID of an existing mandate - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) to build the - * PDF from. The customer's bank details will be censored in the generated PDF. No other - * parameters may be provided alongside this. + * ID of an existing mandate to + * build the PDF from. The customer's bank details will be censored in the generated PDF. No + * other parameters may be provided alongside this. */ public MandatePdfCreateRequest withLinksMandate(String mandate) { if (links == null) { @@ -318,8 +323,8 @@ public MandatePdfCreateRequest 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. - * `CA` for California). + * ISO3166-2:US state code is + * required (e.g. CA for California). */ public MandatePdfCreateRequest withRegion(String region) { this.region = region; @@ -329,9 +334,9 @@ public MandatePdfCreateRequest withRegion(String region) { /** * Direct Debit scheme. Can be supplied or automatically detected from the bank account * details provided. If you do not provide a scheme, you must provide either a mandate, an - * `iban`, or local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) including a - * `country_code`. + * iban, or local + * details including a country_code. */ public MandatePdfCreateRequest withScheme(String scheme) { this.scheme = scheme; @@ -349,7 +354,7 @@ public MandatePdfCreateRequest withSignatureDate(String signatureDate) { /** * For American customers only. Subscription amount being authorised by the mandate. In the * lowest denomination for the currency (cents in USD). Is required if - * `subscription_frequency` has been provided. + * subscription_frequency has been provided. */ public MandatePdfCreateRequest withSubscriptionAmount(Integer subscriptionAmount) { this.subscriptionAmount = subscriptionAmount; @@ -358,8 +363,8 @@ public MandatePdfCreateRequest withSubscriptionAmount(Integer subscriptionAmount /** * For American customers only. Frequency of the subscription being authorised by the - * mandate. One of `weekly`, `monthly` or `yearly`. Is required if `subscription_amount` has - * been provided. + * mandate. One of weekly, monthly or yearly. Is + * required if subscription_amount has been provided. */ public MandatePdfCreateRequest withSubscriptionFrequency(String subscriptionFrequency) { this.subscriptionFrequency = subscriptionFrequency; @@ -421,9 +426,9 @@ public static class Links { private String mandate; /** - * ID of an existing creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only - * required if your account manages multiple creditors. + * ID of an existing creditor. + * Only required if your account manages multiple creditors. */ public Links withCreditor(String creditor) { this.creditor = creditor; @@ -431,10 +436,10 @@ public Links withCreditor(String creditor) { } /** - * ID of an existing mandate - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) to build - * the PDF from. The customer's bank details will be censored in the generated PDF. No - * other parameters may be provided alongside this. + * ID of an existing mandate + * to build the PDF from. The customer's bank details will be censored in the generated + * PDF. No other parameters may be provided alongside this. */ public Links withMandate(String mandate) { this.mandate = mandate; diff --git a/src/main/java/com/gocardless/services/MandateService.java b/src/main/java/com/gocardless/services/MandateService.java index 2f499565..a535a148 100644 --- a/src/main/java/com/gocardless/services/MandateService.java +++ b/src/main/java/com/gocardless/services/MandateService.java @@ -14,12 +14,12 @@ /** * Service class for working with mandate resources. * - * Mandates represent the Direct Debit mandate with a customer - * (https://developer.gocardless.com/api-reference/#core-endpoints-customers). + * Mandates represent the Direct Debit mandate with a + * customer. * - * GoCardless will notify you via a webhook - * (https://developer.gocardless.com/api-reference/#appendix-webhooks) whenever the status of a - * mandate changes. + * GoCardless will notify you via a + * webhook whenever + * the status of a mandate changes. */ public class MandateService { private final HttpClient httpClient; @@ -40,9 +40,9 @@ public MandateCreateRequest create() { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * mandates. + * Returns a cursor-paginated + * list of your mandates. */ public MandateListRequest> list() { return new MandateListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -70,21 +70,23 @@ public MandateUpdateRequest update(String identity) { * Immediately cancels a mandate and all associated cancellable payments. Any metadata supplied * to this endpoint will be stored on the mandate cancellation event it causes. * - * This will fail with a `cancellation_failed` error if the mandate is already cancelled. + * This will fail with a cancellation_failed error if the mandate is already + * cancelled. */ public MandateCancelRequest cancel(String identity) { return new MandateCancelRequest(httpClient, 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. + * This will fail with a mandate_not_inactive error if the mandate is already being + * submitted, or is active. * * Mandates can be resubmitted up to 10 times. */ @@ -106,8 +108,8 @@ public static final class MandateCreateRequest extends IdempotentPostRequestSEC code. * * 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 @@ -126,9 +128,9 @@ public MandateCreateRequest withLinks(Links links) { } /** - * ID of the associated creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only required - * if your account manages multiple creditors. + * ID of the associated creditor. + * Only required if your account manages multiple creditors. */ public MandateCreateRequest withLinksCreditor(String creditor) { if (links == null) { @@ -139,9 +141,9 @@ public MandateCreateRequest withLinksCreditor(String creditor) { } /** - * 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. + * ID of the associated customer + * bank account which the mandate is created and submits payments against. */ public MandateCreateRequest withLinksCustomerBankAccount(String customerBankAccount) { if (links == null) { @@ -177,8 +179,8 @@ public MandateCreateRequest withMetadata(String key, String value) { * the payer to whom the mandate belongs (i.e. as a result of their completion of a mandate * setup flow in their browser). * - * Not required for creating offline mandates where `authorisation_source` is set to - * telephone or paper. + * Not required for creating offline mandates where authorisation_source is set + * to telephone or paper. */ public MandateCreateRequest withPayerIpAddress(String payerIpAddress) { this.payerIpAddress = payerIpAddress; @@ -186,10 +188,10 @@ public MandateCreateRequest withPayerIpAddress(String payerIpAddress) { } /** - * 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. + * Unique reference. Different schemes have different length and character + * set requirements. GoCardless will generate a unique reference satisfying the + * different scheme requirements if this field is left blank. */ public MandateCreateRequest withReference(String reference) { this.reference = reference; @@ -197,8 +199,9 @@ public MandateCreateRequest withReference(String reference) { } /** - * Bank 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; @@ -266,9 +269,9 @@ public static class Links { private String customerBankAccount; /** - * ID of the associated creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only - * required if your account manages multiple creditors. + * ID of the associated creditor. + * Only required if your account manages multiple creditors. */ public Links withCreditor(String creditor) { this.creditor = creditor; @@ -276,9 +279,9 @@ public Links withCreditor(String creditor) { } /** - * 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. + * ID of the associated customer + * bank account which the mandate is created and submits payments against. */ public Links withCustomerBankAccount(String customerBankAccount) { this.customerBankAccount = customerBankAccount; @@ -290,9 +293,9 @@ public Links withCustomerBankAccount(String customerBankAccount) { /** * Request class for {@link MandateService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * mandates. + * Returns a cursor-paginated + * list of your mandates. */ public static final class MandateListRequest extends ListRequest { private CreatedAt createdAt; @@ -370,10 +373,10 @@ public MandateListRequest withCreatedAtLte(String lte) { } /** - * 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` + * ID of a creditor. + * 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; @@ -381,10 +384,10 @@ public MandateListRequest withCreditor(String 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` + * ID of a customer. + * 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; @@ -392,10 +395,11 @@ public MandateListRequest withCustomer(String customer) { } /** - * 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` + * ID of a customer + * bank account. 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; @@ -419,10 +423,10 @@ public MandateListRequest withMandateType(String mandateType) { } /** - * 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. + * Unique reference. Different schemes have different length and character + * set 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; @@ -717,7 +721,8 @@ protected boolean hasBody() { * Immediately cancels a mandate and all associated cancellable payments. Any metadata supplied * to this endpoint will be stored on the mandate cancellation event it causes. * - * This will fail with a `cancellation_failed` error if the mandate is already cancelled. + * This will fail with a cancellation_failed error if the mandate is already + * cancelled. */ public static final class MandateCancelRequest extends PostRequest { @PathParam @@ -791,14 +796,15 @@ 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. + * This will fail with a mandate_not_inactive error if the mandate is already being + * submitted, or is active. * * Mandates can be resubmitted up to 10 times. */ diff --git a/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java b/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java index bb76d2a3..161c26d2 100644 --- a/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java +++ b/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java @@ -28,9 +28,9 @@ public NegativeBalanceLimitService(HttpClient httpClient) { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of - * negative balance limits. + * Returns a cursor-paginated + * list of negative balance limits. */ public NegativeBalanceLimitListRequest> list() { return new NegativeBalanceLimitListRequest<>(httpClient, @@ -45,9 +45,9 @@ public NegativeBalanceLimitListRequest> all() { /** * Request class for {@link NegativeBalanceLimitService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of - * negative balance limits. + * Returns a cursor-paginated + * list of negative balance limits. */ public static final class NegativeBalanceLimitListRequest extends ListRequest { @@ -79,8 +79,8 @@ public NegativeBalanceLimitListRequest withCreditor(String creditor) { } /** - * 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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public NegativeBalanceLimitListRequest withCurrency(Currency currency) { this.currency = currency; diff --git a/src/main/java/com/gocardless/services/OutboundPaymentImportEntryService.java b/src/main/java/com/gocardless/services/OutboundPaymentImportEntryService.java index 3e838754..b558ff28 100644 --- a/src/main/java/com/gocardless/services/OutboundPaymentImportEntryService.java +++ b/src/main/java/com/gocardless/services/OutboundPaymentImportEntryService.java @@ -26,9 +26,9 @@ public OutboundPaymentImportEntryService(HttpClient httpClient) { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of the - * entries for a given outbound payment import. + * Returns a cursor-paginated + * list of the entries for a given outbound payment import. */ public OutboundPaymentImportEntryListRequest> list() { return new OutboundPaymentImportEntryListRequest<>(httpClient, @@ -43,9 +43,9 @@ public OutboundPaymentImportEntryListRequestcursor-paginated + * list of the entries for a given outbound payment import. */ public static final class OutboundPaymentImportEntryListRequest extends ListRequest { diff --git a/src/main/java/com/gocardless/services/OutboundPaymentImportService.java b/src/main/java/com/gocardless/services/OutboundPaymentImportService.java index 9b8f116a..4854f792 100644 --- a/src/main/java/com/gocardless/services/OutboundPaymentImportService.java +++ b/src/main/java/com/gocardless/services/OutboundPaymentImportService.java @@ -16,16 +16,21 @@ * * 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. - * + *
    + *
  1. Create the outbound payment import.
  2. + *
  3. Retrieve an authorisation link from the response.
  4. + *
  5. Redirect the user to the link to authorise the import.
  6. + *
  7. Once the user authorises the import, the individual outbound payments are automatically + * submitted.
  8. + *
* 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,9 +59,9 @@ public OutboundPaymentImportGetRequest get(String identity) { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * outbound payment imports. + * Returns a cursor-paginated + * list of your outbound payment imports. */ public OutboundPaymentImportListRequest> list() { return new OutboundPaymentImportListRequest<>(httpClient, @@ -188,13 +193,15 @@ 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 + * character limit for this reference is dependent on the scheme.
+ *
+ * Faster Payments *
    *
  • 18 characters, including: - * "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./"
  • + * "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./" *
+ *
+ *
*/ public EntryItems withReference(String reference) { this.reference = reference; @@ -288,9 +295,9 @@ protected Class getResponseClass() { /** * Request class for {@link OutboundPaymentImportService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * outbound payment imports. + * Returns a cursor-paginated + * list of your outbound payment imports. */ public static final class OutboundPaymentImportListRequest extends ListRequest { @@ -373,11 +380,17 @@ 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 971740e8..7a87eb1b 100644 --- a/src/main/java/com/gocardless/services/OutboundPaymentService.java +++ b/src/main/java/com/gocardless/services/OutboundPaymentService.java @@ -12,23 +12,23 @@ /** * Service class for working with outbound payment resources. * - * Outbound Payments represent payments sent from creditors - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). + * Outbound Payments represent payments sent from + * creditors. * - * 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). + * GoCardless will notify you via a + * webhook when the + * status of the outbound payment changes. * - * Rate limiting + *

Rate limiting

Two rate limits apply to the Outbound Payments APIs: * - * 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. + *
    + *
  • 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; @@ -56,9 +56,10 @@ public OutboundPaymentWithdrawRequest withdraw() { } /** - * Cancels an outbound payment. Only outbound payments with either `verifying`, - * `pending_approval`, or `scheduled` status can be cancelled. Once an outbound payment is - * `executing`, the money moving process has begun and cannot be reversed. + * Cancels an outbound payment. Only outbound payments with either verifying, + * pending_approval, or scheduled status can be cancelled. Once an + * outbound payment is executing, the money moving process has begun and cannot be + * reversed. */ public OutboundPaymentCancelRequest cancel(String identity) { return new OutboundPaymentCancelRequest(httpClient, identity); @@ -80,9 +81,9 @@ public OutboundPaymentGetRequest get(String identity) { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of - * outbound payments. + * Returns a cursor-paginated + * list of outbound payments. */ public OutboundPaymentListRequest> list() { return new OutboundPaymentListRequest<>(httpClient, @@ -211,13 +212,15 @@ 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 + * limit for this reference is dependent on the scheme.
+ *
+ * Faster Payments *
    *
  • 18 characters, including: - * "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./"
  • + * "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./" *
+ *
+ *
*/ public OutboundPaymentCreateRequest withReference(String reference) { this.reference = reference; @@ -396,13 +399,15 @@ 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 + * limit for this reference is dependent on the scheme.
+ *
+ * Faster Payments *
    *
  • 18 characters, including: - * "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./"
  • + * "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./" *
+ *
+ *
*/ public OutboundPaymentWithdrawRequest withReference(String reference) { this.reference = reference; @@ -479,9 +484,10 @@ public Links withCreditor(String creditor) { /** * Request class for {@link OutboundPaymentService#cancel }. * - * Cancels an outbound payment. Only outbound payments with either `verifying`, - * `pending_approval`, or `scheduled` status can be cancelled. Once an outbound payment is - * `executing`, the money moving process has begun and cannot be reversed. + * Cancels an outbound payment. Only outbound payments with either verifying, + * pending_approval, or scheduled status can be cancelled. Once an + * outbound payment is executing, the money moving process has begun and cannot be + * reversed. */ public static final class OutboundPaymentCancelRequest extends PostRequest { @PathParam @@ -650,9 +656,9 @@ protected Class getResponseClass() { /** * Request class for {@link OutboundPaymentService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of - * outbound payments. + * Returns a cursor-paginated + * list of outbound payments. */ public static final class OutboundPaymentListRequest extends ListRequest { @@ -703,22 +709,27 @@ public OutboundPaymentListRequest withLimit(Integer limit) { /** * One of: * - * - `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. + *
    + *
  • verifying: The payment has been created + * and the verification process has begun.
  • + *
  • pending_approval: The payment is awaiting approval.
  • + *
  • scheduled: The payment has passed verification & approval, + * 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 + * or was not approved + * 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 f643d8c5..31dcc644 100644 --- a/src/main/java/com/gocardless/services/PayerAuthorisationService.java +++ b/src/main/java/com/gocardless/services/PayerAuthorisationService.java @@ -9,45 +9,54 @@ /** * Service class for working with payer authorisation resources. * - * + *

* Don't use Payer Authorisations for new integrations. It is deprecated in favour of - * - * Billing Requests (https://developer.gocardless.com/getting-started/billing-requests/overview/). - * Use Billing Requests to build any future integrations. - * + * Billing + * Requests. 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 * custom payment pages. * * The process to use the Payer Authorisation API is as follows: * - * 1. Create a Payer Authorisation, either empty or with already available information 2. Update the - * authorisation with additional information or fix any mistakes 3. Submit the authorisation, after - * the payer has reviewed their information 4. [coming soon] Redirect the payer to the verification - * mechanisms from the response of the Submit request (this will be introduced as a non-breaking - * change) 5. Confirm the authorisation to indicate that the resources can be created - * + *
    + *
  1. Create a Payer Authorisation, either empty or with already available information
  2. + *
  3. Update the authorisation with additional information or fix any mistakes
  4. + *
  5. Submit the authorisation, after the payer has reviewed their information
  6. + *
  7. [coming soon] Redirect the payer to the verification mechanisms from the response of the + * Submit request (this will be introduced as a non-breaking change)
  8. + *
  9. Confirm the authorisation to indicate that the resources can be created
  10. + *
* After the Payer Authorisation is confirmed, resources will eventually be created as it's an * 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 - * (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. - * - * + *
    + *
  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. + *
+ *

+ * 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.
+ *
+ *
+ *
* 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; @@ -85,9 +94,11 @@ 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); @@ -107,10 +118,12 @@ 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); @@ -175,8 +188,9 @@ public static final class PayerAuthorisationCreateRequest private Mandate mandate; /** - * All details required for the creation of a Customer Bank Account - * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts). + * All details required for the creation of a Customer + * Bank Account. */ public PayerAuthorisationCreateRequest withBankAccount(BankAccount bankAccount) { this.bankAccount = bankAccount; @@ -187,8 +201,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). + * unless the request includes a customer + * bank account token. */ public PayerAuthorisationCreateRequest withBankAccountAccountHolderName( String accountHolderName) { @@ -200,9 +215,9 @@ public PayerAuthorisationCreateRequest withBankAccountAccountHolderName( } /** - * 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`. + * Bank account number - see local + * details for more information. Alternatively you can provide an iban. */ public PayerAuthorisationCreateRequest withBankAccountAccountNumber(String accountNumber) { if (bankAccount == null) { @@ -226,9 +241,9 @@ public PayerAuthorisationCreateRequest withBankAccountAccountNumberEnding( } /** - * 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. + * Account number suffix (only for bank accounts denominated in NZD) - see local + * details for more information. */ public PayerAuthorisationCreateRequest withBankAccountAccountNumberSuffix( String accountNumberSuffix) { @@ -241,9 +256,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 - * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for - * more information. + * bank accounts in other currencies. See local + * details for more information. */ public PayerAuthorisationCreateRequest withBankAccountAccountType( BankAccount.AccountType accountType) { @@ -255,9 +270,9 @@ public PayerAuthorisationCreateRequest withBankAccountAccountType( } /** - * Bank code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Bank code - see local + * details for more information. Alternatively you can provide an iban. */ public PayerAuthorisationCreateRequest withBankAccountBankCode(String bankCode) { if (bankAccount == null) { @@ -268,9 +283,9 @@ public PayerAuthorisationCreateRequest withBankAccountBankCode(String bankCode) } /** - * Branch code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Branch code - see local + * details for more information. Alternatively you can provide an iban. */ public PayerAuthorisationCreateRequest withBankAccountBranchCode(String branchCode) { if (bankAccount == null) { @@ -281,9 +296,10 @@ 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). - * Defaults to the country code of the `iban` if supplied, otherwise is required. + * ISO + * 3166-1 alpha-2 code. Defaults to the country code of the iban if + * supplied, otherwise is required. */ public PayerAuthorisationCreateRequest withBankAccountCountryCode(String countryCode) { if (bankAccount == null) { @@ -294,8 +310,8 @@ public PayerAuthorisationCreateRequest withBankAccountCountryCode(String country } /** - * 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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public PayerAuthorisationCreateRequest withBankAccountCurrency(String currency) { if (bankAccount == null) { @@ -306,10 +322,12 @@ public PayerAuthorisationCreateRequest withBankAccountCurrency(String currency) } /** - * 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). + * International Bank Account Number. Alternatively you can provide local + * details. IBANs are not accepted for Swedish bank accounts denominated in SEK - you + * must supply + * local + * details. */ public PayerAuthorisationCreateRequest withBankAccountIban(String iban) { if (bankAccount == null) { @@ -333,8 +351,8 @@ public PayerAuthorisationCreateRequest withBankAccountMetadata( } /** - * All details required for the creation of a Customer - * (https://developer.gocardless.com/api-reference/#core-endpoints-customers). + * All details required for the creation of a Customer. */ public PayerAuthorisationCreateRequest withCustomer(Customer customer) { this.customer = customer; @@ -386,10 +404,11 @@ public PayerAuthorisationCreateRequest withCustomerCity(String city) { } /** - * Customer's company name. Required unless a `given_name` and `family_name` are provided. - * For Canadian customers, the use of a `company_name` value will mean that any mandate - * created from this customer will be considered to be a "Business PAD" (otherwise, any - * mandate will be considered to be a "Personal PAD"). + * Customer's company name. Required unless a given_name and + * family_name are provided. For Canadian customers, the use of a + * company_name value will mean that any mandate created from this customer + * will be considered to be a "Business PAD" (otherwise, any mandate will be considered to + * be a "Personal PAD"). */ public PayerAuthorisationCreateRequest withCustomerCompanyName(String companyName) { if (customer == null) { @@ -400,8 +419,9 @@ 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. */ public PayerAuthorisationCreateRequest withCustomerCountryCode(String countryCode) { if (customer == null) { @@ -437,7 +457,7 @@ public PayerAuthorisationCreateRequest withCustomerEmail(String email) { } /** - * Customer's surname. Required unless a `company_name` is provided. + * Customer's surname. Required unless a company_name is provided. */ public PayerAuthorisationCreateRequest withCustomerFamilyName(String familyName) { if (customer == null) { @@ -448,7 +468,7 @@ public PayerAuthorisationCreateRequest withCustomerFamilyName(String familyName) } /** - * Customer's first name. Required unless a `company_name` is provided. + * Customer's first name. Required unless a company_name is provided. */ public PayerAuthorisationCreateRequest withCustomerGivenName(String givenName) { if (customer == null) { @@ -459,8 +479,8 @@ public PayerAuthorisationCreateRequest withCustomerGivenName(String givenName) { } /** - * An IETF Language Tag (https://tools.ietf.org/html/rfc5646), used for both language and - * regional variations of our product. + * An IETF Language Tag, used for both + * language and regional variations of our product. */ public PayerAuthorisationCreateRequest withCustomerLocale(String locale) { if (customer == null) { @@ -495,8 +515,8 @@ 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. - * `CA` for California). + * ISO3166-2:US state code is + * required (e.g. CA for California). */ public PayerAuthorisationCreateRequest withCustomerRegion(String region) { if (customer == null) { @@ -521,8 +541,8 @@ public PayerAuthorisationCreateRequest withCustomerSwedishIdentityNumber( } /** - * All details required for the creation of a Mandate - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates). + * All details required for the creation of a Mandate. */ public PayerAuthorisationCreateRequest withMandate(Mandate mandate) { this.mandate = mandate; @@ -546,8 +566,8 @@ public PayerAuthorisationCreateRequest withMandateMetadata(Map m * the payer to whom the mandate belongs (i.e. as a result of their completion of a mandate * setup flow in their browser). * - * Not required for creating offline mandates where `authorisation_source` is set to - * telephone or paper. + * Not required for creating offline mandates where authorisation_source is set + * to telephone or paper. */ public PayerAuthorisationCreateRequest withMandatePayerIpAddress(String payerIpAddress) { if (mandate == null) { @@ -558,10 +578,10 @@ public PayerAuthorisationCreateRequest withMandatePayerIpAddress(String payerIpA } /** - * 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. + * Unique reference. Different schemes have different length and character + * set 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 +663,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). + * unless the request includes a customer + * bank account token. */ public BankAccount withAccountHolderName(String accountHolderName) { this.accountHolderName = accountHolderName; @@ -652,9 +673,9 @@ public BankAccount withAccountHolderName(String accountHolderName) { } /** - * 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`. + * Bank account number - see local + * details for more information. Alternatively you can provide an iban. */ public BankAccount withAccountNumber(String accountNumber) { this.accountNumber = accountNumber; @@ -671,9 +692,9 @@ public BankAccount withAccountNumberEnding(String accountNumberEnding) { } /** - * 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. + * Account number suffix (only for bank accounts denominated in NZD) - see local + * details for more information. */ public BankAccount withAccountNumberSuffix(String accountNumberSuffix) { this.accountNumberSuffix = accountNumberSuffix; @@ -682,9 +703,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 - * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) - * for more information. + * for bank accounts in other currencies. See local + * details for more information. */ public BankAccount withAccountType(AccountType accountType) { this.accountType = accountType; @@ -692,9 +713,9 @@ public BankAccount withAccountType(AccountType accountType) { } /** - * Bank code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for - * more information. Alternatively you can provide an `iban`. + * Bank code - see local + * details for more information. Alternatively you can provide an iban. */ public BankAccount withBankCode(String bankCode) { this.bankCode = bankCode; @@ -702,9 +723,9 @@ public BankAccount withBankCode(String bankCode) { } /** - * Branch code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for - * more information. Alternatively you can provide an `iban`. + * Branch code - see local + * details for more information. Alternatively you can provide an iban. */ public BankAccount withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -712,9 +733,10 @@ 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). - * Defaults to the country code of the `iban` if supplied, otherwise is required. + * ISO + * 3166-1 alpha-2 code. Defaults to the country code of the iban if + * supplied, otherwise is required. */ public BankAccount withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -722,8 +744,9 @@ public BankAccount withCountryCode(String countryCode) { } /** - * 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. + * ISO 4217 currency + * code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + * supported. */ public BankAccount withCurrency(String currency) { this.currency = currency; @@ -731,10 +754,12 @@ public BankAccount withCurrency(String currency) { } /** - * 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). + * International Bank Account Number. Alternatively you can provide local + * details. IBANs are not accepted for Swedish bank accounts denominated in SEK - + * you must supply local + * details. */ public BankAccount withIban(String iban) { this.iban = iban; @@ -813,10 +838,11 @@ public Customer withCity(String city) { } /** - * Customer's company name. Required unless a `given_name` and `family_name` are - * provided. For Canadian customers, the use of a `company_name` value will mean that - * any mandate created from this customer will be considered to be a "Business PAD" - * (otherwise, any mandate will be considered to be a "Personal PAD"). + * Customer's company name. Required unless a given_name and + * family_name are provided. For Canadian customers, the use of a + * company_name value will mean that any mandate created from this customer + * will be considered to be a "Business PAD" (otherwise, any mandate will be considered + * to be a "Personal PAD"). */ public Customer withCompanyName(String companyName) { this.companyName = companyName; @@ -824,8 +850,9 @@ 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. */ public Customer withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -851,7 +878,7 @@ public Customer withEmail(String email) { } /** - * Customer's surname. Required unless a `company_name` is provided. + * Customer's surname. Required unless a company_name is provided. */ public Customer withFamilyName(String familyName) { this.familyName = familyName; @@ -859,7 +886,7 @@ public Customer withFamilyName(String familyName) { } /** - * Customer's first name. Required unless a `company_name` is provided. + * Customer's first name. Required unless a company_name is provided. */ public Customer withGivenName(String givenName) { this.givenName = givenName; @@ -867,8 +894,8 @@ public Customer withGivenName(String givenName) { } /** - * An IETF Language Tag (https://tools.ietf.org/html/rfc5646), used for both language - * and regional variations of our product. + * An IETF Language Tag, used for both + * language and regional variations of our product. */ public Customer withLocale(String locale) { this.locale = locale; @@ -894,8 +921,8 @@ 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 - * (e.g. `CA` for California). + * ISO3166-2:US state code is + * required (e.g. CA for California). */ public Customer withRegion(String region) { this.region = region; @@ -934,8 +961,8 @@ public Mandate withMetadata(Map metadata) { * address of the payer to whom the mandate belongs (i.e. as a result of their * completion of a mandate setup flow in their browser). * - * Not required for creating offline mandates where `authorisation_source` is set to - * telephone or paper. + * Not required for creating offline mandates where authorisation_source is + * set to telephone or paper. */ public Mandate withPayerIpAddress(String payerIpAddress) { this.payerIpAddress = payerIpAddress; @@ -943,10 +970,10 @@ public Mandate withPayerIpAddress(String payerIpAddress) { } /** - * 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. + * Unique reference. Different schemes have different length and character + * set 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; @@ -991,9 +1018,11 @@ 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 { @@ -1004,8 +1033,9 @@ public static final class PayerAuthorisationUpdateRequest private Mandate mandate; /** - * All details required for the creation of a Customer Bank Account - * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts). + * All details required for the creation of a Customer + * Bank Account. */ public PayerAuthorisationUpdateRequest withBankAccount(BankAccount bankAccount) { this.bankAccount = bankAccount; @@ -1016,8 +1046,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). + * unless the request includes a customer + * bank account token. */ public PayerAuthorisationUpdateRequest withBankAccountAccountHolderName( String accountHolderName) { @@ -1029,9 +1060,9 @@ public PayerAuthorisationUpdateRequest withBankAccountAccountHolderName( } /** - * 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`. + * Bank account number - see local + * details for more information. Alternatively you can provide an iban. */ public PayerAuthorisationUpdateRequest withBankAccountAccountNumber(String accountNumber) { if (bankAccount == null) { @@ -1055,9 +1086,9 @@ public PayerAuthorisationUpdateRequest withBankAccountAccountNumberEnding( } /** - * 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. + * Account number suffix (only for bank accounts denominated in NZD) - see local + * details for more information. */ public PayerAuthorisationUpdateRequest withBankAccountAccountNumberSuffix( String accountNumberSuffix) { @@ -1070,9 +1101,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 - * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for - * more information. + * bank accounts in other currencies. See local + * details for more information. */ public PayerAuthorisationUpdateRequest withBankAccountAccountType( BankAccount.AccountType accountType) { @@ -1084,9 +1115,9 @@ public PayerAuthorisationUpdateRequest withBankAccountAccountType( } /** - * Bank code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Bank code - see local + * details for more information. Alternatively you can provide an iban. */ public PayerAuthorisationUpdateRequest withBankAccountBankCode(String bankCode) { if (bankAccount == null) { @@ -1097,9 +1128,9 @@ public PayerAuthorisationUpdateRequest withBankAccountBankCode(String bankCode) } /** - * Branch code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Branch code - see local + * details for more information. Alternatively you can provide an iban. */ public PayerAuthorisationUpdateRequest withBankAccountBranchCode(String branchCode) { if (bankAccount == null) { @@ -1110,9 +1141,10 @@ 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). - * Defaults to the country code of the `iban` if supplied, otherwise is required. + * ISO + * 3166-1 alpha-2 code. Defaults to the country code of the iban if + * supplied, otherwise is required. */ public PayerAuthorisationUpdateRequest withBankAccountCountryCode(String countryCode) { if (bankAccount == null) { @@ -1123,8 +1155,8 @@ public PayerAuthorisationUpdateRequest withBankAccountCountryCode(String country } /** - * 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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public PayerAuthorisationUpdateRequest withBankAccountCurrency(String currency) { if (bankAccount == null) { @@ -1135,10 +1167,12 @@ public PayerAuthorisationUpdateRequest withBankAccountCurrency(String currency) } /** - * 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). + * International Bank Account Number. Alternatively you can provide local + * details. IBANs are not accepted for Swedish bank accounts denominated in SEK - you + * must supply + * local + * details. */ public PayerAuthorisationUpdateRequest withBankAccountIban(String iban) { if (bankAccount == null) { @@ -1162,8 +1196,8 @@ public PayerAuthorisationUpdateRequest withBankAccountMetadata( } /** - * All details required for the creation of a Customer - * (https://developer.gocardless.com/api-reference/#core-endpoints-customers). + * All details required for the creation of a Customer. */ public PayerAuthorisationUpdateRequest withCustomer(Customer customer) { this.customer = customer; @@ -1215,10 +1249,11 @@ public PayerAuthorisationUpdateRequest withCustomerCity(String city) { } /** - * Customer's company name. Required unless a `given_name` and `family_name` are provided. - * For Canadian customers, the use of a `company_name` value will mean that any mandate - * created from this customer will be considered to be a "Business PAD" (otherwise, any - * mandate will be considered to be a "Personal PAD"). + * Customer's company name. Required unless a given_name and + * family_name are provided. For Canadian customers, the use of a + * company_name value will mean that any mandate created from this customer + * will be considered to be a "Business PAD" (otherwise, any mandate will be considered to + * be a "Personal PAD"). */ public PayerAuthorisationUpdateRequest withCustomerCompanyName(String companyName) { if (customer == null) { @@ -1229,8 +1264,9 @@ 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. */ public PayerAuthorisationUpdateRequest withCustomerCountryCode(String countryCode) { if (customer == null) { @@ -1266,7 +1302,7 @@ public PayerAuthorisationUpdateRequest withCustomerEmail(String email) { } /** - * Customer's surname. Required unless a `company_name` is provided. + * Customer's surname. Required unless a company_name is provided. */ public PayerAuthorisationUpdateRequest withCustomerFamilyName(String familyName) { if (customer == null) { @@ -1277,7 +1313,7 @@ public PayerAuthorisationUpdateRequest withCustomerFamilyName(String familyName) } /** - * Customer's first name. Required unless a `company_name` is provided. + * Customer's first name. Required unless a company_name is provided. */ public PayerAuthorisationUpdateRequest withCustomerGivenName(String givenName) { if (customer == null) { @@ -1288,8 +1324,8 @@ public PayerAuthorisationUpdateRequest withCustomerGivenName(String givenName) { } /** - * An IETF Language Tag (https://tools.ietf.org/html/rfc5646), used for both language and - * regional variations of our product. + * An IETF Language Tag, used for both + * language and regional variations of our product. */ public PayerAuthorisationUpdateRequest withCustomerLocale(String locale) { if (customer == null) { @@ -1324,8 +1360,8 @@ 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. - * `CA` for California). + * ISO3166-2:US state code is + * required (e.g. CA for California). */ public PayerAuthorisationUpdateRequest withCustomerRegion(String region) { if (customer == null) { @@ -1350,8 +1386,8 @@ public PayerAuthorisationUpdateRequest withCustomerSwedishIdentityNumber( } /** - * All details required for the creation of a Mandate - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates). + * All details required for the creation of a Mandate. */ public PayerAuthorisationUpdateRequest withMandate(Mandate mandate) { this.mandate = mandate; @@ -1375,8 +1411,8 @@ public PayerAuthorisationUpdateRequest withMandateMetadata(Map m * the payer to whom the mandate belongs (i.e. as a result of their completion of a mandate * setup flow in their browser). * - * Not required for creating offline mandates where `authorisation_source` is set to - * telephone or paper. + * Not required for creating offline mandates where authorisation_source is set + * to telephone or paper. */ public PayerAuthorisationUpdateRequest withMandatePayerIpAddress(String payerIpAddress) { if (mandate == null) { @@ -1387,10 +1423,10 @@ public PayerAuthorisationUpdateRequest withMandatePayerIpAddress(String payerIpA } /** - * 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. + * Unique reference. Different schemes have different length and character + * set 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) { @@ -1466,8 +1502,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). + * unless the request includes a customer + * bank account token. */ public BankAccount withAccountHolderName(String accountHolderName) { this.accountHolderName = accountHolderName; @@ -1475,9 +1512,9 @@ public BankAccount withAccountHolderName(String accountHolderName) { } /** - * 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`. + * Bank account number - see local + * details for more information. Alternatively you can provide an iban. */ public BankAccount withAccountNumber(String accountNumber) { this.accountNumber = accountNumber; @@ -1494,9 +1531,9 @@ public BankAccount withAccountNumberEnding(String accountNumberEnding) { } /** - * 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. + * Account number suffix (only for bank accounts denominated in NZD) - see local + * details for more information. */ public BankAccount withAccountNumberSuffix(String accountNumberSuffix) { this.accountNumberSuffix = accountNumberSuffix; @@ -1505,9 +1542,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 - * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) - * for more information. + * for bank accounts in other currencies. See local + * details for more information. */ public BankAccount withAccountType(AccountType accountType) { this.accountType = accountType; @@ -1515,9 +1552,9 @@ public BankAccount withAccountType(AccountType accountType) { } /** - * Bank code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for - * more information. Alternatively you can provide an `iban`. + * Bank code - see local + * details for more information. Alternatively you can provide an iban. */ public BankAccount withBankCode(String bankCode) { this.bankCode = bankCode; @@ -1525,9 +1562,9 @@ public BankAccount withBankCode(String bankCode) { } /** - * Branch code - see local details - * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for - * more information. Alternatively you can provide an `iban`. + * Branch code - see local + * details for more information. Alternatively you can provide an iban. */ public BankAccount withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -1535,9 +1572,10 @@ 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). - * Defaults to the country code of the `iban` if supplied, otherwise is required. + * ISO + * 3166-1 alpha-2 code. Defaults to the country code of the iban if + * supplied, otherwise is required. */ public BankAccount withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -1545,8 +1583,9 @@ public BankAccount withCountryCode(String countryCode) { } /** - * 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. + * ISO 4217 currency + * code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + * supported. */ public BankAccount withCurrency(String currency) { this.currency = currency; @@ -1554,10 +1593,12 @@ public BankAccount withCurrency(String currency) { } /** - * 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). + * International Bank Account Number. Alternatively you can provide local + * details. IBANs are not accepted for Swedish bank accounts denominated in SEK - + * you must supply local + * details. */ public BankAccount withIban(String iban) { this.iban = iban; @@ -1636,10 +1677,11 @@ public Customer withCity(String city) { } /** - * Customer's company name. Required unless a `given_name` and `family_name` are - * provided. For Canadian customers, the use of a `company_name` value will mean that - * any mandate created from this customer will be considered to be a "Business PAD" - * (otherwise, any mandate will be considered to be a "Personal PAD"). + * Customer's company name. Required unless a given_name and + * family_name are provided. For Canadian customers, the use of a + * company_name value will mean that any mandate created from this customer + * will be considered to be a "Business PAD" (otherwise, any mandate will be considered + * to be a "Personal PAD"). */ public Customer withCompanyName(String companyName) { this.companyName = companyName; @@ -1647,8 +1689,9 @@ 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. */ public Customer withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -1674,7 +1717,7 @@ public Customer withEmail(String email) { } /** - * Customer's surname. Required unless a `company_name` is provided. + * Customer's surname. Required unless a company_name is provided. */ public Customer withFamilyName(String familyName) { this.familyName = familyName; @@ -1682,7 +1725,7 @@ public Customer withFamilyName(String familyName) { } /** - * Customer's first name. Required unless a `company_name` is provided. + * Customer's first name. Required unless a company_name is provided. */ public Customer withGivenName(String givenName) { this.givenName = givenName; @@ -1690,8 +1733,8 @@ public Customer withGivenName(String givenName) { } /** - * An IETF Language Tag (https://tools.ietf.org/html/rfc5646), used for both language - * and regional variations of our product. + * An IETF Language Tag, used for both + * language and regional variations of our product. */ public Customer withLocale(String locale) { this.locale = locale; @@ -1717,8 +1760,8 @@ 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 - * (e.g. `CA` for California). + * ISO3166-2:US state code is + * required (e.g. CA for California). */ public Customer withRegion(String region) { this.region = region; @@ -1757,8 +1800,8 @@ public Mandate withMetadata(Map metadata) { * address of the payer to whom the mandate belongs (i.e. as a result of their * completion of a mandate setup flow in their browser). * - * Not required for creating offline mandates where `authorisation_source` is set to - * telephone or paper. + * Not required for creating offline mandates where authorisation_source is + * set to telephone or paper. */ public Mandate withPayerIpAddress(String payerIpAddress) { this.payerIpAddress = payerIpAddress; @@ -1766,10 +1809,10 @@ public Mandate withPayerIpAddress(String payerIpAddress) { } /** - * 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. + * Unique reference. Different schemes have different length and character + * set 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; @@ -1864,10 +1907,12 @@ 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 d1943430..e8364051 100644 --- a/src/main/java/com/gocardless/services/PaymentAccountService.java +++ b/src/main/java/com/gocardless/services/PaymentAccountService.java @@ -10,8 +10,9 @@ /** * 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 (https://developer.gocardless.com/api-reference/#core-endpoints-outbound-payments). + * Access the details of bank accounts provided for you by GoCardless that are used to fund Outbound + * Payments. */ public class PaymentAccountService { private final HttpClient httpClient; @@ -32,9 +33,9 @@ public PaymentAccountGetRequest get(String identity) { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * payment accounts. + * Returns a cursor-paginated + * list of your payment accounts. */ public PaymentAccountListRequest> list() { return new PaymentAccountListRequest<>(httpClient, @@ -91,9 +92,9 @@ protected Class getResponseClass() { /** * Request class for {@link PaymentAccountService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * payment accounts. + * Returns a cursor-paginated + * 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 61baf703..898d1b7f 100644 --- a/src/main/java/com/gocardless/services/PaymentAccountTransactionService.java +++ b/src/main/java/com/gocardless/services/PaymentAccountTransactionService.java @@ -12,8 +12,9 @@ * 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 - * (https://developer.gocardless.com/api-reference/#core-endpoints-outbound-payments). + * account is provisioned by GoCardless and is used to fund 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 86b624e1..bbcfd309 100644 --- a/src/main/java/com/gocardless/services/PaymentService.java +++ b/src/main/java/com/gocardless/services/PaymentService.java @@ -12,14 +12,16 @@ /** * Service class for working with payment resources. * - * 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). + * Payment objects represent payments from a + * customer + * to a + * creditor, + * taken against a Direct Debit + * mandate. * - * GoCardless will notify you via a webhook - * (https://developer.gocardless.com/api-reference/#appendix-webhooks) whenever the state of a - * payment changes. + * GoCardless will notify you via a + * webhook whenever + * the state of a payment changes. */ public class PaymentService { private final HttpClient httpClient; @@ -33,21 +35,22 @@ 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 - * (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`. + * This fails with a mandate_is_inactive error if the linked + * mandate + * 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 - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * payments. + * Returns a cursor-paginated + * list of your payments. */ public PaymentListRequest> list() { return new PaymentListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -75,21 +78,22 @@ public PaymentUpdateRequest update(String identity) { * Cancels the payment if it has not already been submitted to the banks. Any metadata supplied * to this endpoint will be stored on the payment cancellation event it causes. * - * This will fail with a `cancellation_failed` error unless the payment's status is - * `pending_submission`. + * This will fail with a cancellation_failed error unless the payment's status is + * pending_submission. */ public PaymentCancelRequest cancel(String identity) { return new PaymentCancelRequest(httpClient, 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. + * This will return a retry_failed error if the payment has not failed. * * Payments can be retried up to 3 times. */ @@ -100,12 +104,13 @@ 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 - * (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`. + * This fails with a mandate_is_inactive error if the linked + * mandate + * 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; @@ -123,11 +128,12 @@ public static final class PaymentCreateRequest extends IdempotentPostRequestTransaction + * limits * * For Variable Recurring Payments (VRP), this must not exceed the mandate's - * `max_amount_per_payment` constraint. + * max_amount_per_payment constraint. */ public PaymentCreateRequest withAmount(Integer amount) { this.amount = amount; @@ -145,10 +151,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 - * (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. + * will be collected as soon as possible. If the value is before the mandate'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; @@ -156,8 +162,8 @@ public PaymentCreateRequest withChargeDate(String chargeDate) { } /** - * 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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public PaymentCreateRequest withCurrency(Currency currency) { this.currency = currency; @@ -167,8 +173,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#appendix-compliance-requirements)). + * notifications (see compliance + * requirements). */ public PaymentCreateRequest withDescription(String description) { this.description = description; @@ -191,9 +198,9 @@ public PaymentCreateRequest withLinks(Links links) { } /** - * ID of the mandate - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) against which - * this payment should be collected. + * ID of the mandate + * against which this payment should be collected. */ public PaymentCreateRequest withLinksMandate(String mandate) { if (links == null) { @@ -228,10 +235,13 @@ 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 - * initiated by the merchant based on an established consent (e.g., a recurring subscription - * payment). + *
    + *
  • 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).
  • + *
*/ public PaymentCreateRequest withPsuInteractionType(PsuInteractionType psuInteractionType) { this.psuInteractionType = psuInteractionType; @@ -240,51 +250,78 @@ 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 + * limit for this reference is dependent on the scheme.
+ *
+ * ACH *
    *
  • 10 characters
  • *
- * Autogiro + *
+ *
+ * Autogiro *
    *
  • 11 characters
  • *
- * Bacs + *
+ *
+ * Bacs *
    *
  • 10 characters
  • *
- * BECS + *
+ *
+ * BECS *
    *
  • 30 characters
  • *
- * BECS NZ + *
+ *
+ * BECS NZ *
    *
  • 12 characters
  • *
- * Betalingsservice + *
+ *
+ * Betalingsservice *
    *
  • 30 characters
  • *
- * Faster Payments + *
+ *
+ * Faster Payments *
    *
  • 18 characters
  • *
- * PAD + *
+ *
+ * PAD *
    *
  • scheme doesn't offer references
  • *
- * PayTo + *
+ *
+ * PayTo *
    *
  • 18 characters
  • *
- * SEPA + *
+ *
+ * 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 (https://gocardless.com/pricing). 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. + *

+ *

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

*/ public PaymentCreateRequest withReference(String reference) { this.reference = reference; @@ -292,10 +329,13 @@ public PaymentCreateRequest withReference(String reference) { } /** - * 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). + * On failure, automatically retry the payment using + * intelligent retries. + * Default is false. + *

+ * Important: To be able to use intelligent retries, Success+ needs to be + * enabled in GoCardless dashboard. + *

*/ public PaymentCreateRequest withRetryIfPossible(Boolean retryIfPossible) { this.retryIfPossible = retryIfPossible; @@ -379,9 +419,9 @@ public static class Links { private String mandate; /** - * ID of the mandate - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) against - * which this payment should be collected. + * ID of the mandate + * against which this payment should be collected. */ public Links withMandate(String mandate) { this.mandate = mandate; @@ -393,9 +433,9 @@ public Links withMandate(String mandate) { /** * Request class for {@link PaymentService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * payments. + * Returns a cursor-paginated + * list of your payments. */ public static final class PaymentListRequest extends ListRequest { private ChargeDate chargeDate; @@ -530,7 +570,7 @@ public PaymentListRequest withCreatedAtLte(String lte) { /** * ID of a creditor to filter payments by. If you pass this parameter, you cannot also pass - * `customer`. + * customer. */ public PaymentListRequest withCreditor(String creditor) { this.creditor = creditor; @@ -538,8 +578,8 @@ public PaymentListRequest withCreditor(String creditor) { } /** - * 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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public PaymentListRequest withCurrency(Currency currency) { this.currency = currency; @@ -548,7 +588,7 @@ public PaymentListRequest withCurrency(Currency currency) { /** * ID of a customer to filter payments by. If you pass this parameter, you cannot also pass - * `creditor`. + * creditor. */ public PaymentListRequest withCustomer(String customer) { this.customer = customer; @@ -585,7 +625,10 @@ public PaymentListRequest withScheme(String scheme) { /** * The direction to sort in. One of: * - * - `asc` - `desc` + *
    + *
  • asc
  • + *
  • desc
  • + *
*/ public PaymentListRequest withSortDirection(SortDirection sortDirection) { this.sortDirection = sortDirection; @@ -595,7 +638,10 @@ 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; @@ -605,16 +651,22 @@ 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 - * (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 + *
    + *
  • 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
  • + *
  • 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; @@ -947,10 +999,13 @@ public PaymentUpdateRequest withMetadata(String key, String value) { } /** - * 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). + * On failure, automatically retry the payment using + * intelligent retries. + * Default is false. + *

+ * Important: To be able to use intelligent retries, Success+ needs to be + * enabled in GoCardless dashboard. + *

*/ public PaymentUpdateRequest withRetryIfPossible(Boolean retryIfPossible) { this.retryIfPossible = retryIfPossible; @@ -1001,8 +1056,8 @@ protected boolean hasBody() { * Cancels the payment if it has not already been submitted to the banks. Any metadata supplied * to this endpoint will be stored on the payment cancellation event it causes. * - * This will fail with a `cancellation_failed` error unless the payment's status is - * `pending_submission`. + * This will fail with a cancellation_failed error unless the payment's status is + * pending_submission. */ public static final class PaymentCancelRequest extends PostRequest { @PathParam @@ -1076,13 +1131,14 @@ 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. + * This will return a retry_failed error if the payment has not failed. * * Payments can be retried up to 3 times. */ @@ -1094,10 +1150,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 - * (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. + * will be collected as soon as possible. If the value is before the mandate'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 0bd467c5..ddf3c959 100644 --- a/src/main/java/com/gocardless/services/PayoutItemService.java +++ b/src/main/java/com/gocardless/services/PayoutItemService.java @@ -21,7 +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; @@ -35,12 +35,12 @@ public PayoutItemService(HttpClient httpClient) { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of items - * in the payout. + * Returns a cursor-paginated + * 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. + * 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,12 +53,12 @@ public PayoutItemListRequest> all() { /** * Request class for {@link PayoutItemService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of items - * in the payout. + * Returns a cursor-paginated + * 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. + * 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 0a82560d..59fe421a 100644 --- a/src/main/java/com/gocardless/services/PayoutService.java +++ b/src/main/java/com/gocardless/services/PayoutService.java @@ -12,12 +12,12 @@ /** * Service class for working with payout resources. * - * 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. + * Payouts represent transfers from GoCardless to a + * creditor. + * Each payout contains the funds collected from one or many + * 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; @@ -31,9 +31,9 @@ public PayoutService(HttpClient httpClient) { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * payouts. + * Returns a cursor-paginated + * list of your payouts. */ public PayoutListRequest> list() { return new PayoutListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -45,8 +45,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#events-reconciling-payouts-with-events). + * in a payout, see this + * guide. */ public PayoutGetRequest get(String identity) { return new PayoutGetRequest(httpClient, identity); @@ -62,9 +63,9 @@ public PayoutUpdateRequest update(String identity) { /** * Request class for {@link PayoutService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * payouts. + * Returns a cursor-paginated + * list of your payouts. */ public static final class PayoutListRequest extends ListRequest { private CreatedAt createdAt; @@ -158,8 +159,8 @@ public PayoutListRequest withCreditorBankAccount(String creditorBankAccount) } /** - * 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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public PayoutListRequest withCurrency(Currency currency) { this.currency = currency; @@ -176,8 +177,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; @@ -186,8 +187,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) { @@ -216,10 +217,13 @@ 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; @@ -385,8 +389,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#events-reconciling-payouts-with-events). + * in a payout, see this + * guide. */ 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 2bca6e20..c09caabc 100644 --- a/src/main/java/com/gocardless/services/RedirectFlowService.java +++ b/src/main/java/com/gocardless/services/RedirectFlowService.java @@ -10,38 +10,46 @@ /** * 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 (https://developer.gocardless.com/api-reference/#billing-requests-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. + *

+ * Deprecated: Redirect Flows are legacy APIs and cannot be used by new + * integrators. The Billing + * Request flow API should be used for your payment flows. + *

+ * Redirect flows enable you to use GoCardless' + * hosted payment pages 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 - * (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. - * - * 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. + *
    + *
  1. You create + * a redirect flow for your customer, and redirect them to the returned redirect url, e.g. + * https://pay.gocardless.com/flow/RE123.
  2. + *
  3. 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.
  4. + *
  5. You complete + * the redirect flow, which creates a + * customer, + * customer + * bank account, and + * mandate, + * and returns the ID of the mandate. You may wish to create a subscription + * or payment + * at this point.
  6. + *
+ * Once you have completed + * 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. @@ -73,17 +81,19 @@ public RedirectFlowGetRequest get(String identity) { } /** - * 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 creates a customer, + * customer + * bank account, and + * mandate + * 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 - * integration has already completed this flow. It will return a `bad_request` error if the - * `session_token` differs to the one supplied when the redirect flow was created. + * 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 integration has already completed this flow. It will return a + * bad_request error if the session_token differs to the one supplied + * when the redirect flow was created. */ public RedirectFlowCompleteRequest complete(String identity) { return new RedirectFlowCompleteRequest(httpClient, identity); @@ -121,9 +131,10 @@ public RedirectFlowCreateRequest withLinks(Links links) { } /** - * 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. + * The creditor + * 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) { @@ -135,8 +146,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; @@ -145,8 +156,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) { @@ -169,9 +180,9 @@ public RedirectFlowCreateRequest withPrefilledBankAccount( /** * Bank account type for USD-denominated bank accounts. Must not be provided for bank - * accounts in other currencies. See local details - * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for - * more information. + * accounts in other currencies. See local + * details for more information. */ public RedirectFlowCreateRequest withPrefilledBankAccountAccountType( PrefilledBankAccount.AccountType accountType) { @@ -238,8 +249,8 @@ public RedirectFlowCreateRequest withPrefilledCustomerCity(String city) { } /** - * Customer's company name. Company name should only be provided if `given_name` and - * `family_name` are null. + * Customer's company name. Company name should only be provided if given_name + * and family_name are null. */ public RedirectFlowCreateRequest withPrefilledCustomerCompanyName(String companyName) { if (prefilledCustomer == null) { @@ -250,8 +261,9 @@ 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. */ public RedirectFlowCreateRequest withPrefilledCustomerCountryCode(String countryCode) { if (prefilledCustomer == null) { @@ -307,7 +319,7 @@ public RedirectFlowCreateRequest withPrefilledCustomerGivenName(String givenName } /** - * ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + * ISO 639-1 code. */ public RedirectFlowCreateRequest withPrefilledCustomerLanguage(String language) { if (prefilledCustomer == null) { @@ -385,7 +397,7 @@ public RedirectFlowCreateRequest withSessionToken(String sessionToken) { /** * The URL to redirect to upon successful mandate setup. You must use a URL beginning - * `https` in the live environment. + * https in the live environment. */ public RedirectFlowCreateRequest withSuccessRedirectUrl(String successRedirectUrl) { this.successRedirectUrl = successRedirectUrl; @@ -457,10 +469,10 @@ public static class Links { private String creditor; /** - * 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. + * The creditor + * 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; @@ -473,9 +485,9 @@ 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 - * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) - * for more information. + * accounts in other currencies. See local + * details for more information. */ public PrefilledBankAccount withAccountType(AccountType accountType) { this.accountType = accountType; @@ -545,8 +557,8 @@ public PrefilledCustomer withCity(String city) { } /** - * Customer's company name. Company name should only be provided if `given_name` and - * `family_name` are null. + * Customer's company name. Company name should only be provided if + * given_name and family_name are null. */ public PrefilledCustomer withCompanyName(String companyName) { this.companyName = companyName; @@ -554,8 +566,9 @@ 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. */ public PrefilledCustomer withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -595,7 +608,7 @@ public PrefilledCustomer withGivenName(String givenName) { } /** - * ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + * ISO 639-1 code. */ public PrefilledCustomer withLanguage(String language) { this.language = language; @@ -682,17 +695,19 @@ protected Class getResponseClass() { /** * Request class for {@link RedirectFlowService#complete }. * - * 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 creates a customer, + * customer + * bank account, and + * mandate + * 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 - * integration has already completed this flow. It will return a `bad_request` error if the - * `session_token` differs to the one supplied when the redirect flow was created. + * 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 integration has already completed this flow. It will return a + * bad_request error if the session_token differs to the one supplied + * when the redirect flow was created. */ public static final class RedirectFlowCompleteRequest extends PostRequest { @PathParam diff --git a/src/main/java/com/gocardless/services/RefundService.java b/src/main/java/com/gocardless/services/RefundService.java index 590eadf6..7bd7ba9e 100644 --- a/src/main/java/com/gocardless/services/RefundService.java +++ b/src/main/java/com/gocardless/services/RefundService.java @@ -12,13 +12,14 @@ /** * Service class for working with refund resources. * - * 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). + * Refund objects represent (partial) refunds of a + * payment + * back to the + * customer. * - * 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. + * GoCardless will notify you via a + * webhook whenever + * a refund is created, and will update the amount_refunded property of the payment. */ public class RefundService { private final HttpClient httpClient; @@ -34,22 +35,25 @@ 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. + *
    + *
  • 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.
  • + *
*/ public RefundCreateRequest create() { return new RefundCreateRequest(httpClient); } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * refunds. + * Returns a cursor-paginated + * list of your refunds. */ public RefundListRequest> list() { return new RefundListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -78,13 +82,16 @@ 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. + *
    + *
  • 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.
  • + *
*/ public static final class RefundCreateRequest extends IdempotentPostRequest { private Integer amount; @@ -107,10 +114,14 @@ public RefundCreateRequest withLinks(Links links) { } /** - * 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). + * ID of the mandate + * against which the refund is being made.
+ *
+ *

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

*/ public RefundCreateRequest withLinksMandate(String mandate) { if (links == null) { @@ -121,9 +132,9 @@ public RefundCreateRequest withLinksMandate(String mandate) { } /** - * ID of the payment - * (https://developer.gocardless.com/api-reference/#core-endpoints-payments) against which - * the refund is being made. + * ID of the payment + * against which the refund is being made. */ public RefundCreateRequest withLinksPayment(String payment) { if (links == null) { @@ -156,51 +167,78 @@ 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 + * limit for this reference is dependent on the scheme.
+ *
+ * ACH *
    *
  • 10 characters
  • *
- * Autogiro + *
+ *
+ * Autogiro *
    *
  • 11 characters
  • *
- * Bacs + *
+ *
+ * Bacs *
    *
  • 10 characters
  • *
- * BECS + *
+ *
+ * BECS *
    *
  • 30 characters
  • *
- * BECS NZ + *
+ *
+ * BECS NZ *
    *
  • 12 characters
  • *
- * Betalingsservice + *
+ *
+ * Betalingsservice *
    *
  • 30 characters
  • *
- * Faster Payments + *
+ *
+ * Faster Payments *
    *
  • 18 characters
  • *
- * PAD + *
+ *
+ * PAD *
    *
  • scheme doesn't offer references
  • *
- * PayTo + *
+ *
+ * PayTo *
    *
  • 18 characters
  • *
- * SEPA + *
+ *
+ * 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 (https://gocardless.com/pricing). 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. + *

+ *

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

*/ public RefundCreateRequest withReference(String reference) { this.reference = reference; @@ -210,12 +248,15 @@ 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. * - * Must be supplied if `links[payment]` is present. - * - * It is possible to opt out of requiring total_amount_confirmation, please contact our - * support team (mailto:support@gocardless.com) for more information. + *

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

*/ public RefundCreateRequest withTotalAmountConfirmation(Integer totalAmountConfirmation) { this.totalAmountConfirmation = totalAmountConfirmation; @@ -270,10 +311,14 @@ public static class Links { private String payment; /** - * 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). + * ID of the mandate + * against which the refund is being made.
+ *
+ *

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

*/ public Links withMandate(String mandate) { this.mandate = mandate; @@ -281,9 +326,9 @@ public Links withMandate(String mandate) { } /** - * ID of the payment - * (https://developer.gocardless.com/api-reference/#core-endpoints-payments) against - * which the refund is being made. + * ID of the payment + * against which the refund is being made. */ public Links withPayment(String payment) { this.payment = payment; @@ -295,9 +340,9 @@ public Links withPayment(String payment) { /** * Request class for {@link RefundService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * refunds. + * Returns a cursor-paginated + * list of your refunds. */ public static final class RefundListRequest extends ListRequest { private CreatedAt createdAt; @@ -398,8 +443,11 @@ 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/ScenarioSimulatorService.java b/src/main/java/com/gocardless/services/ScenarioSimulatorService.java index c1f85f8e..ae011b1f 100644 --- a/src/main/java/com/gocardless/services/ScenarioSimulatorService.java +++ b/src/main/java/com/gocardless/services/ScenarioSimulatorService.java @@ -47,8 +47,8 @@ public ScenarioSimulatorRunRequest withLinks(Links links) { /** * ID of the resource to run the simulation against. Must be same type of resource as the - * simulator that is being run. eg. Payment ID for `payment_failed`, Mandate ID for - * `mandate_activated` etc + * simulator that is being run. eg. Payment ID for payment_failed, Mandate ID + * for mandate_activated etc */ public ScenarioSimulatorRunRequest withLinksResource(String resource) { if (links == null) { @@ -105,8 +105,8 @@ public static class Links { /** * ID of the resource to run the simulation against. Must be same type of resource as - * the simulator that is being run. eg. Payment ID for `payment_failed`, Mandate ID for - * `mandate_activated` etc + * the simulator that is being run. eg. Payment ID for payment_failed, + * Mandate ID for mandate_activated etc */ public Links withResource(String resource) { this.resource = resource; diff --git a/src/main/java/com/gocardless/services/SchemeIdentifierService.java b/src/main/java/com/gocardless/services/SchemeIdentifierService.java index 7fb66e3a..63a392b3 100644 --- a/src/main/java/com/gocardless/services/SchemeIdentifierService.java +++ b/src/main/java/com/gocardless/services/SchemeIdentifierService.java @@ -1,350 +1,911 @@ + + + + + + + + + + + + + package com.gocardless.services; import com.gocardless.http.*; import com.gocardless.resources.SchemeIdentifier; +import com.google.common.base.Joiner; import com.google.common.collect.ImmutableMap; import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; + +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; /** * Service class for working with schemeentifier resources. * - * 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. + * 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; /** - * Constructor. Users of this library should have no need to call this - an instance of this - * class can be obtained by calling - * {@link com.gocardless.GoCardlessClient#schemeIdentifiers() }. + * Constructor. Users of this library should have no need to call this - an instance + * of this class can be obtained by calling + {@link com.gocardless.GoCardlessClient#schemeIdentifiers() }. */ public SchemeIdentifierService(HttpClient httpClient) { this.httpClient = httpClient; } - /** - * Creates a new scheme identifier. The scheme identifier status will be `pending` while - * GoCardless is processing the request. Once the scheme identifier is ready to be used the - * status will be updated to `active`. At this point, GoCardless will emit a scheme identifier - * activated event via webhook to notify you of this change. In Bacs, it will take up to five - * working days for a scheme identifier to become active. On other schemes, including SEPA, this - * happens instantly. - * - * 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 | | :---------------- | - * :----------------- | :-------------------------------------------------- | | `bacs` | 18 - * characters | `/` `.` `&` `-` | | `sepa` | 70 characters | `/` `?` `:` `(` `)` `.` `,` `+` `&` - * `<` `>` `'` `"` | | `ach` | 16 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | | - * `faster_payments` | 18 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | - * - * The validation error that gets returned for an invalid name will contain a suggested name in - * the metadata that is guaranteed to pass name validations. - * - * 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 - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * scheme identifiers. - */ - public SchemeIdentifierListRequest> list() { - return new SchemeIdentifierListRequest<>(httpClient, - ListRequest.pagingExecutor()); - } - - public SchemeIdentifierListRequest> all() { - return new SchemeIdentifierListRequest<>(httpClient, - ListRequest.iteratingExecutor()); - } - - /** - * Retrieves the details of an existing scheme identifier. - */ - public SchemeIdentifierGetRequest get(String identity) { - return new SchemeIdentifierGetRequest(httpClient, identity); - } - - /** - * Request class for {@link SchemeIdentifierService#create }. - * - * Creates a new scheme identifier. The scheme identifier status will be `pending` while - * GoCardless is processing the request. Once the scheme identifier is ready to be used the - * status will be updated to `active`. At this point, GoCardless will emit a scheme identifier - * activated event via webhook to notify you of this change. In Bacs, it will take up to five - * working days for a scheme identifier to become active. On other schemes, including SEPA, this - * happens instantly. - * - * 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 | | :---------------- | - * :----------------- | :-------------------------------------------------- | | `bacs` | 18 - * characters | `/` `.` `&` `-` | | `sepa` | 70 characters | `/` `?` `:` `(` `)` `.` `,` `+` `&` - * `<` `>` `'` `"` | | `ach` | 16 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | | - * `faster_payments` | 18 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | - * - * The validation error that gets returned for an invalid name will contain a suggested name in - * the metadata that is guaranteed to pass name validations. - * - * 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 { - private Links links; - private String name; - private Scheme scheme; - - public SchemeIdentifierCreateRequest withLinks(Links links) { - this.links = links; - return this; - } - - /** - * required ID of the associated creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). - */ - public SchemeIdentifierCreateRequest withLinksCreditor(String creditor) { - if (links == null) { - links = new Links(); - } - links.withCreditor(creditor); - return this; - } - + + + /** - * The name which appears on customers' bank statements. This should usually be the - * merchant's trading name. + * Creates a new scheme identifier. The scheme identifier status will be pending while +* GoCardless is +* processing the request. Once the scheme identifier is ready to be used the status will be updated +* to active. +* At this point, GoCardless will emit a scheme identifier activated event via webhook to notify you +* of this change. +* In Bacs, it will take up to five working days for a scheme identifier to become active. On other +* schemes, including SEPA, +* this happens instantly. +* +*

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 | +* | :---------------- | :----------------- | :-------------------------------------------------- | +* | bacs | 18 characters | / . +* &
    +*
  • +*
| +* | sepa | 70 characters | / ? : +* ( ) . ,
    +*
  • +*
& <
+*
' " | +* | ach | 16 characters | / ? : +* ( ) . , '
    +*
  • +*
    +*
  • +*
| +* | faster_payments | 18 characters | / ? : +* ( ) . , '
    +*
  • +*
    +*
  • +*
| +* +* The validation error that gets returned for an invalid name will contain a suggested name +* in the metadata that is guaranteed to pass name validations. +* +* 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 withName(String name) { - this.name = name; - return this; + public SchemeIdentifierCreateRequest + + create() { + return new SchemeIdentifierCreateRequest + + (httpClient + + + + ); } + + + + /** - * The scheme which this scheme identifier applies to. + * Returns a cursor-paginated +* list of your scheme identifiers. */ - public SchemeIdentifierCreateRequest withScheme(Scheme scheme) { - this.scheme = scheme; - return this; - } - - public SchemeIdentifierCreateRequest withIdempotencyKey(String idempotencyKey) { - super.setIdempotencyKey(idempotencyKey); - return this; - } - - @Override - protected GetRequest handleConflict(HttpClient httpClient, String id) { - SchemeIdentifierGetRequest request = new SchemeIdentifierGetRequest(httpClient, id); - for (Map.Entry header : this.getCustomHeaders().entrySet()) { - request = request.withHeader(header.getKey(), header.getValue()); - } - return request; - } - - private SchemeIdentifierCreateRequest(HttpClient httpClient) { - super(httpClient); - } - - public SchemeIdentifierCreateRequest withHeader(String headerName, String headerValue) { - this.addHeader(headerName, headerValue); - return this; - } - - @Override - protected String getPathTemplate() { - return "scheme_identifiers"; - } - - @Override - protected String getEnvelope() { - return "scheme_identifiers"; - } - - @Override - protected Class getResponseClass() { - return SchemeIdentifier.class; - } - - @Override - protected boolean hasBody() { - return true; - } - - public enum Scheme { - @SerializedName("ach") - ACH, @SerializedName("autogiro") - AUTOGIRO, @SerializedName("bacs") - BACS, @SerializedName("becs") - BECS, @SerializedName("becs_nz") - BECS_NZ, @SerializedName("betalingsservice") - BETALINGSSERVICE, @SerializedName("faster_payments") - FASTER_PAYMENTS, @SerializedName("pad") - PAD, @SerializedName("pay_to") - PAY_TO, @SerializedName("sepa") - SEPA, @SerializedName("sepa_credit_transfer") - SEPA_CREDIT_TRANSFER, @SerializedName("sepa_instant_credit_transfer") - SEPA_INSTANT_CREDIT_TRANSFER, @SerializedName("unknown") - UNKNOWN; - - @Override - public String toString() { - return name().toLowerCase(); - } + public SchemeIdentifierListRequest + + > + + list() { + return new SchemeIdentifierListRequest + + <> + + (httpClient + + , ListRequest.pagingExecutor() + + + + ); } - public static class Links { - private String creditor; + + public SchemeIdentifierListRequest> all() { + return new SchemeIdentifierListRequest<>(httpClient, ListRequest.iteratingExecutor() - /** - * required ID of the associated creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). - */ - public Links withCreditor(String creditor) { - this.creditor = creditor; - return this; + + ); } - } - } - - /** - * Request class for {@link SchemeIdentifierService#list }. - * - * 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 { - private String creditor; - + + + + /** - * Cursor pointing to the start of the desired set. + * Retrieves the details of an existing scheme identifier. */ - public SchemeIdentifierListRequest withAfter(String after) { - setAfter(after); - return this; + public SchemeIdentifierGetRequest + + get(String identity) { + return new SchemeIdentifierGetRequest + + (httpClient + + + + , identity + + ); } - /** - * Cursor pointing to the end of the desired set. - */ - public SchemeIdentifierListRequest withBefore(String before) { - setBefore(before); - return this; - } - - /** - * Unique identifier, beginning with "CR". - */ - public SchemeIdentifierListRequest withCreditor(String creditor) { - this.creditor = creditor; - return this; - } + + + + + /** - * Number of records to return. + * Request class for {@link SchemeIdentifierService#create }. + * + * Creates a new scheme identifier. The scheme identifier status will be pending while +* GoCardless is +* processing the request. Once the scheme identifier is ready to be used the status will be updated +* to active. +* At this point, GoCardless will emit a scheme identifier activated event via webhook to notify you +* of this change. +* In Bacs, it will take up to five working days for a scheme identifier to become active. On other +* schemes, including SEPA, +* this happens instantly. +* +*

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 | +* | :---------------- | :----------------- | :-------------------------------------------------- | +* | bacs | 18 characters | / . +* &
    +*
  • +*
| +* | sepa | 70 characters | / ? : +* ( ) . ,
    +*
  • +*
& <
+*
' " | +* | ach | 16 characters | / ? : +* ( ) . , '
    +*
  • +*
    +*
  • +*
| +* | faster_payments | 18 characters | / ? : +* ( ) . , '
    +*
  • +*
    +*
  • +*
| +* +* The validation error that gets returned for an invalid name will contain a suggested name +* in the metadata that is guaranteed to pass name validations. +* +* 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 SchemeIdentifierListRequest withLimit(Integer limit) { - setLimit(limit); - return this; - } - - private SchemeIdentifierListRequest(HttpClient httpClient, - ListRequestExecutor executor) { - super(httpClient, executor); - } + public static final class SchemeIdentifierCreateRequest + + extends + + IdempotentPostRequest + { + + + + + + + private + + Links + + links; + + + + + private + + String + + name; + + + + + private + + Scheme + + scheme; + + + + + + + + public + SchemeIdentifierCreateRequest + + withLinks( + + Links + + links) { + + this.links = links; + + + return this; + } + + + + + + + /** + * required ID of the associated creditor. + */ + + public + SchemeIdentifierCreateRequest + + withLinksCreditor( + + + String + + creditor + ) { + if (links == null) { + links = new + + Links + +(); + } + + links.withCreditor(creditor); + return this; + } + + + + + + + + /** + * The name which appears on customers' bank statements. This should usually be the merchant's +* trading name. + */ + + public + SchemeIdentifierCreateRequest + + withName( + + String + + name) { + + this.name = name; + + + return this; + } + + + + + + + /** + * The scheme which this scheme identifier applies to. + */ + + public + SchemeIdentifierCreateRequest + + withScheme( + + Scheme + + scheme) { + + this.scheme = scheme; + + + return this; + } + + + + + + + + + + + + public + SchemeIdentifierCreateRequest + withIdempotencyKey(String idempotencyKey) { + super.setIdempotencyKey(idempotencyKey); + return this; + } + + @Override + protected GetRequest handleConflict(HttpClient httpClient, String id) { + SchemeIdentifierGetRequest request = new SchemeIdentifierGetRequest(httpClient, id); + + for (Map.Entry header : this.getCustomHeaders().entrySet()) { + request = request.withHeader(header.getKey(), header.getValue()); + } + + return request; + } + + + + + + private SchemeIdentifierCreateRequest(HttpClient httpClient + + + ) { + + + super(httpClient); + + + + } + + public + SchemeIdentifierCreateRequest + withHeader(String headerName, String headerValue) { + this.addHeader(headerName, headerValue); + return this; + } + + + + + + @Override + protected String getPathTemplate() { + return "scheme_identifiers"; + } + + @Override + protected String getEnvelope() { + return "scheme_identifiers"; + } + + + @Override + protected Class getResponseClass() { + return SchemeIdentifier.class; + } + + + + + + @Override + protected boolean hasBody() { + return true; + } + + + + + + + + + + + + + + + + + + + public enum Scheme { + + @SerializedName("ach") ACH + + ,@SerializedName("autogiro") AUTOGIRO + + ,@SerializedName("bacs") BACS + + ,@SerializedName("becs") BECS + + ,@SerializedName("becs_nz") BECS_NZ + + ,@SerializedName("betalingsservice") BETALINGSSERVICE + + ,@SerializedName("faster_payments") FASTER_PAYMENTS + + ,@SerializedName("pad") PAD + + ,@SerializedName("pay_to") PAY_TO + + ,@SerializedName("sepa") SEPA + + ,@SerializedName("sepa_credit_transfer") SEPA_CREDIT_TRANSFER + + ,@SerializedName("sepa_instant_credit_transfer") SEPA_INSTANT_CREDIT_TRANSFER + + , @SerializedName("unknown") UNKNOWN; - public SchemeIdentifierListRequest withHeader(String headerName, String headerValue) { - this.addHeader(headerName, headerValue); - return this; + @Override + public String toString() { + + return name().toLowerCase(); + } + } - @Override - protected Map getQueryParams() { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.putAll(super.getQueryParams()); - if (creditor != null) { - params.put("creditor", creditor); + + + + + + + + + + + + + + + + + + + public static class Links { + + + private + + String + + creditor; + + + + + + /** + * required ID of the associated creditor. + */ + + public Links withCreditor( + + String + + creditor) { + this.creditor = creditor; + return this; } - return params.build(); - } + - @Override - protected String getPathTemplate() { - return "scheme_identifiers"; - } + - @Override - protected String getEnvelope() { - return "scheme_identifiers"; - } + + + + + + - @Override - protected TypeToken> getTypeToken() { - return new TypeToken>() {}; - } } - /** - * Request class for {@link SchemeIdentifierService#get }. - * - * Retrieves the details of an existing scheme identifier. - */ - public static final class SchemeIdentifierGetRequest extends GetRequest { - @PathParam - private final String identity; + - private SchemeIdentifierGetRequest(HttpClient httpClient, String identity) { - super(httpClient); - this.identity = identity; - } + + + - public SchemeIdentifierGetRequest withHeader(String headerName, String headerValue) { - this.addHeader(headerName, headerValue); - return this; - } + + + - @Override - protected Map getPathParams() { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("identity", identity); - return params.build(); - } - - @Override - protected String getPathTemplate() { - return "scheme_identifiers/:identity"; + + + } - - @Override - protected String getEnvelope() { - return "scheme_identifiers"; + + + + /** + * Request class for {@link SchemeIdentifierService#list }. + * + * Returns a cursor-paginated +* list of your scheme identifiers. + */ + public static final class SchemeIdentifierListRequest + + + + extends + + ListRequest + { + + + + + + + + + + + + + private + + String + + creditor; + + + + + + + + + + + /** + * Cursor pointing to the start of the desired set. + */ + + public + SchemeIdentifierListRequest + + withAfter( + + String + + after) { + + setAfter(after); + + + return this; + } + + + + + + + /** + * Cursor pointing to the end of the desired set. + */ + + public + SchemeIdentifierListRequest + + withBefore( + + String + + before) { + + setBefore(before); + + + return this; + } + + + + + + + /** + * Unique identifier, beginning with "CR". + */ + + public + SchemeIdentifierListRequest + + withCreditor( + + String + + creditor) { + + this.creditor = creditor; + + + return this; + } + + + + + + + /** + * Number of records to return. + */ + + public + SchemeIdentifierListRequest + + withLimit( + + Integer + + limit) { + + setLimit(limit); + + + return this; + } + + + + + + + + private SchemeIdentifierListRequest(HttpClient httpClient + + , ListRequestExecutor executor + + + ) { + + + super(httpClient, executor); + + + + } + + public + SchemeIdentifierListRequest + withHeader(String headerName, String headerValue) { + this.addHeader(headerName, headerValue); + return this; + } + + + + + + @Override + protected Map getQueryParams() { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.putAll(super.getQueryParams()); + + + + + + + + + + + if (creditor != null) { + + params.put("creditor", creditor); + + } + + + + + + + return params.build(); + } + + + + @Override + protected String getPathTemplate() { + return "scheme_identifiers"; + } + + @Override + protected String getEnvelope() { + return "scheme_identifiers"; + } + + + @Override + protected TypeToken> getTypeToken() { + return new TypeToken>() {}; + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } - - @Override - protected Class getResponseClass() { - return SchemeIdentifier.class; + + + + /** + * Request class for {@link SchemeIdentifierService#get }. + * + * Retrieves the details of an existing scheme identifier. + */ + public static final class SchemeIdentifierGetRequest + + extends + + GetRequest + { + + @PathParam + private final String identity; + + + + + private SchemeIdentifierGetRequest(HttpClient httpClient + + + , String identity + + ) { + + + super(httpClient); + + + + + this.identity = identity; + + } + + public + SchemeIdentifierGetRequest + withHeader(String headerName, String headerValue) { + this.addHeader(headerName, headerValue); + return this; + } + + + @Override + protected Map getPathParams() { + ImmutableMap.Builder params = ImmutableMap.builder(); + + + params.put("identity", identity); + + + return params.build(); + } + + + + + + + @Override + protected String getPathTemplate() { + return "scheme_identifiers/:identity"; + } + + @Override + protected String getEnvelope() { + return "scheme_identifiers"; + } + + + @Override + protected Class getResponseClass() { + return SchemeIdentifier.class; + } + + + + + + + + + } - } + } diff --git a/src/main/java/com/gocardless/services/SubscriptionService.java b/src/main/java/com/gocardless/services/SubscriptionService.java index 73019bab..323335eb 100644 --- a/src/main/java/com/gocardless/services/SubscriptionService.java +++ b/src/main/java/com/gocardless/services/SubscriptionService.java @@ -14,40 +14,48 @@ /** * Service class for working with subscription resources. * - * Subscriptions create payments - * (https://developer.gocardless.com/api-reference/#core-endpoints-payments) according to a - * schedule. + * Subscriptions create + * payments + * according to a schedule. * - * Recurrence Rules + *

Recurrence Rules

The following rules apply when specifying recurrence: * - * The following rules apply when specifying recurrence: - * - * - 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 | | :---------------- | - * :--------------------------------------------- | :----------------------------------------- | | - * yearly | optional (required if `day_of_month` provided) | optional (invalid if `month` not - * provided) | | monthly | invalid | optional | | weekly | invalid | invalid | + *
    + *
  • If day_of_month and start_date are not provided + * start_date will be the + * mandate'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 | | + * :---------------- | :--------------------------------------------- | + * :----------------------------------------- | | 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 | - * - * Rolling dates + * | 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 | * - * When a charge date falls on a non-business day, one of two things will happen: + *

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. + *
    + *
  • 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.
  • + *
*/ public class SubscriptionService { private final HttpClient httpClient; @@ -68,10 +76,10 @@ public SubscriptionCreateRequest create() { } /** - * 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. + * Returns a cursor-paginated + * 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, @@ -95,16 +103,21 @@ 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 - * created by an app other than the app you are authenticated as + *
    + *
  • 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); @@ -114,30 +127,36 @@ public SubscriptionUpdateRequest update(String identity) { * Pause a subscription object. No payments will be created until it is resumed. * * This can only be used when a subscription is collecting a fixed number of payments (created - * using `count`), when they continue forever (created without `count` or `end_date`) or the - * subscription is already paused for a number of cycles. + * 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 - * (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 omitted the subscription is paused until the resume + * endpoint 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 - * set to a new value. When paused for a number of cycles, `upcoming_payments` will still - * contain the upcoming charge dates. + * 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 set to a new value. When paused for a number of cycles, + * upcoming_payments will still contain the upcoming charge dates. * * 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` - * cannot be satisfied. + *
    + *
  • 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 cannot be satisfied.
  • + *
*/ public SubscriptionPauseRequest pause(String identity) { return new SubscriptionPauseRequest(httpClient, identity); @@ -145,15 +164,19 @@ public SubscriptionPauseRequest pause(String identity) { /** * Resume a subscription object. Payments will start to be created again based on the - * subscriptions recurrence rules. The `charge_date` on the next payment will be the same as the - * subscriptions `earliest_charge_date_after_resume` + * subscriptions recurrence rules. The charge_date on the next payment will be the + * same as the subscriptions earliest_charge_date_after_resume * * 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. + *
    + *
  • 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.
  • + *
*/ public SubscriptionResumeRequest resume(String identity) { return new SubscriptionResumeRequest(httpClient, identity); @@ -220,8 +243,8 @@ public SubscriptionCreateRequest withCount(Integer count) { } /** - * 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. + * ISO 4217 currency code. + * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public SubscriptionCreateRequest withCurrency(String currency) { this.currency = currency; @@ -229,8 +252,11 @@ public SubscriptionCreateRequest withCurrency(String currency) { } /** - * As per RFC 2445. The day of the month to charge customers on. `1`-`28` or `-1` to - * indicate the last day of the month. + * As per RFC 2445. The day of the month to charge customers on. 1 + *
    + *
  • + *
+ * 28 or -1 to indicate the last day of the month. */ public SubscriptionCreateRequest withDayOfMonth(Integer dayOfMonth) { this.dayOfMonth = dayOfMonth; @@ -238,13 +264,16 @@ 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.
+ *
* - * 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. + *

+ * 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; @@ -252,8 +281,9 @@ public SubscriptionCreateRequest withEndDate(String endDate) { } /** - * Number of `interval_units` between customer charge dates. Must be greater than or equal - * to `1`. Must result in at least one charge date per year. Defaults to `1`. + * Number of interval_units between customer charge dates. Must be greater than + * or equal to 1. Must result in at least one charge date per year. Defaults to + * 1. */ public SubscriptionCreateRequest withInterval(Integer interval) { this.interval = interval; @@ -261,7 +291,8 @@ public SubscriptionCreateRequest withInterval(Integer interval) { } /** - * The unit of time between customer charge dates. One of `weekly`, `monthly` or `yearly`. + * The unit of time between customer charge dates. One of weekly, + * monthly or yearly. */ public SubscriptionCreateRequest withIntervalUnit(IntervalUnit intervalUnit) { this.intervalUnit = intervalUnit; @@ -274,9 +305,9 @@ public SubscriptionCreateRequest withLinks(Links links) { } /** - * ID of the associated mandate - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) which the - * subscription will create payments against. + * ID of the associated mandate + * which the subscription will create payments against. */ public SubscriptionCreateRequest withLinksMandate(String mandate) { if (links == null) { @@ -309,7 +340,7 @@ 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`. + * interval_unit is yearly. */ public SubscriptionCreateRequest withMonth(Month month) { this.month = month; @@ -327,13 +358,15 @@ 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 - * (https://developer.gocardless.com/api-reference/#payments-create-a-payment) for more - * details. + * and will appear on your customer's bank statement. See the documentation for the create + * payment endpoint for more details.
+ *
* - * Restricted: You need your own Service User Number to specify a payment reference for Bacs - * payments. + *

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

*/ public SubscriptionCreateRequest withPaymentReference(String paymentReference) { this.paymentReference = paymentReference; @@ -341,10 +374,13 @@ public SubscriptionCreateRequest withPaymentReference(String paymentReference) { } /** - * 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). + * On failure, automatically retry payments using + * intelligent retries. + * Default is false. + *

+ * Important: To be able to use intelligent retries, Success+ needs to be + * enabled in GoCardless dashboard. + *

*/ public SubscriptionCreateRequest withRetryIfPossible(Boolean retryIfPossible) { this.retryIfPossible = retryIfPossible; @@ -352,11 +388,12 @@ public SubscriptionCreateRequest withRetryIfPossible(Boolean retryIfPossible) { } /** - * 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` + * The date on which the first payment should be charged. Must be on or after the mandate'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; @@ -445,9 +482,9 @@ public static class Links { private String mandate; /** - * ID of the associated mandate - * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) which the - * subscription will create payments against. + * ID of the associated mandate + * which the subscription will create payments against. */ public Links withMandate(String mandate) { this.mandate = mandate; @@ -459,10 +496,10 @@ public Links withMandate(String mandate) { /** * Request class for {@link SubscriptionService#list }. * - * 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. + * Returns a cursor-paginated + * 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; @@ -563,9 +600,14 @@ 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) { @@ -576,9 +618,14 @@ 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) { @@ -739,16 +786,21 @@ 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 - * created by an app other than the app you are authenticated as + *
    + *
  • 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 @@ -810,13 +862,15 @@ 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 - * (https://developer.gocardless.com/api-reference/#payments-create-a-payment) for more - * details. + * and will appear on your customer's bank statement. See the documentation for the create + * payment endpoint for more details.
+ *
* - * Restricted: You need your own Service User Number to specify a payment reference for Bacs - * payments. + *

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

*/ public SubscriptionUpdateRequest withPaymentReference(String paymentReference) { this.paymentReference = paymentReference; @@ -824,10 +878,13 @@ public SubscriptionUpdateRequest withPaymentReference(String paymentReference) { } /** - * 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). + * On failure, automatically retry payments using + * intelligent retries. + * Default is false. + *

+ * Important: To be able to use intelligent retries, Success+ needs to be + * enabled in GoCardless dashboard. + *

*/ public SubscriptionUpdateRequest withRetryIfPossible(Boolean retryIfPossible) { this.retryIfPossible = retryIfPossible; @@ -878,30 +935,36 @@ protected boolean hasBody() { * Pause a subscription object. No payments will be created until it is resumed. * * This can only be used when a subscription is collecting a fixed number of payments (created - * using `count`), when they continue forever (created without `count` or `end_date`) or the - * subscription is already paused for a number of cycles. + * 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 - * (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 omitted the subscription is paused until the resume + * endpoint 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 - * set to a new value. When paused for a number of cycles, `upcoming_payments` will still - * contain the upcoming charge dates. + * 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 set to a new value. When paused for a number of cycles, + * upcoming_payments will still contain the upcoming charge dates. * * 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` - * cannot be satisfied. + *
    + *
  • 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 cannot be satisfied.
  • + *
*/ public static final class SubscriptionPauseRequest extends PostRequest { @PathParam @@ -931,14 +994,15 @@ 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 - * (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). + * 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. For NZD subscriptions with interval_unit: weekly + * the minimum value is 2 because of the mandatory + * minimum waiting period. */ public SubscriptionPauseRequest withPauseCycles(Integer pauseCycles) { this.pauseCycles = pauseCycles; @@ -992,15 +1056,19 @@ protected String getRequestEnvelope() { * Request class for {@link SubscriptionService#resume }. * * Resume a subscription object. Payments will start to be created again based on the - * subscriptions recurrence rules. The `charge_date` on the next payment will be the same as the - * subscriptions `earliest_charge_date_after_resume` + * subscriptions recurrence rules. The charge_date on the next payment will be the + * same as the subscriptions earliest_charge_date_after_resume * * 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. + *
    + *
  • 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.
  • + *
*/ 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 45b5d4e2..2b11f72e 100644 --- a/src/main/java/com/gocardless/services/TaxRateService.java +++ b/src/main/java/com/gocardless/services/TaxRateService.java @@ -12,8 +12,9 @@ * * Tax rates from tax authority. * - * We also maintain a static list of the tax rates for each jurisdiction - * (https://developer.gocardless.com/api-reference/#appendix-tax-rates). + * We also maintain a + * static list of the + * tax rates for each jurisdiction. */ public class TaxRateService { private final HttpClient httpClient; @@ -27,9 +28,9 @@ public TaxRateService(HttpClient httpClient) { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of all tax - * rates. + * Returns a cursor-paginated + * list of all tax rates. */ public TaxRateListRequest> list() { return new TaxRateListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -49,9 +50,9 @@ public TaxRateGetRequest get(String identity) { /** * Request class for {@link TaxRateService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of all tax - * rates. + * Returns a cursor-paginated + * 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 baddc400..280bc7c7 100644 --- a/src/main/java/com/gocardless/services/VerificationDetailService.java +++ b/src/main/java/com/gocardless/services/VerificationDetailService.java @@ -13,9 +13,12 @@ * * 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 if you wish to enable this feature on your + * account. + *

*/ public class VerificationDetailService { private final HttpClient httpClient; @@ -140,8 +143,8 @@ public VerificationDetailCreateRequest withLinks(Links links) { } /** - * ID of the associated creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). + * ID of the associated creditor. */ public VerificationDetailCreateRequest withLinksCreditor(String creditor) { if (links == null) { @@ -214,8 +217,9 @@ 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. */ public Directors withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -267,8 +271,8 @@ public static class Links { private String creditor; /** - * ID of the associated creditor - * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). + * ID of the associated creditor. */ 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 50e39f96..cad9bb68 100644 --- a/src/main/java/com/gocardless/services/WebhookService.java +++ b/src/main/java/com/gocardless/services/WebhookService.java @@ -24,9 +24,9 @@ public WebhookService(HttpClient httpClient) { } /** - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * webhooks. + * Returns a cursor-paginated + * list of your webhooks. */ public WebhookListRequest> list() { return new WebhookListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -53,9 +53,9 @@ public WebhookRetryRequest retry(String identity) { /** * Request class for {@link WebhookService#list }. * - * Returns a cursor-paginated - * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your - * webhooks. + * Returns a cursor-paginated + * list of your webhooks. */ public static final class WebhookListRequest extends ListRequest { private CreatedAt createdAt;