From 097c1978c58593fcee48ae7221a5e40d3c0a6bd1 Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Tue, 16 Apr 2024 14:45:46 +0000 Subject: [PATCH] false[adyen-sdk-automation] automated change --- .../adyen/model/checkout/CashAppDetails.java | 459 ++++++++++++++++++ .../model/checkout/CheckoutPaymentMethod.java | 60 ++- .../CheckoutSessionInstallmentOption.java | 16 +- .../model/checkout/InstallmentOption.java | 16 +- .../adyen/model/checkout/Installments.java | 70 ++- .../HKLocalAccountIdentification.java | 74 +-- .../ScheduleTerminalActionsRequest.java | 6 +- .../ScheduleTerminalActionsResponse.java | 6 +- .../management/TerminalOrderRequest.java | 6 +- .../com/adyen/model/payment/Installments.java | 70 ++- 10 files changed, 675 insertions(+), 108 deletions(-) create mode 100644 src/main/java/com/adyen/model/checkout/CashAppDetails.java diff --git a/src/main/java/com/adyen/model/checkout/CashAppDetails.java b/src/main/java/com/adyen/model/checkout/CashAppDetails.java new file mode 100644 index 000000000..95514a4d9 --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/CashAppDetails.java @@ -0,0 +1,459 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 71 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.adyen.model.checkout; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * CashAppDetails + */ +@JsonPropertyOrder({ + CashAppDetails.JSON_PROPERTY_CASHTAG, + CashAppDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID, + CashAppDetails.JSON_PROPERTY_CUSTOMER_ID, + CashAppDetails.JSON_PROPERTY_GRANT_ID, + CashAppDetails.JSON_PROPERTY_ON_FILE_GRANT_ID, + CashAppDetails.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE, + CashAppDetails.JSON_PROPERTY_REQUEST_ID, + CashAppDetails.JSON_PROPERTY_STORED_PAYMENT_METHOD_ID, + CashAppDetails.JSON_PROPERTY_TYPE +}) + +public class CashAppDetails { + public static final String JSON_PROPERTY_CASHTAG = "cashtag"; + private String cashtag; + + public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId"; + private String checkoutAttemptId; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + private String customerId; + + public static final String JSON_PROPERTY_GRANT_ID = "grantId"; + private String grantId; + + public static final String JSON_PROPERTY_ON_FILE_GRANT_ID = "onFileGrantId"; + private String onFileGrantId; + + public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference"; + @Deprecated + private String recurringDetailReference; + + public static final String JSON_PROPERTY_REQUEST_ID = "requestId"; + private String requestId; + + public static final String JSON_PROPERTY_STORED_PAYMENT_METHOD_ID = "storedPaymentMethodId"; + private String storedPaymentMethodId; + + /** + * cashapp + */ + public enum TypeEnum { + CASHAPP("cashapp"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public CashAppDetails() { + } + + public CashAppDetails cashtag(String cashtag) { + this.cashtag = cashtag; + return this; + } + + /** + * Cash App issued cashtag for recurring payment + * @return cashtag + **/ + @ApiModelProperty(value = "Cash App issued cashtag for recurring payment") + @JsonProperty(JSON_PROPERTY_CASHTAG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCashtag() { + return cashtag; + } + + + /** + * Cash App issued cashtag for recurring payment + * + * @param cashtag + */ + @JsonProperty(JSON_PROPERTY_CASHTAG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCashtag(String cashtag) { + this.cashtag = cashtag; + } + + + public CashAppDetails checkoutAttemptId(String checkoutAttemptId) { + this.checkoutAttemptId = checkoutAttemptId; + return this; + } + + /** + * The checkout attempt identifier. + * @return checkoutAttemptId + **/ + @ApiModelProperty(value = "The checkout attempt identifier.") + @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCheckoutAttemptId() { + return checkoutAttemptId; + } + + + /** + * The checkout attempt identifier. + * + * @param checkoutAttemptId + */ + @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckoutAttemptId(String checkoutAttemptId) { + this.checkoutAttemptId = checkoutAttemptId; + } + + + public CashAppDetails customerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Cash App issued customerId for recurring payment + * @return customerId + **/ + @ApiModelProperty(value = "Cash App issued customerId for recurring payment") + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerId() { + return customerId; + } + + + /** + * Cash App issued customerId for recurring payment + * + * @param customerId + */ + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + + public CashAppDetails grantId(String grantId) { + this.grantId = grantId; + return this; + } + + /** + * Cash App issued grantId for one time payment + * @return grantId + **/ + @ApiModelProperty(value = "Cash App issued grantId for one time payment") + @JsonProperty(JSON_PROPERTY_GRANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getGrantId() { + return grantId; + } + + + /** + * Cash App issued grantId for one time payment + * + * @param grantId + */ + @JsonProperty(JSON_PROPERTY_GRANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGrantId(String grantId) { + this.grantId = grantId; + } + + + public CashAppDetails onFileGrantId(String onFileGrantId) { + this.onFileGrantId = onFileGrantId; + return this; + } + + /** + * Cash App issued onFileGrantId for recurring payment + * @return onFileGrantId + **/ + @ApiModelProperty(value = "Cash App issued onFileGrantId for recurring payment") + @JsonProperty(JSON_PROPERTY_ON_FILE_GRANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOnFileGrantId() { + return onFileGrantId; + } + + + /** + * Cash App issued onFileGrantId for recurring payment + * + * @param onFileGrantId + */ + @JsonProperty(JSON_PROPERTY_ON_FILE_GRANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOnFileGrantId(String onFileGrantId) { + this.onFileGrantId = onFileGrantId; + } + + + @Deprecated + public CashAppDetails recurringDetailReference(String recurringDetailReference) { + this.recurringDetailReference = recurringDetailReference; + return this; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + * @return recurringDetailReference + * @deprecated + **/ + @Deprecated + @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.") + @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRecurringDetailReference() { + return recurringDetailReference; + } + + + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + * + * @param recurringDetailReference + */ + @Deprecated + @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRecurringDetailReference(String recurringDetailReference) { + this.recurringDetailReference = recurringDetailReference; + } + + + public CashAppDetails requestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Cash App request id + * @return requestId + **/ + @ApiModelProperty(value = "Cash App request id") + @JsonProperty(JSON_PROPERTY_REQUEST_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRequestId() { + return requestId; + } + + + /** + * Cash App request id + * + * @param requestId + */ + @JsonProperty(JSON_PROPERTY_REQUEST_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + + public CashAppDetails storedPaymentMethodId(String storedPaymentMethodId) { + this.storedPaymentMethodId = storedPaymentMethodId; + return this; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + * @return storedPaymentMethodId + **/ + @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.") + @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStoredPaymentMethodId() { + return storedPaymentMethodId; + } + + + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + * + * @param storedPaymentMethodId + */ + @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStoredPaymentMethodId(String storedPaymentMethodId) { + this.storedPaymentMethodId = storedPaymentMethodId; + } + + + public CashAppDetails type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * cashapp + * @return type + **/ + @ApiModelProperty(value = "cashapp") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + /** + * cashapp + * + * @param type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + /** + * Return true if this CashAppDetails object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CashAppDetails cashAppDetails = (CashAppDetails) o; + return Objects.equals(this.cashtag, cashAppDetails.cashtag) && + Objects.equals(this.checkoutAttemptId, cashAppDetails.checkoutAttemptId) && + Objects.equals(this.customerId, cashAppDetails.customerId) && + Objects.equals(this.grantId, cashAppDetails.grantId) && + Objects.equals(this.onFileGrantId, cashAppDetails.onFileGrantId) && + Objects.equals(this.recurringDetailReference, cashAppDetails.recurringDetailReference) && + Objects.equals(this.requestId, cashAppDetails.requestId) && + Objects.equals(this.storedPaymentMethodId, cashAppDetails.storedPaymentMethodId) && + Objects.equals(this.type, cashAppDetails.type); + } + + @Override + public int hashCode() { + return Objects.hash(cashtag, checkoutAttemptId, customerId, grantId, onFileGrantId, recurringDetailReference, requestId, storedPaymentMethodId, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CashAppDetails {\n"); + sb.append(" cashtag: ").append(toIndentedString(cashtag)).append("\n"); + sb.append(" checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" grantId: ").append(toIndentedString(grantId)).append("\n"); + sb.append(" onFileGrantId: ").append(toIndentedString(onFileGrantId)).append("\n"); + sb.append(" recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n"); + sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); + sb.append(" storedPaymentMethodId: ").append(toIndentedString(storedPaymentMethodId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of CashAppDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of CashAppDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to CashAppDetails + */ + public static CashAppDetails fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CashAppDetails.class); + } +/** + * Convert an instance of CashAppDetails to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java b/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java index bf1d067d2..90d7d1583 100644 --- a/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java +++ b/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java @@ -26,6 +26,7 @@ import com.adyen.model.checkout.BillDeskDetails; import com.adyen.model.checkout.BlikDetails; import com.adyen.model.checkout.CardDetails; +import com.adyen.model.checkout.CashAppDetails; import com.adyen.model.checkout.CellulantDetails; import com.adyen.model.checkout.DokuDetails; import com.adyen.model.checkout.DotpayDetails; @@ -412,6 +413,34 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c } + // deserialize CashAppDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CashAppDetails.class.equals(Integer.class) || CashAppDetails.class.equals(Long.class) || CashAppDetails.class.equals(Float.class) || CashAppDetails.class.equals(Double.class) || CashAppDetails.class.equals(Boolean.class) || CashAppDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CashAppDetails.class.equals(Integer.class) || CashAppDetails.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CashAppDetails.class.equals(Float.class) || CashAppDetails.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CashAppDetails.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CashAppDetails.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = Arrays.stream(CashAppDetails.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + if (attemptParsing || typeMatch) { + // Strict deserialization for oneOf models + deserialized = JSON.getMapper().readValue(tree.toString(), CashAppDetails.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'CashAppDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CashAppDetails'", e); + } + + // deserialize CellulantDetails try { boolean attemptParsing = true; @@ -1331,6 +1360,11 @@ public CheckoutPaymentMethod(CardDetails o) { setActualInstance(o); } + public CheckoutPaymentMethod(CashAppDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public CheckoutPaymentMethod(CellulantDetails o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1502,6 +1536,8 @@ public CheckoutPaymentMethod(ZipDetails o) { }); schemas.put("CardDetails", new GenericType() { }); + schemas.put("CashAppDetails", new GenericType() { + }); schemas.put("CellulantDetails", new GenericType() { }); schemas.put("DokuDetails", new GenericType() { @@ -1573,7 +1609,7 @@ public Map getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails + * AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails * * It could be an instance of the 'oneOf' schemas. * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). @@ -1630,6 +1666,11 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(CashAppDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(CellulantDetails.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -1780,14 +1821,14 @@ public void setActualInstance(Object instance) { return; } - throw new RuntimeException("Invalid instance type. Must be AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails"); + throw new RuntimeException("Invalid instance type. Must be AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails"); } /** * Get the actual instance, which can be the following: - * AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails + * AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails * - * @return The actual instance (AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails) + * @return The actual instance (AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails) */ @Override public Object getActualInstance() { @@ -1904,6 +1945,17 @@ public CardDetails getCardDetails() throws ClassCastException { return (CardDetails)super.getActualInstance(); } + /** + * Get the actual instance of `CashAppDetails`. If the actual instance is not `CashAppDetails`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CashAppDetails` + * @throws ClassCastException if the instance is not `CashAppDetails` + */ + public CashAppDetails getCashAppDetails() throws ClassCastException { + return (CashAppDetails)super.getActualInstance(); + } + /** * Get the actual instance of `CellulantDetails`. If the actual instance is not `CellulantDetails`, * the ClassCastException will be thrown. diff --git a/src/main/java/com/adyen/model/checkout/CheckoutSessionInstallmentOption.java b/src/main/java/com/adyen/model/checkout/CheckoutSessionInstallmentOption.java index 74d5dc3c6..55a8fd7a1 100644 --- a/src/main/java/com/adyen/model/checkout/CheckoutSessionInstallmentOption.java +++ b/src/main/java/com/adyen/model/checkout/CheckoutSessionInstallmentOption.java @@ -43,9 +43,23 @@ public class CheckoutSessionInstallmentOption { * Gets or Sets plans */ public enum PlansEnum { + BUYNOW_PAYLATER("buynow_paylater"), + + INTERES_REFUND_PRCTG("interes_refund_prctg"), + + INTEREST_BONUS("interest_bonus"), + + NOINTERES_REFUND_PRCTG("nointeres_refund_prctg"), + + NOINTEREST_BONUS("nointerest_bonus"), + + REFUND_PRCTG("refund_prctg"), + REGULAR("regular"), - REVOLVING("revolving"); + REVOLVING("revolving"), + + WITH_INTEREST("with_interest"); private String value; diff --git a/src/main/java/com/adyen/model/checkout/InstallmentOption.java b/src/main/java/com/adyen/model/checkout/InstallmentOption.java index cb5780c72..a319fc321 100644 --- a/src/main/java/com/adyen/model/checkout/InstallmentOption.java +++ b/src/main/java/com/adyen/model/checkout/InstallmentOption.java @@ -47,9 +47,23 @@ public class InstallmentOption { * Gets or Sets plans */ public enum PlansEnum { + BUYNOW_PAYLATER("buynow_paylater"), + + INTERES_REFUND_PRCTG("interes_refund_prctg"), + + INTEREST_BONUS("interest_bonus"), + + NOINTERES_REFUND_PRCTG("nointeres_refund_prctg"), + + NOINTEREST_BONUS("nointerest_bonus"), + + REFUND_PRCTG("refund_prctg"), + REGULAR("regular"), - REVOLVING("revolving"); + REVOLVING("revolving"), + + WITH_INTEREST("with_interest"); private String value; diff --git a/src/main/java/com/adyen/model/checkout/Installments.java b/src/main/java/com/adyen/model/checkout/Installments.java index 3f8cf2d74..d8adb1d9e 100644 --- a/src/main/java/com/adyen/model/checkout/Installments.java +++ b/src/main/java/com/adyen/model/checkout/Installments.java @@ -31,18 +31,36 @@ * Installments */ @JsonPropertyOrder({ + Installments.JSON_PROPERTY_EXTRA, Installments.JSON_PROPERTY_PLAN, Installments.JSON_PROPERTY_VALUE }) public class Installments { + public static final String JSON_PROPERTY_EXTRA = "extra"; + private Integer extra; + /** - * The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** + * The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. */ public enum PlanEnum { + BUYNOW_PAYLATER("buynow_paylater"), + + INTERES_REFUND_PRCTG("interes_refund_prctg"), + + INTEREST_BONUS("interest_bonus"), + + NOINTERES_REFUND_PRCTG("nointeres_refund_prctg"), + + NOINTEREST_BONUS("nointerest_bonus"), + + REFUND_PRCTG("refund_prctg"), + REGULAR("regular"), - REVOLVING("revolving"); + REVOLVING("revolving"), + + WITH_INTEREST("with_interest"); private String value; @@ -80,16 +98,46 @@ public static PlanEnum fromValue(String value) { public Installments() { } + public Installments extra(Integer extra) { + this.extra = extra; + return this; + } + + /** + * Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico) + * @return extra + **/ + @ApiModelProperty(value = "Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico) ") + @JsonProperty(JSON_PROPERTY_EXTRA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getExtra() { + return extra; + } + + + /** + * Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico) + * + * @param extra + */ + @JsonProperty(JSON_PROPERTY_EXTRA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExtra(Integer extra) { + this.extra = extra; + } + + public Installments plan(PlanEnum plan) { this.plan = plan; return this; } /** - * The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** + * The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. * @return plan **/ - @ApiModelProperty(value = "The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** ") + @ApiModelProperty(value = "The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. ") @JsonProperty(JSON_PROPERTY_PLAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -99,7 +147,7 @@ public PlanEnum getPlan() { /** - * The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** + * The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. * * @param plan */ @@ -116,10 +164,10 @@ public Installments value(Integer value) { } /** - * Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. + * Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico * @return value **/ - @ApiModelProperty(required = true, value = "Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary.") + @ApiModelProperty(required = true, value = "Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico") @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -129,7 +177,7 @@ public Integer getValue() { /** - * Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. + * Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico * * @param value */ @@ -152,19 +200,21 @@ public boolean equals(Object o) { return false; } Installments installments = (Installments) o; - return Objects.equals(this.plan, installments.plan) && + return Objects.equals(this.extra, installments.extra) && + Objects.equals(this.plan, installments.plan) && Objects.equals(this.value, installments.value); } @Override public int hashCode() { - return Objects.hash(plan, value); + return Objects.hash(extra, plan, value); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Installments {\n"); + sb.append(" extra: ").append(toIndentedString(extra)).append("\n"); sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/adyen/model/legalentitymanagement/HKLocalAccountIdentification.java b/src/main/java/com/adyen/model/legalentitymanagement/HKLocalAccountIdentification.java index aa32d43f9..6d71228b2 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/HKLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/HKLocalAccountIdentification.java @@ -32,8 +32,6 @@ */ @JsonPropertyOrder({ HKLocalAccountIdentification.JSON_PROPERTY_ACCOUNT_NUMBER, - HKLocalAccountIdentification.JSON_PROPERTY_BANK_NAME, - HKLocalAccountIdentification.JSON_PROPERTY_BIC, HKLocalAccountIdentification.JSON_PROPERTY_CLEARING_CODE, HKLocalAccountIdentification.JSON_PROPERTY_TYPE }) @@ -42,12 +40,6 @@ public class HKLocalAccountIdentification { public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; private String accountNumber; - public static final String JSON_PROPERTY_BANK_NAME = "bankName"; - private String bankName; - - public static final String JSON_PROPERTY_BIC = "bic"; - private String bic; - public static final String JSON_PROPERTY_CLEARING_CODE = "clearingCode"; private String clearingCode; @@ -120,66 +112,6 @@ public void setAccountNumber(String accountNumber) { } - public HKLocalAccountIdentification bankName(String bankName) { - this.bankName = bankName; - return this; - } - - /** - * The bank's name. - * @return bankName - **/ - @ApiModelProperty(value = "The bank's name.") - @JsonProperty(JSON_PROPERTY_BANK_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBankName() { - return bankName; - } - - - /** - * The bank's name. - * - * @param bankName - */ - @JsonProperty(JSON_PROPERTY_BANK_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBankName(String bankName) { - this.bankName = bankName; - } - - - public HKLocalAccountIdentification bic(String bic) { - this.bic = bic; - return this; - } - - /** - * The bank's 8- or 11-character BIC or SWIFT code. - * @return bic - **/ - @ApiModelProperty(value = "The bank's 8- or 11-character BIC or SWIFT code.") - @JsonProperty(JSON_PROPERTY_BIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBic() { - return bic; - } - - - /** - * The bank's 8- or 11-character BIC or SWIFT code. - * - * @param bic - */ - @JsonProperty(JSON_PROPERTY_BIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBic(String bic) { - this.bic = bic; - } - - public HKLocalAccountIdentification clearingCode(String clearingCode) { this.clearingCode = clearingCode; return this; @@ -253,15 +185,13 @@ public boolean equals(Object o) { } HKLocalAccountIdentification hkLocalAccountIdentification = (HKLocalAccountIdentification) o; return Objects.equals(this.accountNumber, hkLocalAccountIdentification.accountNumber) && - Objects.equals(this.bankName, hkLocalAccountIdentification.bankName) && - Objects.equals(this.bic, hkLocalAccountIdentification.bic) && Objects.equals(this.clearingCode, hkLocalAccountIdentification.clearingCode) && Objects.equals(this.type, hkLocalAccountIdentification.type); } @Override public int hashCode() { - return Objects.hash(accountNumber, bankName, bic, clearingCode, type); + return Objects.hash(accountNumber, clearingCode, type); } @Override @@ -269,8 +199,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HKLocalAccountIdentification {\n"); sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); - sb.append(" bic: ").append(toIndentedString(bic)).append("\n"); sb.append(" clearingCode: ").append(toIndentedString(clearingCode)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequest.java b/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequest.java index cedb0f1aa..af414016d 100644 --- a/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequest.java +++ b/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequest.java @@ -92,10 +92,10 @@ public ScheduleTerminalActionsRequest scheduledAt(String scheduledAt) { } /** - * The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+01:00** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call. + * The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call. * @return scheduledAt **/ - @ApiModelProperty(value = "The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+01:00** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.") + @ApiModelProperty(value = "The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.") @JsonProperty(JSON_PROPERTY_SCHEDULED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -105,7 +105,7 @@ public String getScheduledAt() { /** - * The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+01:00** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call. + * The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call. * * @param scheduledAt */ diff --git a/src/main/java/com/adyen/model/management/ScheduleTerminalActionsResponse.java b/src/main/java/com/adyen/model/management/ScheduleTerminalActionsResponse.java index be1c7e1b3..d4f2f2ff7 100644 --- a/src/main/java/com/adyen/model/management/ScheduleTerminalActionsResponse.java +++ b/src/main/java/com/adyen/model/management/ScheduleTerminalActionsResponse.java @@ -145,10 +145,10 @@ public ScheduleTerminalActionsResponse scheduledAt(String scheduledAt) { } /** - * The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+01:00** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call. + * The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call. * @return scheduledAt **/ - @ApiModelProperty(value = "The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+01:00** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.") + @ApiModelProperty(value = "The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.") @JsonProperty(JSON_PROPERTY_SCHEDULED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -158,7 +158,7 @@ public String getScheduledAt() { /** - * The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+01:00** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call. + * The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call. * * @param scheduledAt */ diff --git a/src/main/java/com/adyen/model/management/TerminalOrderRequest.java b/src/main/java/com/adyen/model/management/TerminalOrderRequest.java index bbda8ca6a..5167b35d7 100644 --- a/src/main/java/com/adyen/model/management/TerminalOrderRequest.java +++ b/src/main/java/com/adyen/model/management/TerminalOrderRequest.java @@ -70,10 +70,10 @@ public TerminalOrderRequest billingEntityId(String billingEntityId) { } /** - * The identification of the billing entity to use for the order. + * The identification of the billing entity to use for the order. > When ordering products in Brazil, you do not need to include the `billingEntityId` in the request. * @return billingEntityId **/ - @ApiModelProperty(value = "The identification of the billing entity to use for the order.") + @ApiModelProperty(value = "The identification of the billing entity to use for the order. > When ordering products in Brazil, you do not need to include the `billingEntityId` in the request.") @JsonProperty(JSON_PROPERTY_BILLING_ENTITY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -83,7 +83,7 @@ public String getBillingEntityId() { /** - * The identification of the billing entity to use for the order. + * The identification of the billing entity to use for the order. > When ordering products in Brazil, you do not need to include the `billingEntityId` in the request. * * @param billingEntityId */ diff --git a/src/main/java/com/adyen/model/payment/Installments.java b/src/main/java/com/adyen/model/payment/Installments.java index c2c41d2dc..731a51ab9 100644 --- a/src/main/java/com/adyen/model/payment/Installments.java +++ b/src/main/java/com/adyen/model/payment/Installments.java @@ -31,18 +31,36 @@ * Installments */ @JsonPropertyOrder({ + Installments.JSON_PROPERTY_EXTRA, Installments.JSON_PROPERTY_PLAN, Installments.JSON_PROPERTY_VALUE }) public class Installments { + public static final String JSON_PROPERTY_EXTRA = "extra"; + private Integer extra; + /** - * The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** + * The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. */ public enum PlanEnum { + BUYNOW_PAYLATER("buynow_paylater"), + + INTERES_REFUND_PRCTG("interes_refund_prctg"), + + INTEREST_BONUS("interest_bonus"), + + NOINTERES_REFUND_PRCTG("nointeres_refund_prctg"), + + NOINTEREST_BONUS("nointerest_bonus"), + + REFUND_PRCTG("refund_prctg"), + REGULAR("regular"), - REVOLVING("revolving"); + REVOLVING("revolving"), + + WITH_INTEREST("with_interest"); private String value; @@ -80,16 +98,46 @@ public static PlanEnum fromValue(String value) { public Installments() { } + public Installments extra(Integer extra) { + this.extra = extra; + return this; + } + + /** + * Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico) + * @return extra + **/ + @ApiModelProperty(value = "Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico) ") + @JsonProperty(JSON_PROPERTY_EXTRA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getExtra() { + return extra; + } + + + /** + * Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico) + * + * @param extra + */ + @JsonProperty(JSON_PROPERTY_EXTRA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExtra(Integer extra) { + this.extra = extra; + } + + public Installments plan(PlanEnum plan) { this.plan = plan; return this; } /** - * The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** + * The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. * @return plan **/ - @ApiModelProperty(value = "The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** ") + @ApiModelProperty(value = "The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. ") @JsonProperty(JSON_PROPERTY_PLAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -99,7 +147,7 @@ public PlanEnum getPlan() { /** - * The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** + * The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. * * @param plan */ @@ -116,10 +164,10 @@ public Installments value(Integer value) { } /** - * Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. + * Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico. * @return value **/ - @ApiModelProperty(required = true, value = "Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary.") + @ApiModelProperty(required = true, value = "Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico.") @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -129,7 +177,7 @@ public Integer getValue() { /** - * Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. + * Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico. * * @param value */ @@ -152,19 +200,21 @@ public boolean equals(Object o) { return false; } Installments installments = (Installments) o; - return Objects.equals(this.plan, installments.plan) && + return Objects.equals(this.extra, installments.extra) && + Objects.equals(this.plan, installments.plan) && Objects.equals(this.value, installments.value); } @Override public int hashCode() { - return Objects.hash(plan, value); + return Objects.hash(extra, plan, value); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Installments {\n"); + sb.append(" extra: ").append(toIndentedString(extra)).append("\n"); sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append("}");