From a10b1b4486eaea6ffa459f713677b945d9b77e74 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 09:35:11 +0000 Subject: [PATCH] Changes generated by 7092e02163218c5332054e0220c34a27403c6eb1 This commit was automatically created from gocardless/gocardless-pro-java-template@7092e02163218c5332054e0220c34a27403c6eb1 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-java-template/actions/runs/15820612779 --- .../services/NegativeBalanceLimitService.java | 115 ------------------ 1 file changed, 115 deletions(-) diff --git a/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java b/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java index 1106b663..cfbb5967 100644 --- a/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java +++ b/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java @@ -41,15 +41,6 @@ public NegativeBalanceLimitListRequest> all() { ListRequest.iteratingExecutor()); } - /** - * Creates a new negative balance limit, which replaces the existing limit (if present) for that - * currency and creditor combination. - * - */ - public NegativeBalanceLimitCreateRequest create() { - return new NegativeBalanceLimitCreateRequest(httpClient); - } - /** * Request class for {@link NegativeBalanceLimitService#list }. * @@ -158,110 +149,4 @@ public String toString() { } } } - - /** - * Request class for {@link NegativeBalanceLimitService#create }. - * - * Creates a new negative balance limit, which replaces the existing limit (if present) for that - * currency and creditor combination. - * - */ - public static final class NegativeBalanceLimitCreateRequest - extends PostRequest { - private Integer balanceLimit; - private Currency currency; - private Links links; - - /** - * The limit amount in pence (e.g. 10000 for a -100 GBP limit). - */ - public NegativeBalanceLimitCreateRequest withBalanceLimit(Integer balanceLimit) { - this.balanceLimit = balanceLimit; - return this; - } - - /** - * [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently - * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. - */ - public NegativeBalanceLimitCreateRequest withCurrency(Currency currency) { - this.currency = currency; - return this; - } - - public NegativeBalanceLimitCreateRequest withLinks(Links links) { - this.links = links; - return this; - } - - /** - * ID of the [creditor](#core-endpoints-creditors) this limit relates to - */ - public NegativeBalanceLimitCreateRequest withLinksCreditor(String creditor) { - if (links == null) { - links = new Links(); - } - links.withCreditor(creditor); - return this; - } - - private NegativeBalanceLimitCreateRequest(HttpClient httpClient) { - super(httpClient); - } - - public NegativeBalanceLimitCreateRequest withHeader(String headerName, String headerValue) { - this.addHeader(headerName, headerValue); - return this; - } - - @Override - protected String getPathTemplate() { - return "negative_balance_limits"; - } - - @Override - protected String getEnvelope() { - return "negative_balance_limits"; - } - - @Override - protected Class getResponseClass() { - return NegativeBalanceLimit.class; - } - - @Override - protected boolean hasBody() { - return true; - } - - public enum Currency { - @SerializedName("AUD") - AUD, @SerializedName("CAD") - CAD, @SerializedName("DKK") - DKK, @SerializedName("EUR") - EUR, @SerializedName("GBP") - GBP, @SerializedName("NZD") - NZD, @SerializedName("SEK") - SEK, @SerializedName("USD") - USD, @SerializedName("unknown") - UNKNOWN; - - @Override - public String toString() { - return name(); - } - } - - public static class Links { - private String creditor; - - /** - * ID of the [creditor](#core-endpoints-creditors) this limit relates to - */ - public Links withCreditor(String creditor) { - this.creditor = creditor; - return this; - } - } - } }