From fe821b508929fda3bb01133c6ffa74e7e4c6ad1a Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Tue, 21 Jan 2025 17:29:06 +0000 Subject: [PATCH] false[adyen-sdk-automation] automated change --- .../adyen/model/balanceplatform/Balance.java | 8 +- .../model/checkout/AdditionalDataAirline.java | 42 +-- .../model/checkout/AdditionalDataCommon.java | 80 ++++- .../adyen/model/checkout/AffirmDetails.java | 207 ++++++++++++ .../model/checkout/CheckoutPaymentMethod.java | 112 ++++++- .../adyen/model/checkout/PayPayDetails.java | 298 ++++++++++++++++++ .../adyen/model/checkout/PaymentDetails.java | 2 - .../java/com/adyen/model/checkout/Split.java | 2 + .../model/configurationwebhooks/Balance.java | 8 +- .../model/payment/AdditionalDataAirline.java | 42 +-- .../model/payment/AdditionalDataCommon.java | 80 ++++- .../ReportNotificationData.java | 41 ++- .../service/PosTerminalManagementApi.java | 30 ++ 13 files changed, 893 insertions(+), 59 deletions(-) create mode 100644 src/main/java/com/adyen/model/checkout/AffirmDetails.java create mode 100644 src/main/java/com/adyen/model/checkout/PayPayDetails.java diff --git a/src/main/java/com/adyen/model/balanceplatform/Balance.java b/src/main/java/com/adyen/model/balanceplatform/Balance.java index 958d645ec..361f8f1bf 100644 --- a/src/main/java/com/adyen/model/balanceplatform/Balance.java +++ b/src/main/java/com/adyen/model/balanceplatform/Balance.java @@ -91,7 +91,7 @@ public void setAvailable(Long available) { } /** - * The sum of transactions that have already been settled. + * The sum of the transactions that have already been settled. * * @param balance * @return the current {@code Balance} instance, allowing for method chaining @@ -102,10 +102,10 @@ public Balance balance(Long balance) { } /** - * The sum of transactions that have already been settled. + * The sum of the transactions that have already been settled. * @return balance */ - @ApiModelProperty(required = true, value = "The sum of transactions that have already been settled.") + @ApiModelProperty(required = true, value = "The sum of the transactions that have already been settled.") @JsonProperty(JSON_PROPERTY_BALANCE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getBalance() { @@ -113,7 +113,7 @@ public Long getBalance() { } /** - * The sum of transactions that have already been settled. + * The sum of the transactions that have already been settled. * * @param balance */ diff --git a/src/main/java/com/adyen/model/checkout/AdditionalDataAirline.java b/src/main/java/com/adyen/model/checkout/AdditionalDataAirline.java index 555d27684..4b1a88b64 100644 --- a/src/main/java/com/adyen/model/checkout/AdditionalDataAirline.java +++ b/src/main/java/com/adyen/model/checkout/AdditionalDataAirline.java @@ -53,7 +53,7 @@ AdditionalDataAirline.JSON_PROPERTY_AIRLINE_PASSENGER_DATE_OF_BIRTH, AdditionalDataAirline.JSON_PROPERTY_AIRLINE_PASSENGER_FIRST_NAME, AdditionalDataAirline.JSON_PROPERTY_AIRLINE_PASSENGER_LAST_NAME, - AdditionalDataAirline.JSON_PROPERTY_AIRLINE_PASSENGER_TELEPHONE_NUMBER, + AdditionalDataAirline.JSON_PROPERTY_AIRLINE_PASSENGER_PHONE_NUMBER, AdditionalDataAirline.JSON_PROPERTY_AIRLINE_PASSENGER_TRAVELLER_TYPE, AdditionalDataAirline.JSON_PROPERTY_AIRLINE_PASSENGER_NAME, AdditionalDataAirline.JSON_PROPERTY_AIRLINE_TICKET_ISSUE_ADDRESS, @@ -129,8 +129,8 @@ public class AdditionalDataAirline { public static final String JSON_PROPERTY_AIRLINE_PASSENGER_LAST_NAME = "airline.passenger.last_name"; private String airlinePassengerLastName; - public static final String JSON_PROPERTY_AIRLINE_PASSENGER_TELEPHONE_NUMBER = "airline.passenger.telephone_number"; - private String airlinePassengerTelephoneNumber; + public static final String JSON_PROPERTY_AIRLINE_PASSENGER_PHONE_NUMBER = "airline.passenger.phone_number"; + private String airlinePassengerPhoneNumber; public static final String JSON_PROPERTY_AIRLINE_PASSENGER_TRAVELLER_TYPE = "airline.passenger.traveller_type"; private String airlinePassengerTravellerType; @@ -880,36 +880,36 @@ public void setAirlinePassengerLastName(String airlinePassengerLastName) { } /** - * The passenger's telephone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters + * The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters * - * @param airlinePassengerTelephoneNumber + * @param airlinePassengerPhoneNumber * @return the current {@code AdditionalDataAirline} instance, allowing for method chaining */ - public AdditionalDataAirline airlinePassengerTelephoneNumber(String airlinePassengerTelephoneNumber) { - this.airlinePassengerTelephoneNumber = airlinePassengerTelephoneNumber; + public AdditionalDataAirline airlinePassengerPhoneNumber(String airlinePassengerPhoneNumber) { + this.airlinePassengerPhoneNumber = airlinePassengerPhoneNumber; return this; } /** - * The passenger's telephone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters - * @return airlinePassengerTelephoneNumber + * The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters + * @return airlinePassengerPhoneNumber */ - @ApiModelProperty(value = "The passenger's telephone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters") - @JsonProperty(JSON_PROPERTY_AIRLINE_PASSENGER_TELEPHONE_NUMBER) + @ApiModelProperty(value = "The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters") + @JsonProperty(JSON_PROPERTY_AIRLINE_PASSENGER_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAirlinePassengerTelephoneNumber() { - return airlinePassengerTelephoneNumber; + public String getAirlinePassengerPhoneNumber() { + return airlinePassengerPhoneNumber; } /** - * The passenger's telephone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters + * The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters * - * @param airlinePassengerTelephoneNumber + * @param airlinePassengerPhoneNumber */ - @JsonProperty(JSON_PROPERTY_AIRLINE_PASSENGER_TELEPHONE_NUMBER) + @JsonProperty(JSON_PROPERTY_AIRLINE_PASSENGER_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAirlinePassengerTelephoneNumber(String airlinePassengerTelephoneNumber) { - this.airlinePassengerTelephoneNumber = airlinePassengerTelephoneNumber; + public void setAirlinePassengerPhoneNumber(String airlinePassengerPhoneNumber) { + this.airlinePassengerPhoneNumber = airlinePassengerPhoneNumber; } /** @@ -1144,7 +1144,7 @@ public boolean equals(Object o) { Objects.equals(this.airlinePassengerDateOfBirth, additionalDataAirline.airlinePassengerDateOfBirth) && Objects.equals(this.airlinePassengerFirstName, additionalDataAirline.airlinePassengerFirstName) && Objects.equals(this.airlinePassengerLastName, additionalDataAirline.airlinePassengerLastName) && - Objects.equals(this.airlinePassengerTelephoneNumber, additionalDataAirline.airlinePassengerTelephoneNumber) && + Objects.equals(this.airlinePassengerPhoneNumber, additionalDataAirline.airlinePassengerPhoneNumber) && Objects.equals(this.airlinePassengerTravellerType, additionalDataAirline.airlinePassengerTravellerType) && Objects.equals(this.airlinePassengerName, additionalDataAirline.airlinePassengerName) && Objects.equals(this.airlineTicketIssueAddress, additionalDataAirline.airlineTicketIssueAddress) && @@ -1155,7 +1155,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(airlineAgencyInvoiceNumber, airlineAgencyPlanName, airlineAirlineCode, airlineAirlineDesignatorCode, airlineBoardingFee, airlineComputerizedReservationSystem, airlineCustomerReferenceNumber, airlineDocumentType, airlineFlightDate, airlineIssueDate, airlineLegCarrierCode, airlineLegClassOfTravel, airlineLegDateOfTravel, airlineLegDepartAirport, airlineLegDepartTax, airlineLegDestinationCode, airlineLegFareBaseCode, airlineLegFlightNumber, airlineLegStopOverCode, airlinePassengerDateOfBirth, airlinePassengerFirstName, airlinePassengerLastName, airlinePassengerTelephoneNumber, airlinePassengerTravellerType, airlinePassengerName, airlineTicketIssueAddress, airlineTicketNumber, airlineTravelAgencyCode, airlineTravelAgencyName); + return Objects.hash(airlineAgencyInvoiceNumber, airlineAgencyPlanName, airlineAirlineCode, airlineAirlineDesignatorCode, airlineBoardingFee, airlineComputerizedReservationSystem, airlineCustomerReferenceNumber, airlineDocumentType, airlineFlightDate, airlineIssueDate, airlineLegCarrierCode, airlineLegClassOfTravel, airlineLegDateOfTravel, airlineLegDepartAirport, airlineLegDepartTax, airlineLegDestinationCode, airlineLegFareBaseCode, airlineLegFlightNumber, airlineLegStopOverCode, airlinePassengerDateOfBirth, airlinePassengerFirstName, airlinePassengerLastName, airlinePassengerPhoneNumber, airlinePassengerTravellerType, airlinePassengerName, airlineTicketIssueAddress, airlineTicketNumber, airlineTravelAgencyCode, airlineTravelAgencyName); } @Override @@ -1184,7 +1184,7 @@ public String toString() { sb.append(" airlinePassengerDateOfBirth: ").append(toIndentedString(airlinePassengerDateOfBirth)).append("\n"); sb.append(" airlinePassengerFirstName: ").append(toIndentedString(airlinePassengerFirstName)).append("\n"); sb.append(" airlinePassengerLastName: ").append(toIndentedString(airlinePassengerLastName)).append("\n"); - sb.append(" airlinePassengerTelephoneNumber: ").append(toIndentedString(airlinePassengerTelephoneNumber)).append("\n"); + sb.append(" airlinePassengerPhoneNumber: ").append(toIndentedString(airlinePassengerPhoneNumber)).append("\n"); sb.append(" airlinePassengerTravellerType: ").append(toIndentedString(airlinePassengerTravellerType)).append("\n"); sb.append(" airlinePassengerName: ").append(toIndentedString(airlinePassengerName)).append("\n"); sb.append(" airlineTicketIssueAddress: ").append(toIndentedString(airlineTicketIssueAddress)).append("\n"); diff --git a/src/main/java/com/adyen/model/checkout/AdditionalDataCommon.java b/src/main/java/com/adyen/model/checkout/AdditionalDataCommon.java index b9d05c9df..f3dcb9bec 100644 --- a/src/main/java/com/adyen/model/checkout/AdditionalDataCommon.java +++ b/src/main/java/com/adyen/model/checkout/AdditionalDataCommon.java @@ -34,9 +34,11 @@ AdditionalDataCommon.JSON_PROPERTY_REQUESTED_TEST_ERROR_RESPONSE_CODE, AdditionalDataCommon.JSON_PROPERTY_ALLOW_PARTIAL_AUTH, AdditionalDataCommon.JSON_PROPERTY_AUTHORISATION_TYPE, + AdditionalDataCommon.JSON_PROPERTY_AUTO_RESCUE, AdditionalDataCommon.JSON_PROPERTY_CUSTOM_ROUTING_FLAG, AdditionalDataCommon.JSON_PROPERTY_INDUSTRY_USAGE, AdditionalDataCommon.JSON_PROPERTY_MANUAL_CAPTURE, + AdditionalDataCommon.JSON_PROPERTY_MAX_DAYS_TO_RESCUE, AdditionalDataCommon.JSON_PROPERTY_NETWORK_TX_REFERENCE, AdditionalDataCommon.JSON_PROPERTY_OVERWRITE_BRAND, AdditionalDataCommon.JSON_PROPERTY_SUB_MERCHANT_CITY, @@ -59,6 +61,9 @@ public class AdditionalDataCommon { public static final String JSON_PROPERTY_AUTHORISATION_TYPE = "authorisationType"; private String authorisationType; + public static final String JSON_PROPERTY_AUTO_RESCUE = "autoRescue"; + private String autoRescue; + public static final String JSON_PROPERTY_CUSTOM_ROUTING_FLAG = "customRoutingFlag"; private String customRoutingFlag; @@ -103,6 +108,9 @@ public static IndustryUsageEnum fromValue(String value) { public static final String JSON_PROPERTY_MANUAL_CAPTURE = "manualCapture"; private String manualCapture; + public static final String JSON_PROPERTY_MAX_DAYS_TO_RESCUE = "maxDaysToRescue"; + private String maxDaysToRescue; + public static final String JSON_PROPERTY_NETWORK_TX_REFERENCE = "networkTxReference"; private String networkTxReference; @@ -235,6 +243,39 @@ public void setAuthorisationType(String authorisationType) { this.authorisationType = authorisationType; } + /** + * Set to **true** to enable [Auto Rescue](https://docs.adyen.com/online-payments/auto-rescue/) for a transaction. Use the `maxDaysToRescue` to specify a rescue window. + * + * @param autoRescue + * @return the current {@code AdditionalDataCommon} instance, allowing for method chaining + */ + public AdditionalDataCommon autoRescue(String autoRescue) { + this.autoRescue = autoRescue; + return this; + } + + /** + * Set to **true** to enable [Auto Rescue](https://docs.adyen.com/online-payments/auto-rescue/) for a transaction. Use the `maxDaysToRescue` to specify a rescue window. + * @return autoRescue + */ + @ApiModelProperty(value = "Set to **true** to enable [Auto Rescue](https://docs.adyen.com/online-payments/auto-rescue/) for a transaction. Use the `maxDaysToRescue` to specify a rescue window.") + @JsonProperty(JSON_PROPERTY_AUTO_RESCUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAutoRescue() { + return autoRescue; + } + + /** + * Set to **true** to enable [Auto Rescue](https://docs.adyen.com/online-payments/auto-rescue/) for a transaction. Use the `maxDaysToRescue` to specify a rescue window. + * + * @param autoRescue + */ + @JsonProperty(JSON_PROPERTY_AUTO_RESCUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAutoRescue(String autoRescue) { + this.autoRescue = autoRescue; + } + /** * Allows you to determine or override the acquirer account that should be used for the transaction. If you need to process a payment with an acquirer different from a default one, you can set up a corresponding configuration on the Adyen payments platform. Then you can pass a custom routing flag in a payment request's additional data to target a specific acquirer. To enable this functionality, contact [Support](https://www.adyen.help/hc/en-us/requests/new). * @@ -334,6 +375,39 @@ public void setManualCapture(String manualCapture) { this.manualCapture = manualCapture; } + /** + * The rescue window for a transaction, in days, when `autoRescue` is set to **true**. You can specify a value between 1 and 48. * For [cards](https://docs.adyen.com/online-payments/auto-rescue/cards/), the default is one calendar month. * For [SEPA](https://docs.adyen.com/online-payments/auto-rescue/sepa/), the default is 42 days. + * + * @param maxDaysToRescue + * @return the current {@code AdditionalDataCommon} instance, allowing for method chaining + */ + public AdditionalDataCommon maxDaysToRescue(String maxDaysToRescue) { + this.maxDaysToRescue = maxDaysToRescue; + return this; + } + + /** + * The rescue window for a transaction, in days, when `autoRescue` is set to **true**. You can specify a value between 1 and 48. * For [cards](https://docs.adyen.com/online-payments/auto-rescue/cards/), the default is one calendar month. * For [SEPA](https://docs.adyen.com/online-payments/auto-rescue/sepa/), the default is 42 days. + * @return maxDaysToRescue + */ + @ApiModelProperty(value = "The rescue window for a transaction, in days, when `autoRescue` is set to **true**. You can specify a value between 1 and 48. * For [cards](https://docs.adyen.com/online-payments/auto-rescue/cards/), the default is one calendar month. * For [SEPA](https://docs.adyen.com/online-payments/auto-rescue/sepa/), the default is 42 days.") + @JsonProperty(JSON_PROPERTY_MAX_DAYS_TO_RESCUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMaxDaysToRescue() { + return maxDaysToRescue; + } + + /** + * The rescue window for a transaction, in days, when `autoRescue` is set to **true**. You can specify a value between 1 and 48. * For [cards](https://docs.adyen.com/online-payments/auto-rescue/cards/), the default is one calendar month. * For [SEPA](https://docs.adyen.com/online-payments/auto-rescue/sepa/), the default is 42 days. + * + * @param maxDaysToRescue + */ + @JsonProperty(JSON_PROPERTY_MAX_DAYS_TO_RESCUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxDaysToRescue(String maxDaysToRescue) { + this.maxDaysToRescue = maxDaysToRescue; + } + /** * Allows you to link the transaction to the original or previous one in a subscription/card-on-file chain. This field is required for token-based transactions where Adyen does not tokenize the card. Transaction identifier from card schemes, for example, Mastercard Trace ID or the Visa Transaction ID. Submit the original transaction ID of the contract in your payment request if you are not tokenizing card details with Adyen and are making a merchant-initiated transaction (MIT) for subsequent charges. Make sure you are sending `shopperInteraction` **ContAuth** and `recurringProcessingModel` **Subscription** or **UnscheduledCardOnFile** to ensure that the transaction is classified as MIT. * @@ -679,9 +753,11 @@ public boolean equals(Object o) { return Objects.equals(this.requestedTestErrorResponseCode, additionalDataCommon.requestedTestErrorResponseCode) && Objects.equals(this.allowPartialAuth, additionalDataCommon.allowPartialAuth) && Objects.equals(this.authorisationType, additionalDataCommon.authorisationType) && + Objects.equals(this.autoRescue, additionalDataCommon.autoRescue) && Objects.equals(this.customRoutingFlag, additionalDataCommon.customRoutingFlag) && Objects.equals(this.industryUsage, additionalDataCommon.industryUsage) && Objects.equals(this.manualCapture, additionalDataCommon.manualCapture) && + Objects.equals(this.maxDaysToRescue, additionalDataCommon.maxDaysToRescue) && Objects.equals(this.networkTxReference, additionalDataCommon.networkTxReference) && Objects.equals(this.overwriteBrand, additionalDataCommon.overwriteBrand) && Objects.equals(this.subMerchantCity, additionalDataCommon.subMerchantCity) && @@ -696,7 +772,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(requestedTestErrorResponseCode, allowPartialAuth, authorisationType, customRoutingFlag, industryUsage, manualCapture, networkTxReference, overwriteBrand, subMerchantCity, subMerchantCountry, subMerchantID, subMerchantName, subMerchantPostalCode, subMerchantState, subMerchantStreet, subMerchantTaxId); + return Objects.hash(requestedTestErrorResponseCode, allowPartialAuth, authorisationType, autoRescue, customRoutingFlag, industryUsage, manualCapture, maxDaysToRescue, networkTxReference, overwriteBrand, subMerchantCity, subMerchantCountry, subMerchantID, subMerchantName, subMerchantPostalCode, subMerchantState, subMerchantStreet, subMerchantTaxId); } @Override @@ -706,9 +782,11 @@ public String toString() { sb.append(" requestedTestErrorResponseCode: ").append(toIndentedString(requestedTestErrorResponseCode)).append("\n"); sb.append(" allowPartialAuth: ").append(toIndentedString(allowPartialAuth)).append("\n"); sb.append(" authorisationType: ").append(toIndentedString(authorisationType)).append("\n"); + sb.append(" autoRescue: ").append(toIndentedString(autoRescue)).append("\n"); sb.append(" customRoutingFlag: ").append(toIndentedString(customRoutingFlag)).append("\n"); sb.append(" industryUsage: ").append(toIndentedString(industryUsage)).append("\n"); sb.append(" manualCapture: ").append(toIndentedString(manualCapture)).append("\n"); + sb.append(" maxDaysToRescue: ").append(toIndentedString(maxDaysToRescue)).append("\n"); sb.append(" networkTxReference: ").append(toIndentedString(networkTxReference)).append("\n"); sb.append(" overwriteBrand: ").append(toIndentedString(overwriteBrand)).append("\n"); sb.append(" subMerchantCity: ").append(toIndentedString(subMerchantCity)).append("\n"); diff --git a/src/main/java/com/adyen/model/checkout/AffirmDetails.java b/src/main/java/com/adyen/model/checkout/AffirmDetails.java new file mode 100644 index 000000000..829ead18f --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/AffirmDetails.java @@ -0,0 +1,207 @@ +/* + * 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; + + +/** + * AffirmDetails + */ +@JsonPropertyOrder({ + AffirmDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID, + AffirmDetails.JSON_PROPERTY_TYPE +}) + +public class AffirmDetails { + public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId"; + private String checkoutAttemptId; + + /** + * **affirm** + */ + public enum TypeEnum { + AFFIRM("affirm"); + + 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 AffirmDetails() { + } + + /** + * The checkout attempt identifier. + * + * @param checkoutAttemptId + * @return the current {@code AffirmDetails} instance, allowing for method chaining + */ + public AffirmDetails 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; + } + + /** + * **affirm** + * + * @param type + * @return the current {@code AffirmDetails} instance, allowing for method chaining + */ + public AffirmDetails type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * **affirm** + * @return type + */ + @ApiModelProperty(value = "**affirm**") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + /** + * **affirm** + * + * @param type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Return true if this AffirmDetails object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AffirmDetails affirmDetails = (AffirmDetails) o; + return Objects.equals(this.checkoutAttemptId, affirmDetails.checkoutAttemptId) && + Objects.equals(this.type, affirmDetails.type); + } + + @Override + public int hashCode() { + return Objects.hash(checkoutAttemptId, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AffirmDetails {\n"); + sb.append(" checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).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 AffirmDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of AffirmDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to AffirmDetails + */ + public static AffirmDetails fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AffirmDetails.class); + } +/** + * Convert an instance of AffirmDetails 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 cb51cb952..90b745f58 100644 --- a/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java +++ b/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java @@ -17,6 +17,7 @@ import java.util.Map; import java.util.HashMap; import com.adyen.model.checkout.AchDetails; +import com.adyen.model.checkout.AffirmDetails; import com.adyen.model.checkout.AfterpayDetails; import com.adyen.model.checkout.AmazonPayDetails; import com.adyen.model.checkout.AncvDetails; @@ -47,6 +48,7 @@ import com.adyen.model.checkout.PayByBankAISDirectDebitDetails; import com.adyen.model.checkout.PayByBankDetails; import com.adyen.model.checkout.PayPalDetails; +import com.adyen.model.checkout.PayPayDetails; import com.adyen.model.checkout.PayToDetails; import com.adyen.model.checkout.PayUUpiDetails; import com.adyen.model.checkout.PayWithGoogleDetails; @@ -169,6 +171,34 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c } + // deserialize AffirmDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AffirmDetails.class.equals(Integer.class) || AffirmDetails.class.equals(Long.class) || AffirmDetails.class.equals(Float.class) || AffirmDetails.class.equals(Double.class) || AffirmDetails.class.equals(Boolean.class) || AffirmDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((AffirmDetails.class.equals(Integer.class) || AffirmDetails.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((AffirmDetails.class.equals(Float.class) || AffirmDetails.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (AffirmDetails.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (AffirmDetails.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(AffirmDetails.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(), AffirmDetails.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'AffirmDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AffirmDetails'", e); + } + + // deserialize AfterpayDetails try { boolean attemptParsing = true; @@ -1009,6 +1039,34 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c } + // deserialize PayPayDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PayPayDetails.class.equals(Integer.class) || PayPayDetails.class.equals(Long.class) || PayPayDetails.class.equals(Float.class) || PayPayDetails.class.equals(Double.class) || PayPayDetails.class.equals(Boolean.class) || PayPayDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PayPayDetails.class.equals(Integer.class) || PayPayDetails.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PayPayDetails.class.equals(Float.class) || PayPayDetails.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PayPayDetails.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PayPayDetails.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(PayPayDetails.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(), PayPayDetails.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'PayPayDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PayPayDetails'", e); + } + + // deserialize PayToDetails try { boolean attemptParsing = true; @@ -1547,6 +1605,11 @@ public CheckoutPaymentMethod(AchDetails o) { setActualInstance(o); } + public CheckoutPaymentMethod(AffirmDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public CheckoutPaymentMethod(AfterpayDetails o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1697,6 +1760,11 @@ public CheckoutPaymentMethod(PayPalDetails o) { setActualInstance(o); } + public CheckoutPaymentMethod(PayPayDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public CheckoutPaymentMethod(PayToDetails o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1790,6 +1858,8 @@ public CheckoutPaymentMethod(ZipDetails o) { static { schemas.put("AchDetails", new GenericType() { }); + schemas.put("AffirmDetails", new GenericType() { + }); schemas.put("AfterpayDetails", new GenericType() { }); schemas.put("AmazonPayDetails", new GenericType() { @@ -1850,6 +1920,8 @@ public CheckoutPaymentMethod(ZipDetails o) { }); schemas.put("PayPalDetails", new GenericType() { }); + schemas.put("PayPayDetails", new GenericType() { + }); schemas.put("PayToDetails", new GenericType() { }); schemas.put("PayUUpiDetails", new GenericType() { @@ -1897,7 +1969,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, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails + * AchDetails, AffirmDetails, 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, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, 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). @@ -1909,6 +1981,11 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(AffirmDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(AfterpayDetails.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -2059,6 +2136,11 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(PayPayDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(PayToDetails.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -2149,14 +2231,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, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails"); + throw new RuntimeException("Invalid instance type. Must be AchDetails, AffirmDetails, 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, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, 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, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails + * AchDetails, AffirmDetails, 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, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, 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, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails) + * @return The actual instance (AchDetails, AffirmDetails, 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, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails) */ @Override public Object getActualInstance() { @@ -2174,6 +2256,17 @@ public AchDetails getAchDetails() throws ClassCastException { return (AchDetails)super.getActualInstance(); } + /** + * Get the actual instance of `AffirmDetails`. If the actual instance is not `AffirmDetails`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AffirmDetails` + * @throws ClassCastException if the instance is not `AffirmDetails` + */ + public AffirmDetails getAffirmDetails() throws ClassCastException { + return (AffirmDetails)super.getActualInstance(); + } + /** * Get the actual instance of `AfterpayDetails`. If the actual instance is not `AfterpayDetails`, * the ClassCastException will be thrown. @@ -2504,6 +2597,17 @@ public PayPalDetails getPayPalDetails() throws ClassCastException { return (PayPalDetails)super.getActualInstance(); } + /** + * Get the actual instance of `PayPayDetails`. If the actual instance is not `PayPayDetails`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PayPayDetails` + * @throws ClassCastException if the instance is not `PayPayDetails` + */ + public PayPayDetails getPayPayDetails() throws ClassCastException { + return (PayPayDetails)super.getActualInstance(); + } + /** * Get the actual instance of `PayToDetails`. If the actual instance is not `PayToDetails`, * the ClassCastException will be thrown. diff --git a/src/main/java/com/adyen/model/checkout/PayPayDetails.java b/src/main/java/com/adyen/model/checkout/PayPayDetails.java new file mode 100644 index 000000000..934dd48bd --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/PayPayDetails.java @@ -0,0 +1,298 @@ +/* + * 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; + + +/** + * PayPayDetails + */ +@JsonPropertyOrder({ + PayPayDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID, + PayPayDetails.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE, + PayPayDetails.JSON_PROPERTY_STORED_PAYMENT_METHOD_ID, + PayPayDetails.JSON_PROPERTY_TYPE +}) + +public class PayPayDetails { + 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; + + /** + * **paypay** + */ + public enum TypeEnum { + PAYPAY("paypay"); + + 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 PayPayDetails() { + } + + /** + * The checkout attempt identifier. + * + * @param checkoutAttemptId + * @return the current {@code PayPayDetails} instance, allowing for method chaining + */ + public PayPayDetails 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 PayPayDetails} instance, allowing for method chaining + * + * @deprecated since Adyen Checkout API v49 + * Use `storedPaymentMethodId` instead. + */ + @Deprecated + public PayPayDetails 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 PayPayDetails} instance, allowing for method chaining + */ + public PayPayDetails 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; + } + + /** + * **paypay** + * + * @param type + * @return the current {@code PayPayDetails} instance, allowing for method chaining + */ + public PayPayDetails type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * **paypay** + * @return type + */ + @ApiModelProperty(value = "**paypay**") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + /** + * **paypay** + * + * @param type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Return true if this PayPayDetails object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PayPayDetails payPayDetails = (PayPayDetails) o; + return Objects.equals(this.checkoutAttemptId, payPayDetails.checkoutAttemptId) && + Objects.equals(this.recurringDetailReference, payPayDetails.recurringDetailReference) && + Objects.equals(this.storedPaymentMethodId, payPayDetails.storedPaymentMethodId) && + Objects.equals(this.type, payPayDetails.type); + } + + @Override + public int hashCode() { + return Objects.hash(checkoutAttemptId, recurringDetailReference, storedPaymentMethodId, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayPayDetails {\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(" 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 PayPayDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of PayPayDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to PayPayDetails + */ + public static PayPayDetails fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PayPayDetails.class); + } +/** + * Convert an instance of PayPayDetails 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/PaymentDetails.java b/src/main/java/com/adyen/model/checkout/PaymentDetails.java index 899e7757a..b79db96b0 100644 --- a/src/main/java/com/adyen/model/checkout/PaymentDetails.java +++ b/src/main/java/com/adyen/model/checkout/PaymentDetails.java @@ -53,8 +53,6 @@ public enum TypeEnum { PAYNOW("paynow"), - AFFIRM("affirm"), - AFFIRM_POS("affirm_pos"), TRUSTLY("trustly"), diff --git a/src/main/java/com/adyen/model/checkout/Split.java b/src/main/java/com/adyen/model/checkout/Split.java index f55729528..cbf9b7bf9 100644 --- a/src/main/java/com/adyen/model/checkout/Split.java +++ b/src/main/java/com/adyen/model/checkout/Split.java @@ -84,6 +84,8 @@ public enum TypeEnum { TIP("Tip"), + TOPUP("TopUp"), + VAT("VAT"); private String value; diff --git a/src/main/java/com/adyen/model/configurationwebhooks/Balance.java b/src/main/java/com/adyen/model/configurationwebhooks/Balance.java index 091256560..247ab0dd9 100644 --- a/src/main/java/com/adyen/model/configurationwebhooks/Balance.java +++ b/src/main/java/com/adyen/model/configurationwebhooks/Balance.java @@ -91,7 +91,7 @@ public void setAvailable(Long available) { } /** - * The sum of transactions that have already been settled. + * The sum of the transactions that have already been settled. * * @param balance * @return the current {@code Balance} instance, allowing for method chaining @@ -102,10 +102,10 @@ public Balance balance(Long balance) { } /** - * The sum of transactions that have already been settled. + * The sum of the transactions that have already been settled. * @return balance */ - @ApiModelProperty(required = true, value = "The sum of transactions that have already been settled.") + @ApiModelProperty(required = true, value = "The sum of the transactions that have already been settled.") @JsonProperty(JSON_PROPERTY_BALANCE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getBalance() { @@ -113,7 +113,7 @@ public Long getBalance() { } /** - * The sum of transactions that have already been settled. + * The sum of the transactions that have already been settled. * * @param balance */ diff --git a/src/main/java/com/adyen/model/payment/AdditionalDataAirline.java b/src/main/java/com/adyen/model/payment/AdditionalDataAirline.java index a8fd20d45..c2b19ca20 100644 --- a/src/main/java/com/adyen/model/payment/AdditionalDataAirline.java +++ b/src/main/java/com/adyen/model/payment/AdditionalDataAirline.java @@ -53,7 +53,7 @@ AdditionalDataAirline.JSON_PROPERTY_AIRLINE_PASSENGER_DATE_OF_BIRTH, AdditionalDataAirline.JSON_PROPERTY_AIRLINE_PASSENGER_FIRST_NAME, AdditionalDataAirline.JSON_PROPERTY_AIRLINE_PASSENGER_LAST_NAME, - AdditionalDataAirline.JSON_PROPERTY_AIRLINE_PASSENGER_TELEPHONE_NUMBER, + AdditionalDataAirline.JSON_PROPERTY_AIRLINE_PASSENGER_PHONE_NUMBER, AdditionalDataAirline.JSON_PROPERTY_AIRLINE_PASSENGER_TRAVELLER_TYPE, AdditionalDataAirline.JSON_PROPERTY_AIRLINE_PASSENGER_NAME, AdditionalDataAirline.JSON_PROPERTY_AIRLINE_TICKET_ISSUE_ADDRESS, @@ -129,8 +129,8 @@ public class AdditionalDataAirline { public static final String JSON_PROPERTY_AIRLINE_PASSENGER_LAST_NAME = "airline.passenger.last_name"; private String airlinePassengerLastName; - public static final String JSON_PROPERTY_AIRLINE_PASSENGER_TELEPHONE_NUMBER = "airline.passenger.telephone_number"; - private String airlinePassengerTelephoneNumber; + public static final String JSON_PROPERTY_AIRLINE_PASSENGER_PHONE_NUMBER = "airline.passenger.phone_number"; + private String airlinePassengerPhoneNumber; public static final String JSON_PROPERTY_AIRLINE_PASSENGER_TRAVELLER_TYPE = "airline.passenger.traveller_type"; private String airlinePassengerTravellerType; @@ -880,36 +880,36 @@ public void setAirlinePassengerLastName(String airlinePassengerLastName) { } /** - * The passenger's telephone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters + * The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters * - * @param airlinePassengerTelephoneNumber + * @param airlinePassengerPhoneNumber * @return the current {@code AdditionalDataAirline} instance, allowing for method chaining */ - public AdditionalDataAirline airlinePassengerTelephoneNumber(String airlinePassengerTelephoneNumber) { - this.airlinePassengerTelephoneNumber = airlinePassengerTelephoneNumber; + public AdditionalDataAirline airlinePassengerPhoneNumber(String airlinePassengerPhoneNumber) { + this.airlinePassengerPhoneNumber = airlinePassengerPhoneNumber; return this; } /** - * The passenger's telephone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters - * @return airlinePassengerTelephoneNumber + * The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters + * @return airlinePassengerPhoneNumber */ - @ApiModelProperty(value = "The passenger's telephone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters") - @JsonProperty(JSON_PROPERTY_AIRLINE_PASSENGER_TELEPHONE_NUMBER) + @ApiModelProperty(value = "The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters") + @JsonProperty(JSON_PROPERTY_AIRLINE_PASSENGER_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAirlinePassengerTelephoneNumber() { - return airlinePassengerTelephoneNumber; + public String getAirlinePassengerPhoneNumber() { + return airlinePassengerPhoneNumber; } /** - * The passenger's telephone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters + * The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters * - * @param airlinePassengerTelephoneNumber + * @param airlinePassengerPhoneNumber */ - @JsonProperty(JSON_PROPERTY_AIRLINE_PASSENGER_TELEPHONE_NUMBER) + @JsonProperty(JSON_PROPERTY_AIRLINE_PASSENGER_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAirlinePassengerTelephoneNumber(String airlinePassengerTelephoneNumber) { - this.airlinePassengerTelephoneNumber = airlinePassengerTelephoneNumber; + public void setAirlinePassengerPhoneNumber(String airlinePassengerPhoneNumber) { + this.airlinePassengerPhoneNumber = airlinePassengerPhoneNumber; } /** @@ -1144,7 +1144,7 @@ public boolean equals(Object o) { Objects.equals(this.airlinePassengerDateOfBirth, additionalDataAirline.airlinePassengerDateOfBirth) && Objects.equals(this.airlinePassengerFirstName, additionalDataAirline.airlinePassengerFirstName) && Objects.equals(this.airlinePassengerLastName, additionalDataAirline.airlinePassengerLastName) && - Objects.equals(this.airlinePassengerTelephoneNumber, additionalDataAirline.airlinePassengerTelephoneNumber) && + Objects.equals(this.airlinePassengerPhoneNumber, additionalDataAirline.airlinePassengerPhoneNumber) && Objects.equals(this.airlinePassengerTravellerType, additionalDataAirline.airlinePassengerTravellerType) && Objects.equals(this.airlinePassengerName, additionalDataAirline.airlinePassengerName) && Objects.equals(this.airlineTicketIssueAddress, additionalDataAirline.airlineTicketIssueAddress) && @@ -1155,7 +1155,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(airlineAgencyInvoiceNumber, airlineAgencyPlanName, airlineAirlineCode, airlineAirlineDesignatorCode, airlineBoardingFee, airlineComputerizedReservationSystem, airlineCustomerReferenceNumber, airlineDocumentType, airlineFlightDate, airlineIssueDate, airlineLegCarrierCode, airlineLegClassOfTravel, airlineLegDateOfTravel, airlineLegDepartAirport, airlineLegDepartTax, airlineLegDestinationCode, airlineLegFareBaseCode, airlineLegFlightNumber, airlineLegStopOverCode, airlinePassengerDateOfBirth, airlinePassengerFirstName, airlinePassengerLastName, airlinePassengerTelephoneNumber, airlinePassengerTravellerType, airlinePassengerName, airlineTicketIssueAddress, airlineTicketNumber, airlineTravelAgencyCode, airlineTravelAgencyName); + return Objects.hash(airlineAgencyInvoiceNumber, airlineAgencyPlanName, airlineAirlineCode, airlineAirlineDesignatorCode, airlineBoardingFee, airlineComputerizedReservationSystem, airlineCustomerReferenceNumber, airlineDocumentType, airlineFlightDate, airlineIssueDate, airlineLegCarrierCode, airlineLegClassOfTravel, airlineLegDateOfTravel, airlineLegDepartAirport, airlineLegDepartTax, airlineLegDestinationCode, airlineLegFareBaseCode, airlineLegFlightNumber, airlineLegStopOverCode, airlinePassengerDateOfBirth, airlinePassengerFirstName, airlinePassengerLastName, airlinePassengerPhoneNumber, airlinePassengerTravellerType, airlinePassengerName, airlineTicketIssueAddress, airlineTicketNumber, airlineTravelAgencyCode, airlineTravelAgencyName); } @Override @@ -1184,7 +1184,7 @@ public String toString() { sb.append(" airlinePassengerDateOfBirth: ").append(toIndentedString(airlinePassengerDateOfBirth)).append("\n"); sb.append(" airlinePassengerFirstName: ").append(toIndentedString(airlinePassengerFirstName)).append("\n"); sb.append(" airlinePassengerLastName: ").append(toIndentedString(airlinePassengerLastName)).append("\n"); - sb.append(" airlinePassengerTelephoneNumber: ").append(toIndentedString(airlinePassengerTelephoneNumber)).append("\n"); + sb.append(" airlinePassengerPhoneNumber: ").append(toIndentedString(airlinePassengerPhoneNumber)).append("\n"); sb.append(" airlinePassengerTravellerType: ").append(toIndentedString(airlinePassengerTravellerType)).append("\n"); sb.append(" airlinePassengerName: ").append(toIndentedString(airlinePassengerName)).append("\n"); sb.append(" airlineTicketIssueAddress: ").append(toIndentedString(airlineTicketIssueAddress)).append("\n"); diff --git a/src/main/java/com/adyen/model/payment/AdditionalDataCommon.java b/src/main/java/com/adyen/model/payment/AdditionalDataCommon.java index 29897e35e..055f4a8fe 100644 --- a/src/main/java/com/adyen/model/payment/AdditionalDataCommon.java +++ b/src/main/java/com/adyen/model/payment/AdditionalDataCommon.java @@ -34,9 +34,11 @@ AdditionalDataCommon.JSON_PROPERTY_REQUESTED_TEST_ERROR_RESPONSE_CODE, AdditionalDataCommon.JSON_PROPERTY_ALLOW_PARTIAL_AUTH, AdditionalDataCommon.JSON_PROPERTY_AUTHORISATION_TYPE, + AdditionalDataCommon.JSON_PROPERTY_AUTO_RESCUE, AdditionalDataCommon.JSON_PROPERTY_CUSTOM_ROUTING_FLAG, AdditionalDataCommon.JSON_PROPERTY_INDUSTRY_USAGE, AdditionalDataCommon.JSON_PROPERTY_MANUAL_CAPTURE, + AdditionalDataCommon.JSON_PROPERTY_MAX_DAYS_TO_RESCUE, AdditionalDataCommon.JSON_PROPERTY_NETWORK_TX_REFERENCE, AdditionalDataCommon.JSON_PROPERTY_OVERWRITE_BRAND, AdditionalDataCommon.JSON_PROPERTY_SUB_MERCHANT_CITY, @@ -59,6 +61,9 @@ public class AdditionalDataCommon { public static final String JSON_PROPERTY_AUTHORISATION_TYPE = "authorisationType"; private String authorisationType; + public static final String JSON_PROPERTY_AUTO_RESCUE = "autoRescue"; + private String autoRescue; + public static final String JSON_PROPERTY_CUSTOM_ROUTING_FLAG = "customRoutingFlag"; private String customRoutingFlag; @@ -103,6 +108,9 @@ public static IndustryUsageEnum fromValue(String value) { public static final String JSON_PROPERTY_MANUAL_CAPTURE = "manualCapture"; private String manualCapture; + public static final String JSON_PROPERTY_MAX_DAYS_TO_RESCUE = "maxDaysToRescue"; + private String maxDaysToRescue; + public static final String JSON_PROPERTY_NETWORK_TX_REFERENCE = "networkTxReference"; private String networkTxReference; @@ -235,6 +243,39 @@ public void setAuthorisationType(String authorisationType) { this.authorisationType = authorisationType; } + /** + * Set to **true** to enable [Auto Rescue](https://docs.adyen.com/online-payments/auto-rescue/) for a transaction. Use the `maxDaysToRescue` to specify a rescue window. + * + * @param autoRescue + * @return the current {@code AdditionalDataCommon} instance, allowing for method chaining + */ + public AdditionalDataCommon autoRescue(String autoRescue) { + this.autoRescue = autoRescue; + return this; + } + + /** + * Set to **true** to enable [Auto Rescue](https://docs.adyen.com/online-payments/auto-rescue/) for a transaction. Use the `maxDaysToRescue` to specify a rescue window. + * @return autoRescue + */ + @ApiModelProperty(value = "Set to **true** to enable [Auto Rescue](https://docs.adyen.com/online-payments/auto-rescue/) for a transaction. Use the `maxDaysToRescue` to specify a rescue window.") + @JsonProperty(JSON_PROPERTY_AUTO_RESCUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAutoRescue() { + return autoRescue; + } + + /** + * Set to **true** to enable [Auto Rescue](https://docs.adyen.com/online-payments/auto-rescue/) for a transaction. Use the `maxDaysToRescue` to specify a rescue window. + * + * @param autoRescue + */ + @JsonProperty(JSON_PROPERTY_AUTO_RESCUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAutoRescue(String autoRescue) { + this.autoRescue = autoRescue; + } + /** * Allows you to determine or override the acquirer account that should be used for the transaction. If you need to process a payment with an acquirer different from a default one, you can set up a corresponding configuration on the Adyen payments platform. Then you can pass a custom routing flag in a payment request's additional data to target a specific acquirer. To enable this functionality, contact [Support](https://www.adyen.help/hc/en-us/requests/new). * @@ -334,6 +375,39 @@ public void setManualCapture(String manualCapture) { this.manualCapture = manualCapture; } + /** + * The rescue window for a transaction, in days, when `autoRescue` is set to **true**. You can specify a value between 1 and 48. * For [cards](https://docs.adyen.com/online-payments/auto-rescue/cards/), the default is one calendar month. * For [SEPA](https://docs.adyen.com/online-payments/auto-rescue/sepa/), the default is 42 days. + * + * @param maxDaysToRescue + * @return the current {@code AdditionalDataCommon} instance, allowing for method chaining + */ + public AdditionalDataCommon maxDaysToRescue(String maxDaysToRescue) { + this.maxDaysToRescue = maxDaysToRescue; + return this; + } + + /** + * The rescue window for a transaction, in days, when `autoRescue` is set to **true**. You can specify a value between 1 and 48. * For [cards](https://docs.adyen.com/online-payments/auto-rescue/cards/), the default is one calendar month. * For [SEPA](https://docs.adyen.com/online-payments/auto-rescue/sepa/), the default is 42 days. + * @return maxDaysToRescue + */ + @ApiModelProperty(value = "The rescue window for a transaction, in days, when `autoRescue` is set to **true**. You can specify a value between 1 and 48. * For [cards](https://docs.adyen.com/online-payments/auto-rescue/cards/), the default is one calendar month. * For [SEPA](https://docs.adyen.com/online-payments/auto-rescue/sepa/), the default is 42 days.") + @JsonProperty(JSON_PROPERTY_MAX_DAYS_TO_RESCUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMaxDaysToRescue() { + return maxDaysToRescue; + } + + /** + * The rescue window for a transaction, in days, when `autoRescue` is set to **true**. You can specify a value between 1 and 48. * For [cards](https://docs.adyen.com/online-payments/auto-rescue/cards/), the default is one calendar month. * For [SEPA](https://docs.adyen.com/online-payments/auto-rescue/sepa/), the default is 42 days. + * + * @param maxDaysToRescue + */ + @JsonProperty(JSON_PROPERTY_MAX_DAYS_TO_RESCUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxDaysToRescue(String maxDaysToRescue) { + this.maxDaysToRescue = maxDaysToRescue; + } + /** * Allows you to link the transaction to the original or previous one in a subscription/card-on-file chain. This field is required for token-based transactions where Adyen does not tokenize the card. Transaction identifier from card schemes, for example, Mastercard Trace ID or the Visa Transaction ID. Submit the original transaction ID of the contract in your payment request if you are not tokenizing card details with Adyen and are making a merchant-initiated transaction (MIT) for subsequent charges. Make sure you are sending `shopperInteraction` **ContAuth** and `recurringProcessingModel` **Subscription** or **UnscheduledCardOnFile** to ensure that the transaction is classified as MIT. * @@ -679,9 +753,11 @@ public boolean equals(Object o) { return Objects.equals(this.requestedTestErrorResponseCode, additionalDataCommon.requestedTestErrorResponseCode) && Objects.equals(this.allowPartialAuth, additionalDataCommon.allowPartialAuth) && Objects.equals(this.authorisationType, additionalDataCommon.authorisationType) && + Objects.equals(this.autoRescue, additionalDataCommon.autoRescue) && Objects.equals(this.customRoutingFlag, additionalDataCommon.customRoutingFlag) && Objects.equals(this.industryUsage, additionalDataCommon.industryUsage) && Objects.equals(this.manualCapture, additionalDataCommon.manualCapture) && + Objects.equals(this.maxDaysToRescue, additionalDataCommon.maxDaysToRescue) && Objects.equals(this.networkTxReference, additionalDataCommon.networkTxReference) && Objects.equals(this.overwriteBrand, additionalDataCommon.overwriteBrand) && Objects.equals(this.subMerchantCity, additionalDataCommon.subMerchantCity) && @@ -696,7 +772,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(requestedTestErrorResponseCode, allowPartialAuth, authorisationType, customRoutingFlag, industryUsage, manualCapture, networkTxReference, overwriteBrand, subMerchantCity, subMerchantCountry, subMerchantID, subMerchantName, subMerchantPostalCode, subMerchantState, subMerchantStreet, subMerchantTaxId); + return Objects.hash(requestedTestErrorResponseCode, allowPartialAuth, authorisationType, autoRescue, customRoutingFlag, industryUsage, manualCapture, maxDaysToRescue, networkTxReference, overwriteBrand, subMerchantCity, subMerchantCountry, subMerchantID, subMerchantName, subMerchantPostalCode, subMerchantState, subMerchantStreet, subMerchantTaxId); } @Override @@ -706,9 +782,11 @@ public String toString() { sb.append(" requestedTestErrorResponseCode: ").append(toIndentedString(requestedTestErrorResponseCode)).append("\n"); sb.append(" allowPartialAuth: ").append(toIndentedString(allowPartialAuth)).append("\n"); sb.append(" authorisationType: ").append(toIndentedString(authorisationType)).append("\n"); + sb.append(" autoRescue: ").append(toIndentedString(autoRescue)).append("\n"); sb.append(" customRoutingFlag: ").append(toIndentedString(customRoutingFlag)).append("\n"); sb.append(" industryUsage: ").append(toIndentedString(industryUsage)).append("\n"); sb.append(" manualCapture: ").append(toIndentedString(manualCapture)).append("\n"); + sb.append(" maxDaysToRescue: ").append(toIndentedString(maxDaysToRescue)).append("\n"); sb.append(" networkTxReference: ").append(toIndentedString(networkTxReference)).append("\n"); sb.append(" overwriteBrand: ").append(toIndentedString(overwriteBrand)).append("\n"); sb.append(" subMerchantCity: ").append(toIndentedString(subMerchantCity)).append("\n"); diff --git a/src/main/java/com/adyen/model/reportwebhooks/ReportNotificationData.java b/src/main/java/com/adyen/model/reportwebhooks/ReportNotificationData.java index a428959d4..9f961532a 100644 --- a/src/main/java/com/adyen/model/reportwebhooks/ReportNotificationData.java +++ b/src/main/java/com/adyen/model/reportwebhooks/ReportNotificationData.java @@ -39,6 +39,7 @@ ReportNotificationData.JSON_PROPERTY_CREATION_DATE, ReportNotificationData.JSON_PROPERTY_DOWNLOAD_URL, ReportNotificationData.JSON_PROPERTY_FILE_NAME, + ReportNotificationData.JSON_PROPERTY_ID, ReportNotificationData.JSON_PROPERTY_REPORT_TYPE }) @@ -61,6 +62,9 @@ public class ReportNotificationData { public static final String JSON_PROPERTY_FILE_NAME = "fileName"; private String fileName; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + public static final String JSON_PROPERTY_REPORT_TYPE = "reportType"; private String reportType; @@ -265,6 +269,39 @@ public void setFileName(String fileName) { this.fileName = fileName; } + /** + * The ID of the resource. + * + * @param id + * @return the current {@code ReportNotificationData} instance, allowing for method chaining + */ + public ReportNotificationData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the resource. + * @return id + */ + @ApiModelProperty(value = "The ID of the resource.") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + /** + * The ID of the resource. + * + * @param id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + /** * The type of report. Possible values: - `balanceplatform_accounting_interactive_report` - `balanceplatform_accounting_report` - `balanceplatform_balance_report` - `balanceplatform_fee_report` - `balanceplatform_payment_instrument_report` - `balanceplatform_payout_report` - `balanceplatform_statement_report` * @@ -316,12 +353,13 @@ public boolean equals(Object o) { Objects.equals(this.creationDate, reportNotificationData.creationDate) && Objects.equals(this.downloadUrl, reportNotificationData.downloadUrl) && Objects.equals(this.fileName, reportNotificationData.fileName) && + Objects.equals(this.id, reportNotificationData.id) && Objects.equals(this.reportType, reportNotificationData.reportType); } @Override public int hashCode() { - return Objects.hash(accountHolder, balanceAccount, balancePlatform, creationDate, downloadUrl, fileName, reportType); + return Objects.hash(accountHolder, balanceAccount, balancePlatform, creationDate, downloadUrl, fileName, id, reportType); } @Override @@ -334,6 +372,7 @@ public String toString() { sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); sb.append(" downloadUrl: ").append(toIndentedString(downloadUrl)).append("\n"); sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" reportType: ").append(toIndentedString(reportType)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/adyen/service/PosTerminalManagementApi.java b/src/main/java/com/adyen/service/PosTerminalManagementApi.java index 1b454c6b6..9b4c1368b 100644 --- a/src/main/java/com/adyen/service/PosTerminalManagementApi.java +++ b/src/main/java/com/adyen/service/PosTerminalManagementApi.java @@ -64,7 +64,10 @@ public PosTerminalManagementApi(Client client, String baseURL) { * @param assignTerminalsRequest {@link AssignTerminalsRequest } (required) * @return {@link AssignTerminalsResponse } * @throws ApiException if fails to make API call + * @deprecated since POS Terminal Management API v1 + * Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview). */ + @Deprecated public AssignTerminalsResponse assignTerminals(AssignTerminalsRequest assignTerminalsRequest) throws ApiException, IOException { return assignTerminals(assignTerminalsRequest, null); } @@ -76,7 +79,10 @@ public AssignTerminalsResponse assignTerminals(AssignTerminalsRequest assignTerm * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) * @return {@link AssignTerminalsResponse } * @throws ApiException if fails to make API call + * @deprecated since POS Terminal Management API v1 + * Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview). */ + @Deprecated public AssignTerminalsResponse assignTerminals(AssignTerminalsRequest assignTerminalsRequest, RequestOptions requestOptions) throws ApiException, IOException { String requestBody = assignTerminalsRequest.toJson(); @@ -91,7 +97,10 @@ public AssignTerminalsResponse assignTerminals(AssignTerminalsRequest assignTerm * @param findTerminalRequest {@link FindTerminalRequest } (required) * @return {@link FindTerminalResponse } * @throws ApiException if fails to make API call + * @deprecated since POS Terminal Management API v1 + * Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview). */ + @Deprecated public FindTerminalResponse findTerminal(FindTerminalRequest findTerminalRequest) throws ApiException, IOException { return findTerminal(findTerminalRequest, null); } @@ -103,7 +112,10 @@ public FindTerminalResponse findTerminal(FindTerminalRequest findTerminalRequest * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) * @return {@link FindTerminalResponse } * @throws ApiException if fails to make API call + * @deprecated since POS Terminal Management API v1 + * Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview). */ + @Deprecated public FindTerminalResponse findTerminal(FindTerminalRequest findTerminalRequest, RequestOptions requestOptions) throws ApiException, IOException { String requestBody = findTerminalRequest.toJson(); @@ -118,7 +130,10 @@ public FindTerminalResponse findTerminal(FindTerminalRequest findTerminalRequest * @param getStoresUnderAccountRequest {@link GetStoresUnderAccountRequest } (required) * @return {@link GetStoresUnderAccountResponse } * @throws ApiException if fails to make API call + * @deprecated since POS Terminal Management API v1 + * Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview). */ + @Deprecated public GetStoresUnderAccountResponse getStoresUnderAccount(GetStoresUnderAccountRequest getStoresUnderAccountRequest) throws ApiException, IOException { return getStoresUnderAccount(getStoresUnderAccountRequest, null); } @@ -130,7 +145,10 @@ public GetStoresUnderAccountResponse getStoresUnderAccount(GetStoresUnderAccount * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) * @return {@link GetStoresUnderAccountResponse } * @throws ApiException if fails to make API call + * @deprecated since POS Terminal Management API v1 + * Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview). */ + @Deprecated public GetStoresUnderAccountResponse getStoresUnderAccount(GetStoresUnderAccountRequest getStoresUnderAccountRequest, RequestOptions requestOptions) throws ApiException, IOException { String requestBody = getStoresUnderAccountRequest.toJson(); @@ -145,7 +163,10 @@ public GetStoresUnderAccountResponse getStoresUnderAccount(GetStoresUnderAccount * @param getTerminalDetailsRequest {@link GetTerminalDetailsRequest } (required) * @return {@link GetTerminalDetailsResponse } * @throws ApiException if fails to make API call + * @deprecated since POS Terminal Management API v1 + * Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview). */ + @Deprecated public GetTerminalDetailsResponse getTerminalDetails(GetTerminalDetailsRequest getTerminalDetailsRequest) throws ApiException, IOException { return getTerminalDetails(getTerminalDetailsRequest, null); } @@ -157,7 +178,10 @@ public GetTerminalDetailsResponse getTerminalDetails(GetTerminalDetailsRequest g * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) * @return {@link GetTerminalDetailsResponse } * @throws ApiException if fails to make API call + * @deprecated since POS Terminal Management API v1 + * Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview). */ + @Deprecated public GetTerminalDetailsResponse getTerminalDetails(GetTerminalDetailsRequest getTerminalDetailsRequest, RequestOptions requestOptions) throws ApiException, IOException { String requestBody = getTerminalDetailsRequest.toJson(); @@ -172,7 +196,10 @@ public GetTerminalDetailsResponse getTerminalDetails(GetTerminalDetailsRequest g * @param getTerminalsUnderAccountRequest {@link GetTerminalsUnderAccountRequest } (required) * @return {@link GetTerminalsUnderAccountResponse } * @throws ApiException if fails to make API call + * @deprecated since POS Terminal Management API v1 + * Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview). */ + @Deprecated public GetTerminalsUnderAccountResponse getTerminalsUnderAccount(GetTerminalsUnderAccountRequest getTerminalsUnderAccountRequest) throws ApiException, IOException { return getTerminalsUnderAccount(getTerminalsUnderAccountRequest, null); } @@ -184,7 +211,10 @@ public GetTerminalsUnderAccountResponse getTerminalsUnderAccount(GetTerminalsUnd * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) * @return {@link GetTerminalsUnderAccountResponse } * @throws ApiException if fails to make API call + * @deprecated since POS Terminal Management API v1 + * Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview). */ + @Deprecated public GetTerminalsUnderAccountResponse getTerminalsUnderAccount(GetTerminalsUnderAccountRequest getTerminalsUnderAccountRequest, RequestOptions requestOptions) throws ApiException, IOException { String requestBody = getTerminalsUnderAccountRequest.toJson();