From 12819c3a715d68ac35bc1864b7fae02e3724d662 Mon Sep 17 00:00:00 2001 From: bunq Date: Thu, 11 Jul 2024 15:24:43 +0000 Subject: [PATCH] Regenerated code based on the latest tag --- .../generated/endpoint/PaymentDelayed.java | 108 --------- .../endpoint/PaymentDelayedIncoming.java | 214 ------------------ 2 files changed, 322 deletions(-) delete mode 100644 src/main/java/com/bunq/sdk/model/generated/endpoint/PaymentDelayed.java delete mode 100644 src/main/java/com/bunq/sdk/model/generated/endpoint/PaymentDelayedIncoming.java diff --git a/src/main/java/com/bunq/sdk/model/generated/endpoint/PaymentDelayed.java b/src/main/java/com/bunq/sdk/model/generated/endpoint/PaymentDelayed.java deleted file mode 100644 index 999e6568..00000000 --- a/src/main/java/com/bunq/sdk/model/generated/endpoint/PaymentDelayed.java +++ /dev/null @@ -1,108 +0,0 @@ -package com.bunq.sdk.model.generated.endpoint; - -import com.bunq.sdk.context.ApiContext; -import com.bunq.sdk.exception.BunqException; -import com.bunq.sdk.http.ApiClient; -import com.bunq.sdk.http.BunqResponse; -import com.bunq.sdk.http.BunqResponseRaw; -import com.bunq.sdk.model.core.AnchorObjectInterface; -import com.bunq.sdk.model.core.BunqModel; -import com.bunq.sdk.model.core.MonetaryAccountReference; -import com.google.gson.annotations.Expose; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.lang.model.type.NullType; - -/** - * Payments that are not processed yet. - */ -public class PaymentDelayed extends BunqModel implements AnchorObjectInterface { - - /** - * Error constants. - */ - protected static final String ERROR_NULL_FIELDS = "All fields of an extended model or object are null."; - - /** - * Endpoint constants. - */ - protected static final String ENDPOINT_URL_READ = "user/%s/monetary-account/%s/payment-delayed/%s"; - - /** - * Object type. - */ - protected static final String OBJECT_TYPE_GET = "PaymentDelayed"; - - /** - */ - @Expose - @SerializedName("PaymentDelayedIncoming") - private PaymentDelayedIncoming paymentDelayedIncoming; - - /** - */ - public static BunqResponse get(Integer paymentDelayedId, Integer monetaryAccountId, Map params, Map customHeaders) { - ApiClient apiClient = new ApiClient(getApiContext()); - BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, determineUserId(), determineMonetaryAccountId(monetaryAccountId), paymentDelayedId), params, customHeaders); - - return fromJson(PaymentDelayed.class, responseRaw); - } - - public static BunqResponse get() { - return get(null, null, null, null); - } - - public static BunqResponse get(Integer paymentDelayedId) { - return get(paymentDelayedId, null, null, null); - } - - public static BunqResponse get(Integer paymentDelayedId, Integer monetaryAccountId) { - return get(paymentDelayedId, monetaryAccountId, null, null); - } - - public static BunqResponse get(Integer paymentDelayedId, Integer monetaryAccountId, Map params) { - return get(paymentDelayedId, monetaryAccountId, params, null); - } - - /** - */ - public PaymentDelayedIncoming getPaymentDelayedIncoming() { - return this.paymentDelayedIncoming; - } - - public void setPaymentDelayedIncoming(PaymentDelayedIncoming paymentDelayedIncoming) { - this.paymentDelayedIncoming = paymentDelayedIncoming; - } - - /** - */ - public BunqModel getReferencedObject() { - if (this.paymentDelayedIncoming != null) { - return this.paymentDelayedIncoming; - } - - throw new BunqException(ERROR_NULL_FIELDS); - } - - /** - */ - public boolean isAllFieldNull() { - if (this.paymentDelayedIncoming != null) { - return false; - } - - return true; - } - - /** - */ - public static PaymentDelayed fromJsonReader(JsonReader reader) { - return fromJsonReader(PaymentDelayed.class, reader); - } - -} diff --git a/src/main/java/com/bunq/sdk/model/generated/endpoint/PaymentDelayedIncoming.java b/src/main/java/com/bunq/sdk/model/generated/endpoint/PaymentDelayedIncoming.java deleted file mode 100644 index 0fae84f9..00000000 --- a/src/main/java/com/bunq/sdk/model/generated/endpoint/PaymentDelayedIncoming.java +++ /dev/null @@ -1,214 +0,0 @@ -package com.bunq.sdk.model.generated.endpoint; - -import com.bunq.sdk.model.core.BunqModel; -import com.bunq.sdk.model.core.MonetaryAccountReference; -import com.bunq.sdk.model.generated.object.Amount; -import com.bunq.sdk.model.generated.object.LabelMonetaryAccount; -import com.bunq.sdk.model.generated.object.PaymentArrivalExpected; -import com.google.gson.annotations.Expose; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Payments that are not processed yet. - */ -public class PaymentDelayedIncoming extends BunqModel { - - /** - * The status of the delayed payment. - */ - @Expose - @SerializedName("status") - private String status; - - /** - * The id of the monetary account. - */ - @Expose - @SerializedName("monetary_account_id") - private Integer monetaryAccountId; - - /** - * The amount of the payment. - */ - @Expose - @SerializedName("amount") - private Amount amount; - - /** - * The LabelMonetaryAccount containing the public information of 'this' (party) side of the - * payment. - */ - @Expose - @SerializedName("alias") - private LabelMonetaryAccount alias; - - /** - * The LabelMonetaryAccount containing the public information of the other (counterparty) side - * of the payment. - */ - @Expose - @SerializedName("counterparty_alias") - private LabelMonetaryAccount counterpartyAlias; - - /** - * The description of the payment. - */ - @Expose - @SerializedName("description") - private String description; - - /** - * Information about the expected arrival of the payment. - */ - @Expose - @SerializedName("payment_arrival_expected") - private PaymentArrivalExpected paymentArrivalExpected; - - /** - * The resulting payment, only when it’s successful. - */ - @Expose - @SerializedName("payment_result") - private Payment paymentResult; - - /** - * The status of the delayed payment. - */ - public String getStatus() { - return this.status; - } - - public void setStatus(String status) { - this.status = status; - } - - /** - * The id of the monetary account. - */ - public Integer getMonetaryAccountId() { - return this.monetaryAccountId; - } - - public void setMonetaryAccountId(Integer monetaryAccountId) { - this.monetaryAccountId = monetaryAccountId; - } - - /** - * The amount of the payment. - */ - public Amount getAmount() { - return this.amount; - } - - public void setAmount(Amount amount) { - this.amount = amount; - } - - /** - * The LabelMonetaryAccount containing the public information of 'this' (party) side of the - * payment. - */ - public LabelMonetaryAccount getAlias() { - return this.alias; - } - - public void setAlias(LabelMonetaryAccount alias) { - this.alias = alias; - } - - /** - * The LabelMonetaryAccount containing the public information of the other (counterparty) side - * of the payment. - */ - public LabelMonetaryAccount getCounterpartyAlias() { - return this.counterpartyAlias; - } - - public void setCounterpartyAlias(LabelMonetaryAccount counterpartyAlias) { - this.counterpartyAlias = counterpartyAlias; - } - - /** - * The description of the payment. - */ - public String getDescription() { - return this.description; - } - - public void setDescription(String description) { - this.description = description; - } - - /** - * Information about the expected arrival of the payment. - */ - public PaymentArrivalExpected getPaymentArrivalExpected() { - return this.paymentArrivalExpected; - } - - public void setPaymentArrivalExpected(PaymentArrivalExpected paymentArrivalExpected) { - this.paymentArrivalExpected = paymentArrivalExpected; - } - - /** - * The resulting payment, only when it’s successful. - */ - public Payment getPaymentResult() { - return this.paymentResult; - } - - public void setPaymentResult(Payment paymentResult) { - this.paymentResult = paymentResult; - } - - /** - */ - public boolean isAllFieldNull() { - if (this.status != null) { - return false; - } - - if (this.monetaryAccountId != null) { - return false; - } - - if (this.amount != null) { - return false; - } - - if (this.alias != null) { - return false; - } - - if (this.counterpartyAlias != null) { - return false; - } - - if (this.description != null) { - return false; - } - - if (this.paymentArrivalExpected != null) { - return false; - } - - if (this.paymentResult != null) { - return false; - } - - return true; - } - - /** - */ - public static PaymentDelayedIncoming fromJsonReader(JsonReader reader) { - return fromJsonReader(PaymentDelayedIncoming.class, reader); - } - -}