diff --git a/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java b/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java index 258b46585..2e9d6e7f9 100644 --- a/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java +++ b/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java @@ -31,6 +31,7 @@ import com.adyen.model.checkout.DokuDetails; import com.adyen.model.checkout.DotpayDetails; import com.adyen.model.checkout.DragonpayDetails; +import com.adyen.model.checkout.EBankingFinlandDetails; import com.adyen.model.checkout.EcontextVoucherDetails; import com.adyen.model.checkout.EftDetails; import com.adyen.model.checkout.GenericIssuerPaymentMethodDetails; @@ -53,6 +54,7 @@ import com.adyen.model.checkout.SamsungPayDetails; import com.adyen.model.checkout.SepaDirectDebitDetails; import com.adyen.model.checkout.StoredPaymentMethodDetails; +import com.adyen.model.checkout.TwintDetails; import com.adyen.model.checkout.UpiCollectDetails; import com.adyen.model.checkout.UpiIntentDetails; import com.adyen.model.checkout.VippsDetails; @@ -556,6 +558,34 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c } + // deserialize EBankingFinlandDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (EBankingFinlandDetails.class.equals(Integer.class) || EBankingFinlandDetails.class.equals(Long.class) || EBankingFinlandDetails.class.equals(Float.class) || EBankingFinlandDetails.class.equals(Double.class) || EBankingFinlandDetails.class.equals(Boolean.class) || EBankingFinlandDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((EBankingFinlandDetails.class.equals(Integer.class) || EBankingFinlandDetails.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((EBankingFinlandDetails.class.equals(Float.class) || EBankingFinlandDetails.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (EBankingFinlandDetails.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (EBankingFinlandDetails.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(EBankingFinlandDetails.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(), EBankingFinlandDetails.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'EBankingFinlandDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'EBankingFinlandDetails'", e); + } + + // deserialize EcontextVoucherDetails try { boolean attemptParsing = true; @@ -1172,6 +1202,34 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c } + // deserialize TwintDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (TwintDetails.class.equals(Integer.class) || TwintDetails.class.equals(Long.class) || TwintDetails.class.equals(Float.class) || TwintDetails.class.equals(Double.class) || TwintDetails.class.equals(Boolean.class) || TwintDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((TwintDetails.class.equals(Integer.class) || TwintDetails.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((TwintDetails.class.equals(Float.class) || TwintDetails.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (TwintDetails.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (TwintDetails.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(TwintDetails.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(), TwintDetails.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'TwintDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'TwintDetails'", e); + } + + // deserialize UpiCollectDetails try { boolean attemptParsing = true; @@ -1472,6 +1530,11 @@ public CheckoutPaymentMethod(DragonpayDetails o) { setActualInstance(o); } + public CheckoutPaymentMethod(EBankingFinlandDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public CheckoutPaymentMethod(EcontextVoucherDetails o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1582,6 +1645,11 @@ public CheckoutPaymentMethod(StoredPaymentMethodDetails o) { setActualInstance(o); } + public CheckoutPaymentMethod(TwintDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public CheckoutPaymentMethod(UpiCollectDetails o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1648,6 +1716,8 @@ public CheckoutPaymentMethod(ZipDetails o) { }); schemas.put("DragonpayDetails", new GenericType() { }); + schemas.put("EBankingFinlandDetails", new GenericType() { + }); schemas.put("EcontextVoucherDetails", new GenericType() { }); schemas.put("EftDetails", new GenericType() { @@ -1692,6 +1762,8 @@ public CheckoutPaymentMethod(ZipDetails o) { }); schemas.put("StoredPaymentMethodDetails", new GenericType() { }); + schemas.put("TwintDetails", new GenericType() { + }); schemas.put("UpiCollectDetails", new GenericType() { }); schemas.put("UpiIntentDetails", new GenericType() { @@ -1717,7 +1789,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, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankDetails, PayPalDetails, PayToDetails, 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, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, 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). @@ -1799,6 +1871,11 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(EBankingFinlandDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(EcontextVoucherDetails.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -1909,6 +1986,11 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(TwintDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(UpiCollectDetails.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -1944,14 +2026,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, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankDetails, PayPalDetails, PayToDetails, 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, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, 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, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankDetails, PayPalDetails, PayToDetails, 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, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, 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, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankDetails, PayPalDetails, PayToDetails, 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, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails) */ @Override public Object getActualInstance() { @@ -2123,6 +2205,17 @@ public DragonpayDetails getDragonpayDetails() throws ClassCastException { return (DragonpayDetails)super.getActualInstance(); } + /** + * Get the actual instance of `EBankingFinlandDetails`. If the actual instance is not `EBankingFinlandDetails`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `EBankingFinlandDetails` + * @throws ClassCastException if the instance is not `EBankingFinlandDetails` + */ + public EBankingFinlandDetails getEBankingFinlandDetails() throws ClassCastException { + return (EBankingFinlandDetails)super.getActualInstance(); + } + /** * Get the actual instance of `EcontextVoucherDetails`. If the actual instance is not `EcontextVoucherDetails`, * the ClassCastException will be thrown. @@ -2365,6 +2458,17 @@ public StoredPaymentMethodDetails getStoredPaymentMethodDetails() throws ClassCa return (StoredPaymentMethodDetails)super.getActualInstance(); } + /** + * Get the actual instance of `TwintDetails`. If the actual instance is not `TwintDetails`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `TwintDetails` + * @throws ClassCastException if the instance is not `TwintDetails` + */ + public TwintDetails getTwintDetails() throws ClassCastException { + return (TwintDetails)super.getActualInstance(); + } + /** * Get the actual instance of `UpiCollectDetails`. If the actual instance is not `UpiCollectDetails`, * the ClassCastException will be thrown. diff --git a/src/main/java/com/adyen/model/checkout/EBankingFinlandDetails.java b/src/main/java/com/adyen/model/checkout/EBankingFinlandDetails.java new file mode 100644 index 000000000..2ec84c216 --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/EBankingFinlandDetails.java @@ -0,0 +1,246 @@ +/* + * 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; + + +/** + * EBankingFinlandDetails + */ +@JsonPropertyOrder({ + EBankingFinlandDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID, + EBankingFinlandDetails.JSON_PROPERTY_ISSUER, + EBankingFinlandDetails.JSON_PROPERTY_TYPE +}) + +public class EBankingFinlandDetails { + public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId"; + private String checkoutAttemptId; + + public static final String JSON_PROPERTY_ISSUER = "issuer"; + private String issuer; + + /** + * **ebanking_FI** + */ + public enum TypeEnum { + EBANKING_FI("ebanking_FI"); + + 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 EBankingFinlandDetails() { + } + + /** + * The checkout attempt identifier. + * + * @param checkoutAttemptId + * @return the current {@code EBankingFinlandDetails} instance, allowing for method chaining + */ + public EBankingFinlandDetails 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; + } + + /** + * The Ebanking Finland issuer value of the shopper's selected bank. + * + * @param issuer + * @return the current {@code EBankingFinlandDetails} instance, allowing for method chaining + */ + public EBankingFinlandDetails issuer(String issuer) { + this.issuer = issuer; + return this; + } + + /** + * The Ebanking Finland issuer value of the shopper's selected bank. + * @return issuer + */ + @ApiModelProperty(value = "The Ebanking Finland issuer value of the shopper's selected bank.") + @JsonProperty(JSON_PROPERTY_ISSUER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIssuer() { + return issuer; + } + + /** + * The Ebanking Finland issuer value of the shopper's selected bank. + * + * @param issuer + */ + @JsonProperty(JSON_PROPERTY_ISSUER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIssuer(String issuer) { + this.issuer = issuer; + } + + /** + * **ebanking_FI** + * + * @param type + * @return the current {@code EBankingFinlandDetails} instance, allowing for method chaining + */ + public EBankingFinlandDetails type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * **ebanking_FI** + * @return type + */ + @ApiModelProperty(required = true, value = "**ebanking_FI**") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + /** + * **ebanking_FI** + * + * @param type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Return true if this EBankingFinlandDetails object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EBankingFinlandDetails ebankingFinlandDetails = (EBankingFinlandDetails) o; + return Objects.equals(this.checkoutAttemptId, ebankingFinlandDetails.checkoutAttemptId) && + Objects.equals(this.issuer, ebankingFinlandDetails.issuer) && + Objects.equals(this.type, ebankingFinlandDetails.type); + } + + @Override + public int hashCode() { + return Objects.hash(checkoutAttemptId, issuer, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EBankingFinlandDetails {\n"); + sb.append(" checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n"); + sb.append(" issuer: ").append(toIndentedString(issuer)).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 EBankingFinlandDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of EBankingFinlandDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to EBankingFinlandDetails + */ + public static EBankingFinlandDetails fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, EBankingFinlandDetails.class); + } +/** + * Convert an instance of EBankingFinlandDetails 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/FundRecipient.java b/src/main/java/com/adyen/model/checkout/FundRecipient.java index a053f54f4..a248bafa9 100644 --- a/src/main/java/com/adyen/model/checkout/FundRecipient.java +++ b/src/main/java/com/adyen/model/checkout/FundRecipient.java @@ -84,7 +84,7 @@ public class FundRecipient { private String walletOwnerTaxId; /** - * The purpose of a digital wallet transaction + * The purpose of a digital wallet transaction. */ public enum WalletPurposeEnum { IDENTIFIEDBOLETO("identifiedBoleto"), @@ -131,7 +131,7 @@ public FundRecipient() { } /** - * Fund Recipient Iban for C2C payments + * The IBAN of the bank account where the funds are being transferred to. * * @param IBAN * @return the current {@code FundRecipient} instance, allowing for method chaining @@ -142,10 +142,10 @@ public FundRecipient IBAN(String IBAN) { } /** - * Fund Recipient Iban for C2C payments + * The IBAN of the bank account where the funds are being transferred to. * @return IBAN */ - @ApiModelProperty(value = "Fund Recipient Iban for C2C payments") + @ApiModelProperty(value = "The IBAN of the bank account where the funds are being transferred to.") @JsonProperty(JSON_PROPERTY_I_B_A_N) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getIBAN() { @@ -153,7 +153,7 @@ public String getIBAN() { } /** - * Fund Recipient Iban for C2C payments + * The IBAN of the bank account where the funds are being transferred to. * * @param IBAN */ @@ -428,7 +428,7 @@ public void setTelephoneNumber(String telephoneNumber) { } /** - * Indicates where the money is going. + * The unique identifier for the wallet the funds are being transferred to. You can use the shopper reference or any other identifier. * * @param walletIdentifier * @return the current {@code FundRecipient} instance, allowing for method chaining @@ -439,10 +439,10 @@ public FundRecipient walletIdentifier(String walletIdentifier) { } /** - * Indicates where the money is going. + * The unique identifier for the wallet the funds are being transferred to. You can use the shopper reference or any other identifier. * @return walletIdentifier */ - @ApiModelProperty(value = "Indicates where the money is going.") + @ApiModelProperty(value = "The unique identifier for the wallet the funds are being transferred to. You can use the shopper reference or any other identifier.") @JsonProperty(JSON_PROPERTY_WALLET_IDENTIFIER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getWalletIdentifier() { @@ -450,7 +450,7 @@ public String getWalletIdentifier() { } /** - * Indicates where the money is going. + * The unique identifier for the wallet the funds are being transferred to. You can use the shopper reference or any other identifier. * * @param walletIdentifier */ @@ -461,7 +461,7 @@ public void setWalletIdentifier(String walletIdentifier) { } /** - * Indicates the tax identifier of the fund recipient + * The tax identifier of the person receiving the funds. * * @param walletOwnerTaxId * @return the current {@code FundRecipient} instance, allowing for method chaining @@ -472,10 +472,10 @@ public FundRecipient walletOwnerTaxId(String walletOwnerTaxId) { } /** - * Indicates the tax identifier of the fund recipient + * The tax identifier of the person receiving the funds. * @return walletOwnerTaxId */ - @ApiModelProperty(value = "Indicates the tax identifier of the fund recipient") + @ApiModelProperty(value = "The tax identifier of the person receiving the funds.") @JsonProperty(JSON_PROPERTY_WALLET_OWNER_TAX_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getWalletOwnerTaxId() { @@ -483,7 +483,7 @@ public String getWalletOwnerTaxId() { } /** - * Indicates the tax identifier of the fund recipient + * The tax identifier of the person receiving the funds. * * @param walletOwnerTaxId */ @@ -494,7 +494,7 @@ public void setWalletOwnerTaxId(String walletOwnerTaxId) { } /** - * The purpose of a digital wallet transaction + * The purpose of a digital wallet transaction. * * @param walletPurpose * @return the current {@code FundRecipient} instance, allowing for method chaining @@ -505,10 +505,10 @@ public FundRecipient walletPurpose(WalletPurposeEnum walletPurpose) { } /** - * The purpose of a digital wallet transaction + * The purpose of a digital wallet transaction. * @return walletPurpose */ - @ApiModelProperty(value = "The purpose of a digital wallet transaction") + @ApiModelProperty(value = "The purpose of a digital wallet transaction.") @JsonProperty(JSON_PROPERTY_WALLET_PURPOSE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public WalletPurposeEnum getWalletPurpose() { @@ -516,7 +516,7 @@ public WalletPurposeEnum getWalletPurpose() { } /** - * The purpose of a digital wallet transaction + * The purpose of a digital wallet transaction. * * @param walletPurpose */ diff --git a/src/main/java/com/adyen/model/checkout/Mandate.java b/src/main/java/com/adyen/model/checkout/Mandate.java index f24be2574..d346d4280 100644 --- a/src/main/java/com/adyen/model/checkout/Mandate.java +++ b/src/main/java/com/adyen/model/checkout/Mandate.java @@ -134,7 +134,7 @@ public static BillingAttemptsRuleEnum fromValue(String value) { private String endsAt; /** - * The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. + * The frequency with which a shopper should be charged. Possible values: **adhoc**, **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. */ public enum FrequencyEnum { ADHOC("adhoc"), @@ -391,7 +391,7 @@ public void setEndsAt(String endsAt) { } /** - * The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. + * The frequency with which a shopper should be charged. Possible values: **adhoc**, **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. * * @param frequency * @return the current {@code Mandate} instance, allowing for method chaining @@ -402,10 +402,10 @@ public Mandate frequency(FrequencyEnum frequency) { } /** - * The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. + * The frequency with which a shopper should be charged. Possible values: **adhoc**, **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. * @return frequency */ - @ApiModelProperty(required = true, value = "The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**.") + @ApiModelProperty(required = true, value = "The frequency with which a shopper should be charged. Possible values: **adhoc**, **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**.") @JsonProperty(JSON_PROPERTY_FREQUENCY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public FrequencyEnum getFrequency() { @@ -413,7 +413,7 @@ public FrequencyEnum getFrequency() { } /** - * The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. + * The frequency with which a shopper should be charged. Possible values: **adhoc**, **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. * * @param frequency */ diff --git a/src/main/java/com/adyen/model/checkout/PaymentDetails.java b/src/main/java/com/adyen/model/checkout/PaymentDetails.java index b45d79741..899e7757a 100644 --- a/src/main/java/com/adyen/model/checkout/PaymentDetails.java +++ b/src/main/java/com/adyen/model/checkout/PaymentDetails.java @@ -103,8 +103,6 @@ public enum TypeEnum { MOLPAY_EBANKING_VN("molpay_ebanking_VN"), - EBANKING_FI("ebanking_FI"), - MOLPAY_EBANKING_MY("molpay_ebanking_MY"), MOLPAY_EBANKING_DIRECT_MY("molpay_ebanking_direct_MY"), diff --git a/src/main/java/com/adyen/model/checkout/ResponseAdditionalDataCard.java b/src/main/java/com/adyen/model/checkout/ResponseAdditionalDataCard.java index c00c9ecab..b272a3a3e 100644 --- a/src/main/java/com/adyen/model/checkout/ResponseAdditionalDataCard.java +++ b/src/main/java/com/adyen/model/checkout/ResponseAdditionalDataCard.java @@ -37,6 +37,7 @@ ResponseAdditionalDataCard.JSON_PROPERTY_CARD_ISSUING_COUNTRY, ResponseAdditionalDataCard.JSON_PROPERTY_CARD_ISSUING_CURRENCY, ResponseAdditionalDataCard.JSON_PROPERTY_CARD_PAYMENT_METHOD, + ResponseAdditionalDataCard.JSON_PROPERTY_CARD_PRODUCT_ID, ResponseAdditionalDataCard.JSON_PROPERTY_CARD_SUMMARY, ResponseAdditionalDataCard.JSON_PROPERTY_ISSUER_BIN }) @@ -60,6 +61,62 @@ public class ResponseAdditionalDataCard { public static final String JSON_PROPERTY_CARD_PAYMENT_METHOD = "cardPaymentMethod"; private String cardPaymentMethod; + /** + * The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit + */ + public enum CardProductIdEnum { + A("A"), + + B("B"), + + C("C"), + + D("D"), + + F("F"), + + MCC("MCC"), + + MCE("MCE"), + + MCF("MCF"), + + MCG("MCG"), + + MCH("MCH"), + + MCI("MCI"); + + private String value; + + CardProductIdEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CardProductIdEnum fromValue(String value) { + for (CardProductIdEnum b : CardProductIdEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_CARD_PRODUCT_ID = "cardProductId"; + private CardProductIdEnum cardProductId; + public static final String JSON_PROPERTY_CARD_SUMMARY = "cardSummary"; private String cardSummary; @@ -267,6 +324,39 @@ public void setCardPaymentMethod(String cardPaymentMethod) { this.cardPaymentMethod = cardPaymentMethod; } + /** + * The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit + * + * @param cardProductId + * @return the current {@code ResponseAdditionalDataCard} instance, allowing for method chaining + */ + public ResponseAdditionalDataCard cardProductId(CardProductIdEnum cardProductId) { + this.cardProductId = cardProductId; + return this; + } + + /** + * The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit + * @return cardProductId + */ + @ApiModelProperty(value = "The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit ") + @JsonProperty(JSON_PROPERTY_CARD_PRODUCT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CardProductIdEnum getCardProductId() { + return cardProductId; + } + + /** + * The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit + * + * @param cardProductId + */ + @JsonProperty(JSON_PROPERTY_CARD_PRODUCT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardProductId(CardProductIdEnum cardProductId) { + this.cardProductId = cardProductId; + } + /** * The last four digits of a card number. > Returned only in case of a card payment. * @@ -351,13 +441,14 @@ public boolean equals(Object o) { Objects.equals(this.cardIssuingCountry, responseAdditionalDataCard.cardIssuingCountry) && Objects.equals(this.cardIssuingCurrency, responseAdditionalDataCard.cardIssuingCurrency) && Objects.equals(this.cardPaymentMethod, responseAdditionalDataCard.cardPaymentMethod) && + Objects.equals(this.cardProductId, responseAdditionalDataCard.cardProductId) && Objects.equals(this.cardSummary, responseAdditionalDataCard.cardSummary) && Objects.equals(this.issuerBin, responseAdditionalDataCard.issuerBin); } @Override public int hashCode() { - return Objects.hash(cardBin, cardHolderName, cardIssuingBank, cardIssuingCountry, cardIssuingCurrency, cardPaymentMethod, cardSummary, issuerBin); + return Objects.hash(cardBin, cardHolderName, cardIssuingBank, cardIssuingCountry, cardIssuingCurrency, cardPaymentMethod, cardProductId, cardSummary, issuerBin); } @Override @@ -370,6 +461,7 @@ public String toString() { sb.append(" cardIssuingCountry: ").append(toIndentedString(cardIssuingCountry)).append("\n"); sb.append(" cardIssuingCurrency: ").append(toIndentedString(cardIssuingCurrency)).append("\n"); sb.append(" cardPaymentMethod: ").append(toIndentedString(cardPaymentMethod)).append("\n"); + sb.append(" cardProductId: ").append(toIndentedString(cardProductId)).append("\n"); sb.append(" cardSummary: ").append(toIndentedString(cardSummary)).append("\n"); sb.append(" issuerBin: ").append(toIndentedString(issuerBin)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/adyen/model/checkout/StoredPaymentMethodDetails.java b/src/main/java/com/adyen/model/checkout/StoredPaymentMethodDetails.java index ac4fafde4..0d8487a66 100644 --- a/src/main/java/com/adyen/model/checkout/StoredPaymentMethodDetails.java +++ b/src/main/java/com/adyen/model/checkout/StoredPaymentMethodDetails.java @@ -62,8 +62,6 @@ public enum TypeEnum { MOMO_WALLET_APP("momo_wallet_app"), - TWINT("twint"), - PAYMAYA_WALLET("paymaya_wallet"), GRABPAY_SG("grabpay_SG"), diff --git a/src/main/java/com/adyen/model/checkout/ThreeDSRequestData.java b/src/main/java/com/adyen/model/checkout/ThreeDSRequestData.java index 62ecf5cd9..24a9291c2 100644 --- a/src/main/java/com/adyen/model/checkout/ThreeDSRequestData.java +++ b/src/main/java/com/adyen/model/checkout/ThreeDSRequestData.java @@ -121,10 +121,12 @@ public static DataOnlyEnum fromValue(String value) { private DataOnlyEnum dataOnly; /** - * Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be used when available. Possible values: * **preferred**: Use native 3D Secure authentication when available. + * Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be used when available. Possible values: * **preferred**: Use native 3D Secure authentication when available. * **disabled**: Only use the redirect 3D Secure authentication flow. */ public enum NativeThreeDSEnum { - PREFERRED("preferred"); + PREFERRED("preferred"), + + DISABLED("disabled"); private String value; @@ -264,7 +266,7 @@ public void setDataOnly(DataOnlyEnum dataOnly) { } /** - * Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be used when available. Possible values: * **preferred**: Use native 3D Secure authentication when available. + * Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be used when available. Possible values: * **preferred**: Use native 3D Secure authentication when available. * **disabled**: Only use the redirect 3D Secure authentication flow. * * @param nativeThreeDS * @return the current {@code ThreeDSRequestData} instance, allowing for method chaining @@ -275,10 +277,10 @@ public ThreeDSRequestData nativeThreeDS(NativeThreeDSEnum nativeThreeDS) { } /** - * Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be used when available. Possible values: * **preferred**: Use native 3D Secure authentication when available. + * Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be used when available. Possible values: * **preferred**: Use native 3D Secure authentication when available. * **disabled**: Only use the redirect 3D Secure authentication flow. * @return nativeThreeDS */ - @ApiModelProperty(value = "Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be used when available. Possible values: * **preferred**: Use native 3D Secure authentication when available.") + @ApiModelProperty(value = "Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be used when available. Possible values: * **preferred**: Use native 3D Secure authentication when available. * **disabled**: Only use the redirect 3D Secure authentication flow.") @JsonProperty(JSON_PROPERTY_NATIVE_THREE_D_S) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public NativeThreeDSEnum getNativeThreeDS() { @@ -286,7 +288,7 @@ public NativeThreeDSEnum getNativeThreeDS() { } /** - * Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be used when available. Possible values: * **preferred**: Use native 3D Secure authentication when available. + * Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be used when available. Possible values: * **preferred**: Use native 3D Secure authentication when available. * **disabled**: Only use the redirect 3D Secure authentication flow. * * @param nativeThreeDS */ diff --git a/src/main/java/com/adyen/model/checkout/TwintDetails.java b/src/main/java/com/adyen/model/checkout/TwintDetails.java new file mode 100644 index 000000000..957b602cf --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/TwintDetails.java @@ -0,0 +1,337 @@ +/* + * 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; + + +/** + * TwintDetails + */ +@JsonPropertyOrder({ + TwintDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID, + TwintDetails.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE, + TwintDetails.JSON_PROPERTY_STORED_PAYMENT_METHOD_ID, + TwintDetails.JSON_PROPERTY_SUBTYPE, + TwintDetails.JSON_PROPERTY_TYPE +}) + +public class TwintDetails { + public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId"; + private String checkoutAttemptId; + + public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference"; + @Deprecated // deprecated since Adyen Checkout API v49: Use `storedPaymentMethodId` instead. + private String recurringDetailReference; + + public static final String JSON_PROPERTY_STORED_PAYMENT_METHOD_ID = "storedPaymentMethodId"; + private String storedPaymentMethodId; + + public static final String JSON_PROPERTY_SUBTYPE = "subtype"; + private String subtype; + + /** + * The payment method type. + */ + public enum TypeEnum { + TWINT("twint"); + + 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 TwintDetails() { + } + + /** + * The checkout attempt identifier. + * + * @param checkoutAttemptId + * @return the current {@code TwintDetails} instance, allowing for method chaining + */ + public TwintDetails 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; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + * + * @param recurringDetailReference + * @return the current {@code TwintDetails} instance, allowing for method chaining + * + * @deprecated since Adyen Checkout API v49 + * Use `storedPaymentMethodId` instead. + */ + @Deprecated + public TwintDetails recurringDetailReference(String recurringDetailReference) { + this.recurringDetailReference = recurringDetailReference; + return this; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + * @return recurringDetailReference + * + * @deprecated since Adyen Checkout API v49 + * Use `storedPaymentMethodId` instead. + */ + @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 since Adyen Checkout API v49 + * Use `storedPaymentMethodId` instead. + */ + @Deprecated + @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRecurringDetailReference(String recurringDetailReference) { + this.recurringDetailReference = recurringDetailReference; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + * + * @param storedPaymentMethodId + * @return the current {@code TwintDetails} instance, allowing for method chaining + */ + public TwintDetails 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; + } + + /** + * The type of flow to initiate. + * + * @param subtype + * @return the current {@code TwintDetails} instance, allowing for method chaining + */ + public TwintDetails subtype(String subtype) { + this.subtype = subtype; + return this; + } + + /** + * The type of flow to initiate. + * @return subtype + */ + @ApiModelProperty(value = "The type of flow to initiate.") + @JsonProperty(JSON_PROPERTY_SUBTYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSubtype() { + return subtype; + } + + /** + * The type of flow to initiate. + * + * @param subtype + */ + @JsonProperty(JSON_PROPERTY_SUBTYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubtype(String subtype) { + this.subtype = subtype; + } + + /** + * The payment method type. + * + * @param type + * @return the current {@code TwintDetails} instance, allowing for method chaining + */ + public TwintDetails type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The payment method type. + * @return type + */ + @ApiModelProperty(value = "The payment method type.") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + /** + * The payment method type. + * + * @param type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Return true if this TwintDetails object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwintDetails twintDetails = (TwintDetails) o; + return Objects.equals(this.checkoutAttemptId, twintDetails.checkoutAttemptId) && + Objects.equals(this.recurringDetailReference, twintDetails.recurringDetailReference) && + Objects.equals(this.storedPaymentMethodId, twintDetails.storedPaymentMethodId) && + Objects.equals(this.subtype, twintDetails.subtype) && + Objects.equals(this.type, twintDetails.type); + } + + @Override + public int hashCode() { + return Objects.hash(checkoutAttemptId, recurringDetailReference, storedPaymentMethodId, subtype, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwintDetails {\n"); + sb.append(" checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n"); + sb.append(" recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n"); + sb.append(" storedPaymentMethodId: ").append(toIndentedString(storedPaymentMethodId)).append("\n"); + sb.append(" subtype: ").append(toIndentedString(subtype)).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 TwintDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of TwintDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to TwintDetails + */ + public static TwintDetails fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TwintDetails.class); + } +/** + * Convert an instance of TwintDetails to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +}