diff --git a/pom.xml b/pom.xml index 75d692e91..2de72582b 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,6 @@ 1.6.16 2.2.30 3.1.0 - 2.3.1 5.5 @@ -62,6 +61,7 @@ 3.2.1 3.5.2 1.34.1 + 3.4.1 scm:git:git@github.com:Adyen/adyen-java-api-library.git @@ -237,7 +237,40 @@ maven-surefire-plugin ${maven-surefire-plugin-version} + + org.apache.maven.plugins + maven-enforcer-plugin + ${maven-enforcer-version} + + + enforce-jakarta-compliance + + enforce + + + + + + javax.xml.bind:jaxb-api + + javax.servlet:servlet-api + javax.servlet:javax.servlet-api + javax.persistence:javax.persistence-api + javax.persistence:persistence-api + javax.validation:validation-api + javax.inject:javax.inject + + + STOP! A legacy javax.* dependency was detected + + + + true + + + + @@ -282,11 +315,6 @@ jakarta.ws.rs-api ${jakarta.ws.rs-api-version} - - javax.xml.bind - jaxb-api - ${jaxb-api-version} - org.apache.httpcomponents.client5 httpclient5 diff --git a/src/main/java/com/adyen/model/nexo/AbortRequest.java b/src/main/java/com/adyen/model/nexo/AbortRequest.java index c60a8b2fe..30828c17b 100644 --- a/src/main/java/com/adyen/model/nexo/AbortRequest.java +++ b/src/main/java/com/adyen/model/nexo/AbortRequest.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Body of the Abort Request messageType. -- Usage: It conveys Information requested for @@ -29,24 +26,20 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "AbortRequest", - propOrder = {"messageReference", "abortReason", "displayOutput"}) public class AbortRequest { /** The Message reference. */ - @XmlElement(name = "MessageReference", required = true) + @SerializedName("MessageReference") @Schema(description = "Identification of a previous POI transaction.") protected MessageReference messageReference; /** The Abort reason. */ - @XmlElement(name = "AbortReason", required = true) + @SerializedName("AbortReason") @Schema(description = "Reason of aborting a transaction") protected String abortReason; /** The Display output. */ - @XmlElement(name = "DisplayOutput") + @SerializedName("DisplayOutput") @Schema( description = "Information to display and the way to process the display. --Rule: To display an abort message to the Customer") diff --git a/src/main/java/com/adyen/model/nexo/AccountType.java b/src/main/java/com/adyen/model/nexo/AccountType.java index 0aa43b561..55765a136 100644 --- a/src/main/java/com/adyen/model/nexo/AccountType.java +++ b/src/main/java/com/adyen/model/nexo/AccountType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for AccountType. @@ -26,47 +24,45 @@ * </simpleType> * */ -@XmlType(name = "AccountType") -@XmlEnum public enum AccountType { /** Default account */ - @XmlEnumValue("Default") + @SerializedName("Default") @Schema(description = "Default account") DEFAULT("Default"), /** Savings account */ - @XmlEnumValue("Savings") + @SerializedName("Savings") @Schema(description = "Savings account") SAVINGS("Savings"), /** Checking account */ - @XmlEnumValue("Checking") + @SerializedName("Checking") @Schema(description = "Checking account") CHECKING("Checking"), /** Credit card account */ - @XmlEnumValue("CreditCard") + @SerializedName("CreditCard") @Schema(description = "Credit card account") CREDIT_CARD("CreditCard"), /** Universal account */ - @XmlEnumValue("Universal") + @SerializedName("Universal") @Schema(description = "Universal account") UNIVERSAL("Universal"), /** Investment account */ - @XmlEnumValue("Investment") + @SerializedName("Investment") @Schema(description = "Investment account") INVESTMENT("Investment"), /** Card totals */ - @XmlEnumValue("CardTotals") + @SerializedName("CardTotals") @Schema(description = "Card totals") CARD_TOTALS("CardTotals"), /** e-Purse card account */ - @XmlEnumValue("EpurseCard") + @SerializedName("EpurseCard") @Schema(description = "e-Purse card account") EPURSE_CARD("EpurseCard"); diff --git a/src/main/java/com/adyen/model/nexo/AdminRequest.java b/src/main/java/com/adyen/model/nexo/AdminRequest.java index 1beaf55e9..59b35af6b 100644 --- a/src/main/java/com/adyen/model/nexo/AdminRequest.java +++ b/src/main/java/com/adyen/model/nexo/AdminRequest.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Custom Admin Request messageType. -- Usage: Empty @@ -25,14 +22,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "AdminRequest", - propOrder = {"serviceIdentification"}) public class AdminRequest { /** The Service identification. */ - @XmlElement(name = "ServiceIdentification") + @SerializedName("ServiceIdentification") @Schema(description = "Identification of the administrative service to process.") protected String serviceIdentification; diff --git a/src/main/java/com/adyen/model/nexo/AdminResponse.java b/src/main/java/com/adyen/model/nexo/AdminResponse.java index 0bef2c800..643afdc0b 100644 --- a/src/main/java/com/adyen/model/nexo/AdminResponse.java +++ b/src/main/java/com/adyen/model/nexo/AdminResponse.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Custom Admin Response messageType. -- Usage: It conveys the result of @@ -26,14 +23,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "AdminResponse", - propOrder = {"response"}) public class AdminResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; diff --git a/src/main/java/com/adyen/model/nexo/AlgorithmIdentifier.java b/src/main/java/com/adyen/model/nexo/AlgorithmIdentifier.java index 84ff33b74..14acdddbc 100644 --- a/src/main/java/com/adyen/model/nexo/AlgorithmIdentifier.java +++ b/src/main/java/com/adyen/model/nexo/AlgorithmIdentifier.java @@ -1,9 +1,6 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import com.google.gson.annotations.SerializedName; /** * Definition: Identification of a cryptographic algorithm -- Reference: RFC 3880: Internet X.509 @@ -27,18 +24,14 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "AlgorithmIdentifier", - propOrder = {"parameter"}) public class AlgorithmIdentifier { /** The Parameter. */ - @XmlElement(name = "Parameter") + @SerializedName("Parameter") protected Parameter parameter; /** The Algorithm. */ - @XmlElement(name = "Algorithm", required = true) + @SerializedName("Algorithm") protected AlgorithmType algorithm; /** diff --git a/src/main/java/com/adyen/model/nexo/AlgorithmType.java b/src/main/java/com/adyen/model/nexo/AlgorithmType.java index 21f1c276a..4bec5efa4 100644 --- a/src/main/java/com/adyen/model/nexo/AlgorithmType.java +++ b/src/main/java/com/adyen/model/nexo/AlgorithmType.java @@ -1,9 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for AlgorithmType. @@ -26,68 +24,66 @@ * </simpleType> * */ -@XmlType(name = "AlgorithmType") -@XmlEnum public enum AlgorithmType { /** * Retail CBC-MAC (cf. ISO 9807, ANSI X9.19) - (OID: iso(1) member-body(2) fr(250) type-org (1) * gie-cb(79) algorithm(10) epas(1) 2) */ - @XmlEnumValue("id-retail-cbc-mac") + @SerializedName("id-retail-cbc-mac") ID_RETAIL_CBC_MAC("id-retail-cbc-mac"), /** * Retail-CBC-MAC with SHA-256 - (OID: iso(1) member-body(2) fr(250) type-org (1) gie-cb(79) * algorithm(10) epas(1) 3) */ - @XmlEnumValue("id-retail-cbc-mac-sha-256") + @SerializedName("id-retail-cbc-mac-sha-256") ID_RETAIL_CBC_MAC_SHA_256("id-retail-cbc-mac-sha-256"), /** * The UKPT or Master Session Key key encryption - (OID: iso(1) member-body(2) fr(250) type-org * (1) gie-cb(79) algorithm(10) epas(1) 4) */ - @XmlEnumValue("id-ukpt-wrap ") + @SerializedName("id-ukpt-wrap ") ID_UKPT_WRAP("id-ukpt-wrap "), /** * DUKPT is specified in ANS X9.24-2004, Annex A, and ISO/DIS 13492-2006. - (OID: iso(1) * member-body(2) fr(250) type-org (1) gie-cb(79) algorithm(10) epas(1) 1) */ - @XmlEnumValue("id-dukpt-wrap") + @SerializedName("id-dukpt-wrap") ID_DUKPT_WRAP("id-dukpt-wrap"), /** * Triple DES ECB encryption with double length key (112 Bit) as defined in FIPS PUB 46-3 - (OID: * iso(1) member-body(2) fr(250) type-org (1) gie-cb(79) */ - @XmlEnumValue("des-ede3-ecb") + @SerializedName("des-ede3-ecb") DES_EDE_3_ECB("des-ede3-ecb"), /** * Triple DES CBC encryption with double length key (112 Bit) as defined in FIPS PUB 46-3 - (OID: * iso(1) member-body(2) us(840) rsadsi(113549) */ - @XmlEnumValue("des-ede3-cbc") + @SerializedName("des-ede3-cbc") DES_EDE_3_CBC("des-ede3-cbc"), /** Message Digest Algorithm SHA-256 as defined in FIPS 180-1 and 2 - (ISO20022 Label: SHA256) */ - @XmlEnumValue("id-sha256") + @SerializedName("id-sha256") ID_SHA_256("id-sha256"), /** * Signature Algorithms SHA-256 with RSA - (OID: iso(1) member-body(2) us(840) rsadsi(113549) * pkcs(1) pkcs-1(1) 11) */ - @XmlEnumValue("sha256WithRSAEncryption") + @SerializedName("sha256WithRSAEncryption") SHA_256_WITH_RSA_ENCRYPTION("sha256WithRSAEncryption"), /** * Key Transport Algorithm RSA - (OID: iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) * pkcs-1(1) 1) */ - @XmlEnumValue("rsaEncryption") + @SerializedName("rsaEncryption") RSA_ENCRYPTION("rsaEncryption"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/AlignmentType.java b/src/main/java/com/adyen/model/nexo/AlignmentType.java index 639eceb96..4db57455d 100644 --- a/src/main/java/com/adyen/model/nexo/AlignmentType.java +++ b/src/main/java/com/adyen/model/nexo/AlignmentType.java @@ -1,9 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for AlignmentType. @@ -21,21 +19,19 @@ * </simpleType> * */ -@XmlType(name = "AlignmentType") -@XmlEnum public enum AlignmentType { /** Left alignment type. */ - @XmlEnumValue("Left") + @SerializedName("Left") LEFT("Left"), /** Right alignment type. */ - @XmlEnumValue("Right") + @SerializedName("Right") RIGHT("Right"), /** Centred alignment type. */ - @XmlEnumValue("Centred") + @SerializedName("Centred") CENTRED("Centred"), /** Justified alignment type. */ - @XmlEnumValue("Justified") + @SerializedName("Justified") JUSTIFIED("Justified"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/AllowedProduct.java b/src/main/java/com/adyen/model/nexo/AllowedProduct.java index 17a98c363..d791036c8 100644 --- a/src/main/java/com/adyen/model/nexo/AllowedProduct.java +++ b/src/main/java/com/adyen/model/nexo/AllowedProduct.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Product that are payable by the payment card. -- Usage: Restriction of product @@ -29,29 +26,25 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "AllowedProduct", - propOrder = {"productLabel", "additionalProductInfo"}) public class AllowedProduct { /** The Product label. */ - @XmlElement(name = "ProductLabel") + @SerializedName("ProductLabel") @Schema(description = "Product name of an item purchased with the transaction.") protected String productLabel; /** The Additional product info. */ - @XmlElement(name = "AdditionalProductInfo") + @SerializedName("AdditionalProductInfo") @Schema(description = "Additionl information related to the line item.") protected String additionalProductInfo; /** The Product code. */ - @XmlElement(name = "ProductCode", required = true) + @SerializedName("ProductCode") @Schema(description = "Product code of item purchased with the transaction.") protected String productCode; /** The Ean upc. */ - @XmlElement(name = "EanUpc") + @SerializedName("EanUpc") @Schema(description = "Standard product code of item purchased with the transaction.") protected String eanUpc; diff --git a/src/main/java/com/adyen/model/nexo/Amount.java b/src/main/java/com/adyen/model/nexo/Amount.java index 1f5687d1a..7d1d13ae3 100644 --- a/src/main/java/com/adyen/model/nexo/Amount.java +++ b/src/main/java/com/adyen/model/nexo/Amount.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Common amount definition with currency -- Usage: Decimal unsigned amount with @@ -24,18 +21,14 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "Amount", - propOrder = {"amountValue", "currency"}) public class Amount { /** The Value. */ - @XmlElement(name = "AmountValue") + @SerializedName("AmountValue") protected BigDecimal amountValue; /** The Currency. */ - @XmlElement(name = "Currency") + @SerializedName("Currency") protected String currency; /** diff --git a/src/main/java/com/adyen/model/nexo/AmountsReq.java b/src/main/java/com/adyen/model/nexo/AmountsReq.java index ba94d8898..6f9dabc91 100644 --- a/src/main/java/com/adyen/model/nexo/AmountsReq.java +++ b/src/main/java/com/adyen/model/nexo/AmountsReq.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Various amounts related to the payment and loyalty request from the Sale System. -- @@ -34,59 +31,57 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AmountsReq") public class AmountsReq { /** The Currency. */ - @XmlElement(name = "Currency", required = true) + @SerializedName("Currency") @Schema(description = "Currency of a monetary amount.") protected String currency; /** The Requested amount. */ - @XmlElement(name = "RequestedAmount") + @SerializedName("RequestedAmount") @Schema( description = "Amount requested by the Sale for the payment. --Rule: Absent if the maximum amount is unknown for a OneTimeReservationThe value has to be greater than 0.") protected BigDecimal requestedAmount; /** The Cash back amount. */ - @XmlElement(name = "CashBackAmount") + @SerializedName("CashBackAmount") @Schema( description = "The cash-back part of the amount requested by the Sale for the payment. --Rule: if payment with cash back. This data has to be performed by the POI. If cash back is not allowed, the payment is") protected BigDecimal cashBackAmount; /** The Tip amount. */ - @XmlElement(name = "TipAmount") + @SerializedName("TipAmount") @Schema( description = "Amount paid for a tip. --Rule: If payment with tip requested by the Sale System.") protected BigDecimal tipAmount; /** The Paid amount. */ - @XmlElement(name = "PaidAmount") + @SerializedName("PaidAmount") @Schema( description = "Amount already paid amount in case of split payment. --Rule: If SplitPaymentFlag is True (split amount of a split payment).") protected BigDecimal paidAmount; /** The Minimum amount to deliver. */ - @XmlElement(name = "MinimumAmountToDeliver") + @SerializedName("MinimumAmountToDeliver") @Schema( description = "Minimum amount the Sale System is allowed to deliver for this payment. --Rule: if unknown maximum amount for a OneTimeReservation or minimum amount requested by the Sale System") protected BigDecimal minimumAmountToDeliver; /** The Maximum cash back amount. */ - @XmlElement(name = "MaximumCashBackAmount") + @SerializedName("MaximumCashBackAmount") @Schema( description = "Maximum amount which could be requested for cash-back to the Sale System. --Rule: Maximum amount which could be requested for cash-back to the Sale System.") protected BigDecimal maximumCashBackAmount; /** The Minimum split amount. */ - @XmlElement(name = "MinimumSplitAmount") + @SerializedName("MinimumSplitAmount") @Schema( description = "Minimum amount of a split, which could be requested by a Customer. --Rule: Minimum amount of a split, which could be requested.") diff --git a/src/main/java/com/adyen/model/nexo/AmountsResp.java b/src/main/java/com/adyen/model/nexo/AmountsResp.java index 5820cb401..bf550ec0e 100644 --- a/src/main/java/com/adyen/model/nexo/AmountsResp.java +++ b/src/main/java/com/adyen/model/nexo/AmountsResp.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Various amounts related to the payment response from the POI System. -- Usage: @@ -32,41 +29,39 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AmountsResp") public class AmountsResp { /** The Currency. */ - @XmlElement(name = "Currency") + @SerializedName("Currency") @Schema(description = "Currency of a monetary amount. --Rule: Mandatory for currency conversion.") protected String currency; /** The Authorized amount. */ - @XmlElement(name = "AuthorizedAmount", required = true) + @SerializedName("AuthorizedAmount") @Schema(description = "The amount authorized by the Acquirer for the payment transaction.") protected BigDecimal authorizedAmount; /** The Total rebates amount. */ - @XmlElement(name = "TotalRebatesAmount") + @SerializedName("TotalRebatesAmount") @Schema( description = "Sum of rebates in amount (total amount or line item amount) for all the loyalty programs.") protected BigDecimal totalRebatesAmount; /** The Total fees amount. */ - @XmlElement(name = "TotalFeesAmount") + @SerializedName("TotalFeesAmount") @Schema(description = "Total amount of financial fees.") protected BigDecimal totalFeesAmount; /** The Cash back amount. */ - @XmlElement(name = "CashBackAmount") + @SerializedName("CashBackAmount") @Schema( description = "The cash-back part of the amount requested by the Sale for the payment. --Rule: if payment with cash back") protected BigDecimal cashBackAmount; /** The Tip amount. */ - @XmlElement(name = "TipAmount") + @SerializedName("TipAmount") @Schema( description = "Amount paid for a tip. --Rule: If payment with tip requested by the Sale System.") diff --git a/src/main/java/com/adyen/model/nexo/AreaSize.java b/src/main/java/com/adyen/model/nexo/AreaSize.java index 474653b14..95e92483d 100644 --- a/src/main/java/com/adyen/model/nexo/AreaSize.java +++ b/src/main/java/com/adyen/model/nexo/AreaSize.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Size of an area -- Usage: Contain the size of the pad area where the signature is @@ -26,17 +23,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AreaSize") public class AreaSize { /** The X. */ - @XmlElement(name = "X", required = true) + @SerializedName("X") @Schema(description = "Abscissa of a point coordinates.") protected String x; /** The Y. */ - @XmlElement(name = "Y", required = true) + @SerializedName("Y") @Schema(description = "Ordinate of a point coordinates.") protected String y; diff --git a/src/main/java/com/adyen/model/nexo/AttributeType.java b/src/main/java/com/adyen/model/nexo/AttributeType.java index a6801acf7..a3d9a6c28 100644 --- a/src/main/java/com/adyen/model/nexo/AttributeType.java +++ b/src/main/java/com/adyen/model/nexo/AttributeType.java @@ -1,9 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for AttributeType. @@ -22,28 +20,26 @@ * </simpleType> * */ -@XmlType(name = "AttributeType") -@XmlEnum public enum AttributeType { /** Common Name - (OID: joint-iso-ccitt(2) ds(5) 4 3) */ - @XmlEnumValue("id-at-commonName") + @SerializedName("id-at-commonName") ID_AT_COMMON_NAME("id-at-commonName"), /** Locality - (OID: joint-iso-ccitt(2) ds(5) 4 7) */ - @XmlEnumValue("id-at-localityName") + @SerializedName("id-at-localityName") ID_AT_LOCALITY_NAME("id-at-localityName"), /** Organization Name - (OID: joint-iso-ccitt(2) ds(5) 4 10) */ - @XmlEnumValue("id-at-organizationName") + @SerializedName("id-at-organizationName") ID_AT_ORGANIZATION_NAME("id-at-organizationName"), /** Organization Unit Name - (OID: joint-iso-ccitt(2) ds(5) 4 11) */ - @XmlEnumValue("id-at-organizationalUnitName") + @SerializedName("id-at-organizationalUnitName") ID_AT_ORGANIZATIONAL_UNIT_NAME("id-at-organizationalUnitName"), /** Country Name - (OID: joint-iso-ccitt(2) ds(5) 4 6) */ - @XmlEnumValue("id-at-countryName") + @SerializedName("id-at-countryName") ID_AT_COUNTRY_NAME("id-at-countryName"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/AuthenticatedData.java b/src/main/java/com/adyen/model/nexo/AuthenticatedData.java index b5637eaf3..a7cc4e660 100644 --- a/src/main/java/com/adyen/model/nexo/AuthenticatedData.java +++ b/src/main/java/com/adyen/model/nexo/AuthenticatedData.java @@ -1,12 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElements; -import javax.xml.bind.annotation.XmlType; /** * Definition: Cryptographic Message Syntax (CMS) data structure containing MACed data with @@ -37,33 +33,26 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "AuthenticatedData", - propOrder = {"keyTransportOrKEK", "macAlgorithm", "encapsulatedContent"}) public class AuthenticatedData { /** The Key transport or kek. */ - @XmlElements({ - @XmlElement(name = "KeyTransport", type = KeyTransport.class), - @XmlElement(name = "KEK", type = KEK.class) - }) + @SerializedName("keyTransportOrKEK") protected List keyTransportOrKEK; /** The Mac algorithm. */ - @XmlElement(name = "MACAlgorithm", required = true) + @SerializedName("MACAlgorithm") protected AlgorithmIdentifier macAlgorithm; /** The Encapsulated content. */ - @XmlElement(name = "EncapsulatedContent", required = true) + @SerializedName("EncapsulatedContent") protected EncapsulatedContent encapsulatedContent; /** The Version. */ - @XmlElement(name = "Version") + @SerializedName("Version") protected VersionType version; /** The Mac. */ - @XmlElement(name = "MAC", required = true) + @SerializedName("MAC") protected byte[] mac; /** diff --git a/src/main/java/com/adyen/model/nexo/AuthenticationMethodType.java b/src/main/java/com/adyen/model/nexo/AuthenticationMethodType.java index f2c4a604e..335c38e77 100644 --- a/src/main/java/com/adyen/model/nexo/AuthenticationMethodType.java +++ b/src/main/java/com/adyen/model/nexo/AuthenticationMethodType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for AuthenticationMethodType. @@ -29,62 +27,60 @@ * </simpleType> * */ -@XmlType(name = "AuthenticationMethodType") -@XmlEnum public enum AuthenticationMethodType { /** Authentication bypassed by the merchant. */ - @XmlEnumValue("Bypass") + @SerializedName("Bypass") @Schema(description = "Authentication bypassed by the merchant.") BYPASS("Bypass"), /** Manual verification, for example passport or drivers license. */ - @XmlEnumValue("ManualVerification") + @SerializedName("ManualVerification") @Schema(description = "Manual verification, for example passport or drivers license.") MANUAL_VERIFICATION("ManualVerification"), /** Merchant-related authentication. */ - @XmlEnumValue("MerchantAuthentication") + @SerializedName("MerchantAuthentication") @Schema(description = "Merchant-related authentication.") MERCHANT_AUTHENTICATION("MerchantAuthentication"), /** Off-line PIN authentication (Personal Identification Number). */ - @XmlEnumValue("OfflinePIN") + @SerializedName("OfflinePIN") @Schema(description = "Off-line PIN authentication (Personal Identification Number).") OFFLINE_PIN("OfflinePIN"), /** On-line PIN authentication (Personal Identification Number). */ - @XmlEnumValue("OnlinePIN") + @SerializedName("OnlinePIN") @Schema(description = "On-line PIN authentication (Personal Identification Number).") ON_LINE_PIN("OnLinePIN", "OnlinePIN"), /** Handwritten paper signature. */ - @XmlEnumValue("PaperSignature") + @SerializedName("PaperSignature") @Schema(description = "Handwritten paper signature.") PAPER_SIGNATURE("PaperSignature"), /** Channel-encrypted transaction. */ - @XmlEnumValue("SecuredChannel") + @SerializedName("SecuredChannel") @Schema(description = "Channel-encrypted transaction.") SECURED_CHANNEL("SecuredChannel"), /** Secure electronic transaction with cardholder X.509 certificate. */ - @XmlEnumValue("SecureCertificate") + @SerializedName("SecureCertificate") @Schema(description = "Secure electronic transaction with cardholder X.509 certificate.") SECURE_CERTIFICATE("SecureCertificate"), /** Secure electronic transaction without cardholder certificate. */ - @XmlEnumValue("SecureNoCertificate") + @SerializedName("SecureNoCertificate") @Schema(description = "Secure electronic transaction without cardholder certificate.") SECURE_NO_CERTIFICATE("SecureNoCertificate"), /** Electronic signature capture (handwritten signature). */ - @XmlEnumValue("SignatureCapture") + @SerializedName("SignatureCapture") @Schema(description = "Electronic signature capture (handwritten signature).") SIGNATURE_CAPTURE("SignatureCapture"), /** Authentication method is performed unknown. */ - @XmlEnumValue("UnknownMethod") + @SerializedName("UnknownMethod") @Schema(description = "Authentication method is performed unknown.") UNKNOWN_METHOD("UnknownMethod"); diff --git a/src/main/java/com/adyen/model/nexo/BalanceInquiryRequest.java b/src/main/java/com/adyen/model/nexo/BalanceInquiryRequest.java index fb06d1e43..8a7198c05 100644 --- a/src/main/java/com/adyen/model/nexo/BalanceInquiryRequest.java +++ b/src/main/java/com/adyen/model/nexo/BalanceInquiryRequest.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Balance Inquiry Request messageType. -- Usage: It conveys Information @@ -27,19 +24,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "BalanceInquiryRequest", - propOrder = {"paymentAccountReq", "loyaltyAccountReq"}) public class BalanceInquiryRequest { /** The Payment account req. */ - @XmlElement(name = "PaymentAccountReq") + @SerializedName("PaymentAccountReq") @Schema(description = "Data related to the account pointed by the payment card") protected PaymentAccountReq paymentAccountReq; /** The Loyalty account req. */ - @XmlElement(name = "LoyaltyAccountReq") + @SerializedName("LoyaltyAccountReq") @Schema(description = "Data related to a requested Loyalty program or account.") protected LoyaltyAccountReq loyaltyAccountReq; diff --git a/src/main/java/com/adyen/model/nexo/BalanceInquiryResponse.java b/src/main/java/com/adyen/model/nexo/BalanceInquiryResponse.java index 68fb8affe..3747782b7 100644 --- a/src/main/java/com/adyen/model/nexo/BalanceInquiryResponse.java +++ b/src/main/java/com/adyen/model/nexo/BalanceInquiryResponse.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Balance Inquiry Response messageType. -- Usage: It conveys the balance @@ -28,26 +25,22 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "BalanceInquiryResponse", - propOrder = {"response", "paymentAccountStatus", "loyaltyAccountStatus"}) public class BalanceInquiryResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Payment account status. */ - @XmlElement(name = "PaymentAccountStatus") + @SerializedName("PaymentAccountStatus") @Schema( description = "Data related to the result of a Balance Inquiry request. --Rule: If BalanceInquiryRequest. PaymentAccount present") protected PaymentAccountStatus paymentAccountStatus; /** The Loyalty account status. */ - @XmlElement(name = "LoyaltyAccountStatus") + @SerializedName("LoyaltyAccountStatus") @Schema( description = "Data related to the result of a loyalty Balance Inquiry. --Rule: If BalanceInquiryRequest. LoyaltyData present") diff --git a/src/main/java/com/adyen/model/nexo/BarcodeType.java b/src/main/java/com/adyen/model/nexo/BarcodeType.java index 5c8f79108..c05f21ac0 100644 --- a/src/main/java/com/adyen/model/nexo/BarcodeType.java +++ b/src/main/java/com/adyen/model/nexo/BarcodeType.java @@ -1,9 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for BarcodeType. @@ -24,29 +22,27 @@ * </simpleType> * */ -@XmlType(name = "BarcodeType") -@XmlEnum public enum BarcodeType { /** Ean 8 barcode type. */ - @XmlEnumValue("EAN8") + @SerializedName("EAN8") EAN_8("EAN8"), /** Ean 13 barcode type. */ - @XmlEnumValue("EAN13") + @SerializedName("EAN13") EAN_13("EAN13"), /** Upca barcode type. */ UPCA("UPCA"), /** Code 25 barcode type. */ - @XmlEnumValue("Code25") + @SerializedName("Code25") CODE_25("Code25"), /** Code 128 barcode type. */ - @XmlEnumValue("Code128") + @SerializedName("Code128") CODE_128("Code128"), /** Pdf 417 barcode type. */ - @XmlEnumValue("PDF417") + @SerializedName("PDF417") PDF_417("PDF417"), /** Qrcode barcode type. */ - @XmlEnumValue("QRCode") + @SerializedName("QRCode") QRCODE("QRCode"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/BatchRequest.java b/src/main/java/com/adyen/model/nexo/BatchRequest.java index 6fd0b55d6..ca901e495 100644 --- a/src/main/java/com/adyen/model/nexo/BatchRequest.java +++ b/src/main/java/com/adyen/model/nexo/BatchRequest.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Batch Request messageType. -- Usage: Message to send Payment, Loyalty @@ -30,19 +27,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "BatchRequest", - propOrder = {"transactionToPerform"}) public class BatchRequest { /** The Transaction to perform. */ - @XmlElement(name = "TransactionToPerform") + @SerializedName("TransactionToPerform") @Schema(description = "Content of the Batch Request message") protected List transactionToPerform; /** The Remove all flag. */ - @XmlElement(name = "RemoveAllFlag") + @SerializedName("RemoveAllFlag") @Schema( description = "A flag requesting to remove the transactions stored and not yet performed. default False.") diff --git a/src/main/java/com/adyen/model/nexo/BatchResponse.java b/src/main/java/com/adyen/model/nexo/BatchResponse.java index d7489a27c..eef55e1de 100644 --- a/src/main/java/com/adyen/model/nexo/BatchResponse.java +++ b/src/main/java/com/adyen/model/nexo/BatchResponse.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Batch Response messageType. -- Usage: It conveys either the response @@ -30,19 +27,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "BatchResponse", - propOrder = {"response", "performedTransaction"}) public class BatchResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Performed transaction. */ - @XmlElement(name = "PerformedTransaction") + @SerializedName("PerformedTransaction") @Schema(description = "Result of performed transactions.") protected List performedTransaction; diff --git a/src/main/java/com/adyen/model/nexo/CapturedSignature.java b/src/main/java/com/adyen/model/nexo/CapturedSignature.java index 83cf813f0..ae622e9c3 100644 --- a/src/main/java/com/adyen/model/nexo/CapturedSignature.java +++ b/src/main/java/com/adyen/model/nexo/CapturedSignature.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Numeric value of a handwritten signature. -- Usage: Contain the value of a @@ -31,19 +28,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "CapturedSignature", - propOrder = {"areaSize", "signaturePoint"}) public class CapturedSignature { /** The Area size. */ - @XmlElement(name = "AreaSize") + @SerializedName("AreaSize") @Schema(description = "Size of an area") protected AreaSize areaSize; /** The Signature point. */ - @XmlElement(name = "SignaturePoint", required = true) + @SerializedName("SignaturePoint") @Schema(description = "Coordinates of a point where the pen changes direction or lift.") protected List signaturePoint; diff --git a/src/main/java/com/adyen/model/nexo/CardAcquisitionRequest.java b/src/main/java/com/adyen/model/nexo/CardAcquisitionRequest.java index 00b47a08b..20b20550d 100644 --- a/src/main/java/com/adyen/model/nexo/CardAcquisitionRequest.java +++ b/src/main/java/com/adyen/model/nexo/CardAcquisitionRequest.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Card Acquisition Request messageType. -- Usage: It conveys Information @@ -29,19 +26,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "CardAcquisitionRequest", - propOrder = {"saleData", "cardAcquisitionTransaction"}) public class CardAcquisitionRequest { /** The Sale data. */ - @XmlElement(name = "SaleData", required = true) + @SerializedName("SaleData") @Schema(description = "Data related to the Sale System.") protected SaleData saleData; /** The Card acquisition transaction. */ - @XmlElement(name = "CardAcquisitionTransaction", required = true) + @SerializedName("CardAcquisitionTransaction") @Schema(description = "Data related to the payment and loyalty card acquisition.") protected CardAcquisitionTransaction cardAcquisitionTransaction; diff --git a/src/main/java/com/adyen/model/nexo/CardAcquisitionResponse.java b/src/main/java/com/adyen/model/nexo/CardAcquisitionResponse.java index 2dbce5362..ae82180fd 100644 --- a/src/main/java/com/adyen/model/nexo/CardAcquisitionResponse.java +++ b/src/main/java/com/adyen/model/nexo/CardAcquisitionResponse.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Card Acquisition Response messageType. -- Usage: It conveys @@ -36,58 +33,46 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "CardAcquisitionResponse", - propOrder = { - "response", - "saleData", - "poiData", - "paymentBrand", - "paymentInstrumentData", - "loyaltyAccount", - "customerOrder" - }) public class CardAcquisitionResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Sale data. */ - @XmlElement(name = "SaleData", required = true) + @SerializedName("SaleData") @Schema(description = "Data related to the Sale System.") protected SaleData saleData; /** The Poi data. */ - @XmlElement(name = "POIData", required = true) + @SerializedName("POIData") @Schema(description = "Data related to the POI System.") protected POIData poiData; /** The Payment brand. */ - @XmlElement(name = "PaymentBrand") + @SerializedName("PaymentBrand") @Schema( description = "Type of payment card --Rule: Brands available for payment by the card and not chosen by the Customer") protected List paymentBrand; /** The Payment instrument data. */ - @XmlElement(name = "PaymentInstrumentData") + @SerializedName("PaymentInstrumentData") @Schema( description = "Data related to the instrument of payment for the transaction. --Rule: If this type of payment card is configured to send information if the CardAcquisition response") protected PaymentInstrumentData paymentInstrumentData; /** The Loyalty account. */ - @XmlElement(name = "LoyaltyAccount") + @SerializedName("LoyaltyAccount") @Schema( description = "Data related to a loyalty account processed in the transaction. --Rule: If loyalty card selected by the customer") protected List loyaltyAccount; /** The Customer order. */ - @XmlElement(name = "CustomerOrder") + @SerializedName("CustomerOrder") @Schema( description = "Customer order attached to a card, recorded in the POI system. --Rule: If the list of customer orders has been requested.") diff --git a/src/main/java/com/adyen/model/nexo/CardAcquisitionTransaction.java b/src/main/java/com/adyen/model/nexo/CardAcquisitionTransaction.java index b43598d66..84033bee1 100644 --- a/src/main/java/com/adyen/model/nexo/CardAcquisitionTransaction.java +++ b/src/main/java/com/adyen/model/nexo/CardAcquisitionTransaction.java @@ -1,13 +1,10 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the payment and loyalty card acquisition. -- Usage: Elements @@ -37,63 +34,59 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "CardAcquisitionTransaction", - propOrder = {"allowedPaymentBrand", "allowedLoyaltyBrand", "forceEntryMode"}) public class CardAcquisitionTransaction { /** The Allowed payment brand. */ - @XmlElement(name = "AllowedPaymentBrand") + @SerializedName("AllowedPaymentBrand") @Schema( description = "Card payment brands allowed by the Sale System for the payment transaction.") protected List allowedPaymentBrand; /** The Allowed loyalty brand. */ - @XmlElement(name = "AllowedLoyaltyBrand") + @SerializedName("AllowedLoyaltyBrand") @Schema( description = "Loyalty brands or programs allowed by the Sale System for the loyalty transaction.") protected List allowedLoyaltyBrand; /** The Force entry mode. */ - @XmlElement(name = "ForceEntryMode") + @SerializedName("ForceEntryMode") @Schema(description = "Payment instrument entry mode requested by the Sale System.") protected List forceEntryMode; /** The Loyalty handling. */ - @XmlElement(name = "LoyaltyHandling") + @SerializedName("LoyaltyHandling") @Schema(description = "Type of Loyalty processing requested by the Sale System.") protected LoyaltyHandlingType loyaltyHandling; /** The Customer language. */ - @XmlElement(name = "CustomerLanguage") + @SerializedName("CustomerLanguage") @Schema( description = "Language of the Customer --Rule: If the language is selected by the Sale System before the request to the POI.") protected String customerLanguage; /** The Force customer selection flag. */ - @XmlElement(name = "ForceCustomerSelectionFlag") + @SerializedName("ForceCustomerSelectionFlag") @Schema(description = "Indicates if the Customer realises the selection of the card application.") protected Boolean forceCustomerSelectionFlag; /** The Total amount. */ - @XmlElement(name = "TotalAmount") + @SerializedName("TotalAmount") @Schema( description = "Amount of a transaction. --Rule: Mandatory for contactless card, otherwise absent") protected BigDecimal totalAmount; /** The Payment. */ - @XmlElement(name = "PaymentType") + @SerializedName("PaymentType") @Schema( description = "Type of payment transaction. --Rule: Mandatory for contactless card, otherwise absent") protected PaymentType paymentType; /** The Cash back flag. */ - @XmlElement(name = "CashBackFlag") + @SerializedName("CashBackFlag") @Schema( description = "Cash back has been requested with the payment transaction. --Rule: For contactless, True if cash back has been requested, default False. Otherwise absent.") diff --git a/src/main/java/com/adyen/model/nexo/CardData.java b/src/main/java/com/adyen/model/nexo/CardData.java index 17178425d..998ec0d28 100644 --- a/src/main/java/com/adyen/model/nexo/CardData.java +++ b/src/main/java/com/adyen/model/nexo/CardData.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Information related to the payment card used for the transaction. -- Usage: Allows @@ -40,35 +37,24 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "CardData", - propOrder = { - "protectedCardData", - "sensitiveCardData", - "allowedProductCode", - "allowedProduct", - "paymentToken", - "customerOrder" - }) public class CardData { /** The Protected card data. */ - @XmlElement(name = "ProtectedCardData") + @SerializedName("ProtectedCardData") @Schema( description = "Sensitive information related to the payment card, protected by CMS. --Rule: SensitiveCardData protected by CMS EnvelopedData") protected ContentInformation protectedCardData; /** The Sensitive card data. */ - @XmlElement(name = "SensitiveCardData") + @SerializedName("SensitiveCardData") @Schema( description = "Sensitive information related to the payment card, entered or read by the Sale System. --Rule: If structure non empty and unprotected") protected SensitiveCardData sensitiveCardData; /** The Allowed product code. */ - @XmlElement(name = "AllowedProductCode") + @SerializedName("AllowedProductCode") @Schema( description = "Product codes that are payable by the payment card. --Rule: If ErrorCondition is \"PaymentRestriction\", some products are not payable by the payment card (payment response).", @@ -77,51 +63,51 @@ public class CardData { protected List allowedProductCode; /** The Allowed product. */ - @XmlElement(name = "AllowedProduct") + @SerializedName("AllowedProduct") @Schema( description = "Product that are payable by the payment card. --Rule: If the card has restrictions on product that can be purchased (card acquisition or balance inquiry response).") protected List allowedProduct; /** The Payment token. */ - @XmlElement(name = "PaymentToken") + @SerializedName("PaymentToken") @Schema( description = "Surrogate of the PAN (Primary Account Number) of the payment card to identify the payment mean of the customer. --Rule: Present in If requested in CardAcquisitionResponse or PaymentResponse if requested in the request or in the Login") protected PaymentToken paymentToken; /** The Customer order. */ - @XmlElement(name = "CustomerOrder") + @SerializedName("CustomerOrder") @Schema( description = "Customer order attached to a card, recorded in the POI system. --Rule: If the list of customer orders has been requested.") protected List customerOrder; /** The Payment brand. */ - @XmlElement(name = "PaymentBrand") + @SerializedName("PaymentBrand") @Schema(description = "Type of payment card --Rule: If card PAN is readable ") protected String paymentBrand; /** The Masked pan. */ - @XmlElement(name = "MaskedPan") + @SerializedName("MaskedPan") protected String maskedPAN; /** The Payment account ref. */ - @XmlElement(name = "PaymentAccountRef") + @SerializedName("PaymentAccountRef") @Schema( description = "Reference of the PAN, which identifies the PAN or the card uniquely, named also PAR (Payment Account Reference). This --Rule: Mandatory if available.") protected String paymentAccountRef; /** The Entry mode. */ - @XmlElement(name = "EntryMode") + @SerializedName("EntryMode") @Schema( description = "Entry mode of the payment instrument information --Rule: Mandatory in the request") protected List entryMode; /** The Card country code. */ - @XmlElement(name = "CardCountryCode") + @SerializedName("CardCountryCode") @Schema( description = "Country Code attached to the card (3 numerics). --Rule: If available in the card", diff --git a/src/main/java/com/adyen/model/nexo/CardReaderAPDURequest.java b/src/main/java/com/adyen/model/nexo/CardReaderAPDURequest.java index 375f8c4dc..8bea60eac 100644 --- a/src/main/java/com/adyen/model/nexo/CardReaderAPDURequest.java +++ b/src/main/java/com/adyen/model/nexo/CardReaderAPDURequest.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Card Reader APDU Request messageType. -- Usage: It contains the APDU @@ -32,39 +29,35 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "CardReaderAPDURequest", - propOrder = {"apduData"}) public class CardReaderAPDURequest { /** The Apdu data. */ - @XmlElement(name = "APDUData") + @SerializedName("APDUData") @Schema(description = "Data field of the APDU command (Lc + Data)") protected byte[] apduData; /** The Apdu class. */ - @XmlElement(name = "APDUClass", required = true) + @SerializedName("APDUClass") @Schema(description = "Class field of the APDU command (CLA)", minLength = 1, maxLength = 1) protected byte[] apduClass; /** The Apdu instruction. */ - @XmlElement(name = "APDUInstruction", required = true) + @SerializedName("APDUInstruction") @Schema(description = "Instruction field of the APDU command (INS)", minLength = 1, maxLength = 1) protected byte[] apduInstruction; /** The Apdu par 1. */ - @XmlElement(name = "APDUPar1", required = true) + @SerializedName("APDUPar1") @Schema(description = "Parameter 1 field of the APDU command (P1)", minLength = 1, maxLength = 1) protected byte[] apduPar1; /** The Apdu par 2. */ - @XmlElement(name = "APDUPar2", required = true) + @SerializedName("APDUPar2") @Schema(description = "Parameter 2 field of the APDU command(P2)", minLength = 1, maxLength = 1) protected byte[] apduPar2; /** The Apdu expected length. */ - @XmlElement(name = "APDUExpectedLength") + @SerializedName("APDUExpectedLength") @Schema( description = "Expected length of the data field of the APDU response to the command (Le)", minLength = 1, diff --git a/src/main/java/com/adyen/model/nexo/CardReaderAPDUResponse.java b/src/main/java/com/adyen/model/nexo/CardReaderAPDUResponse.java index ce2a1a6ac..5d3f7bb63 100644 --- a/src/main/java/com/adyen/model/nexo/CardReaderAPDUResponse.java +++ b/src/main/java/com/adyen/model/nexo/CardReaderAPDUResponse.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Card Reader APDU Response messageType. -- Usage: It contains the @@ -29,24 +26,20 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "CardReaderAPDUResponse", - propOrder = {"response", "apduData"}) public class CardReaderAPDUResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Apdu data. */ - @XmlElement(name = "APDUData") + @SerializedName("APDUData") @Schema(description = "Data field of the APDU command (Lc + Data)") protected byte[] apduData; /** The Card status words. */ - @XmlElement(name = "CardStatusWords", required = true) + @SerializedName("CardStatusWords") @Schema(description = "Status of a smartcard response to a command (SW1-SW2)") protected byte[] cardStatusWords; diff --git a/src/main/java/com/adyen/model/nexo/CardReaderInitRequest.java b/src/main/java/com/adyen/model/nexo/CardReaderInitRequest.java index cecbeffb5..de6d22d3d 100644 --- a/src/main/java/com/adyen/model/nexo/CardReaderInitRequest.java +++ b/src/main/java/com/adyen/model/nexo/CardReaderInitRequest.java @@ -1,13 +1,10 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Card Reader Init Request messageType. -- Usage: It contains possible @@ -34,34 +31,30 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "CardReaderInitRequest", - propOrder = {"forceEntryMode", "displayOutput"}) public class CardReaderInitRequest { /** The Force entry mode. */ - @XmlElement(name = "ForceEntryMode") + @SerializedName("ForceEntryMode") @Schema(description = "Payment instrument entry mode requested by the Sale System.") protected List forceEntryMode; /** The Display output. */ - @XmlElement(name = "DisplayOutput") + @SerializedName("DisplayOutput") @Schema(description = "Information to display and the way to process the display.") protected DisplayOutput displayOutput; /** The Warm reset flag. */ - @XmlElement(name = "WarmResetFlag") + @SerializedName("WarmResetFlag") @Schema(description = "Flag to request a warm reset on a chip.") protected Boolean warmResetFlag; /** The Leave card flag. */ - @XmlElement(name = "LeaveCardFlag") + @SerializedName("LeaveCardFlag") @Schema(description = "Indicates if the POI has to keep the card in the reader for a smart card.") protected Boolean leaveCardFlag; /** The Max waiting time. */ - @XmlElement(name = "MaxWaitingTime") + @SerializedName("MaxWaitingTime") @Schema(description = "Maximum time to wait for the request processing in seconds.") protected BigInteger maxWaitingTime; diff --git a/src/main/java/com/adyen/model/nexo/CardReaderInitResponse.java b/src/main/java/com/adyen/model/nexo/CardReaderInitResponse.java index c09d3b1e3..47f2d0c90 100644 --- a/src/main/java/com/adyen/model/nexo/CardReaderInitResponse.java +++ b/src/main/java/com/adyen/model/nexo/CardReaderInitResponse.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Card Reader Init Response messageType. -- Usage: It contains the @@ -32,33 +29,29 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "CardReaderInitResponse", - propOrder = {"response", "trackData", "iccResetData"}) public class CardReaderInitResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Track data. */ - @XmlElement(name = "TrackData") + @SerializedName("TrackData") @Schema( description = "Magnetic track or magnetic ink characters line. --Rule: if EntryMode is RFID or MagStripe") protected List trackData; /** The Icc reset data. */ - @XmlElement(name = "ICCResetData") + @SerializedName("ICCResetData") @Schema( description = "Data of a Chip Card related to the reset of the chip. --Rule: if EntryMode is ICC, EMVContactless or SynchronousICC") protected ICCResetData iccResetData; /** The Entry mode. */ - @XmlElement(name = "EntryMode") + @SerializedName("EntryMode") @Schema( description = "Entry mode of the payment instrument information --Rule: RFID, MagStripe, ICC, EMVContactless or SynchronousICC") diff --git a/src/main/java/com/adyen/model/nexo/CardReaderPowerOffRequest.java b/src/main/java/com/adyen/model/nexo/CardReaderPowerOffRequest.java index 7e9b5bf26..95424a9d5 100644 --- a/src/main/java/com/adyen/model/nexo/CardReaderPowerOffRequest.java +++ b/src/main/java/com/adyen/model/nexo/CardReaderPowerOffRequest.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Card Reader Power-Off Request messageType. -- Usage: It contains a @@ -29,19 +26,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "CardReaderPowerOffRequest", - propOrder = {"displayOutput"}) public class CardReaderPowerOffRequest { /** The Display output. */ - @XmlElement(name = "DisplayOutput") + @SerializedName("DisplayOutput") @Schema(description = "Information to display and the way to process the display.") protected DisplayOutput displayOutput; /** The Max waiting time. */ - @XmlElement(name = "MaxWaitingTime") + @SerializedName("MaxWaitingTime") @Schema(description = "Maximum time to wait for the request processing in seconds.") protected BigInteger maxWaitingTime; diff --git a/src/main/java/com/adyen/model/nexo/CardReaderPowerOffResponse.java b/src/main/java/com/adyen/model/nexo/CardReaderPowerOffResponse.java index 395b408e0..c18bdeeec 100644 --- a/src/main/java/com/adyen/model/nexo/CardReaderPowerOffResponse.java +++ b/src/main/java/com/adyen/model/nexo/CardReaderPowerOffResponse.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Card Reader Power-Off Response messageType. -- Usage: It contains the @@ -26,14 +23,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "CardReaderPowerOffResponse", - propOrder = {"response"}) public class CardReaderPowerOffResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; diff --git a/src/main/java/com/adyen/model/nexo/CardholderPIN.java b/src/main/java/com/adyen/model/nexo/CardholderPIN.java index 7ac07e324..0c0b2edf2 100644 --- a/src/main/java/com/adyen/model/nexo/CardholderPIN.java +++ b/src/main/java/com/adyen/model/nexo/CardholderPIN.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Encrypted PIN and related information -- Usage: To request PIN Verify to the POI, or @@ -28,24 +25,20 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "CardholderPIN", - propOrder = {"encrPINBlock"}) public class CardholderPIN { /** The Encr pin block. */ - @XmlElement(name = "EncrPINBlock", required = true) + @SerializedName("EncrPINBlock") @Schema(description = "Encrypted PIN") protected ContentInformation encrPINBlock; /** The Pin format. */ - @XmlElement(name = "PINFormat", required = true) + @SerializedName("PINFormat") @Schema(description = "Identify the format of the PIN before encryption.") protected PINFormatType pinFormat; /** The Additional input. */ - @XmlElement(name = "AdditionalInput") + @SerializedName("AdditionalInput") @Schema( description = "Additional information required to verify the PIN like part of the PAN, or driver ID.") diff --git a/src/main/java/com/adyen/model/nexo/CashHandlingDevice.java b/src/main/java/com/adyen/model/nexo/CashHandlingDevice.java index 279b8520f..41662092f 100644 --- a/src/main/java/com/adyen/model/nexo/CashHandlingDevice.java +++ b/src/main/java/com/adyen/model/nexo/CashHandlingDevice.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Status of cash handling device. -- Usage: Indicate the status and the remaining coins @@ -30,24 +27,20 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "CashHandlingDevice", - propOrder = {"coinsOrBills"}) public class CashHandlingDevice { /** The Coins or bills. */ - @XmlElement(name = "CoinsOrBills", required = true) + @SerializedName("CoinsOrBills") @Schema(description = "Number of coins or bills of a given value.") protected List coinsOrBills; /** The Cash handling ok flag. */ - @XmlElement(name = "CashHandlingOKFlag", required = true) + @SerializedName("CashHandlingOKFlag") @Schema(description = "Indicates if the cash handling device is working and usable.") protected boolean cashHandlingOKFlag; /** The Currency. */ - @XmlElement(name = "Currency", required = true) + @SerializedName("Currency") @Schema(description = "Currency of a monetary amount.") protected String currency; diff --git a/src/main/java/com/adyen/model/nexo/CharacterHeightType.java b/src/main/java/com/adyen/model/nexo/CharacterHeightType.java index 6a0b365ec..07312c476 100644 --- a/src/main/java/com/adyen/model/nexo/CharacterHeightType.java +++ b/src/main/java/com/adyen/model/nexo/CharacterHeightType.java @@ -1,9 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for CharacterHeightType. @@ -20,18 +18,16 @@ * </simpleType> * */ -@XmlType(name = "CharacterHeightType") -@XmlEnum public enum CharacterHeightType { /** Single height character height type. */ - @XmlEnumValue("SingleHeight") + @SerializedName("SingleHeight") SINGLE_HEIGHT("SingleHeight"), /** Double height character height type. */ - @XmlEnumValue("DoubleHeight") + @SerializedName("DoubleHeight") DOUBLE_HEIGHT("DoubleHeight"), /** Half height character height type. */ - @XmlEnumValue("HalfHeight") + @SerializedName("HalfHeight") HALF_HEIGHT("HalfHeight"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/CharacterStyleType.java b/src/main/java/com/adyen/model/nexo/CharacterStyleType.java index 0ecc268ae..ac2a01302 100644 --- a/src/main/java/com/adyen/model/nexo/CharacterStyleType.java +++ b/src/main/java/com/adyen/model/nexo/CharacterStyleType.java @@ -1,9 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for CharacterStyleType. @@ -21,21 +19,19 @@ * </simpleType> * */ -@XmlType(name = "CharacterStyleType") -@XmlEnum public enum CharacterStyleType { /** Normal character style type. */ - @XmlEnumValue("Normal") + @SerializedName("Normal") NORMAL("Normal"), /** Bold character style type. */ - @XmlEnumValue("Bold") + @SerializedName("Bold") BOLD("Bold"), /** Italic character style type. */ - @XmlEnumValue("Italic") + @SerializedName("Italic") ITALIC("Italic"), /** Underlined character style type. */ - @XmlEnumValue("Underlined") + @SerializedName("Underlined") UNDERLINED("Underlined"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/CharacterWidthType.java b/src/main/java/com/adyen/model/nexo/CharacterWidthType.java index c165d90f6..3dda2df76 100644 --- a/src/main/java/com/adyen/model/nexo/CharacterWidthType.java +++ b/src/main/java/com/adyen/model/nexo/CharacterWidthType.java @@ -1,9 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for CharacterWidthType. @@ -19,15 +17,13 @@ * </simpleType> * */ -@XmlType(name = "CharacterWidthType") -@XmlEnum public enum CharacterWidthType { /** Single width character width type. */ - @XmlEnumValue("SingleWidth") + @SerializedName("SingleWidth") SINGLE_WIDTH("SingleWidth"), /** Double width character width type. */ - @XmlEnumValue("DoubleWidth") + @SerializedName("DoubleWidth") DOUBLE_WIDTH("DoubleWidth"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/CheckData.java b/src/main/java/com/adyen/model/nexo/CheckData.java index 83cfb5957..f18846208 100644 --- a/src/main/java/com/adyen/model/nexo/CheckData.java +++ b/src/main/java/com/adyen/model/nexo/CheckData.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Information related to the paper check used for the transaction. -- Usage: Allows the @@ -33,47 +30,43 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "CheckData", - propOrder = {"bankID", "accountNumber", "checkNumber", "trackData", "checkCardNumber"}) public class CheckData { /** The Bank id. */ - @XmlElement(name = "BankID") + @SerializedName("BankID") @Schema(description = "Identification of the bank. --Rule: Mandatory if TrackData absent") protected String bankID; /** The Account number. */ - @XmlElement(name = "AccountNumber") + @SerializedName("AccountNumber") @Schema( description = "Identification of the customer account. --Rule: Mandatory if TrackData absent") protected String accountNumber; /** The Check number. */ - @XmlElement(name = "CheckNumber") + @SerializedName("CheckNumber") @Schema(description = "Identification of the bank check. --Rule: Mandatory if TrackData absent") protected String checkNumber; /** The Track data. */ - @XmlElement(name = "TrackData") + @SerializedName("TrackData") @Schema( description = "Magnetic track or magnetic ink characters line. --Rule: Mandatory if CheckNumber absent") protected TrackData trackData; /** The Check card number. */ - @XmlElement(name = "CheckCardNumber") + @SerializedName("CheckCardNumber") @Schema(description = "Check guarantee card number. --Rule: If provided by the customer") protected String checkCardNumber; /** The Type code. */ - @XmlElement(name = "TypeCode") + @SerializedName("TypeCode") @Schema(description = "Type of bank check.") protected CheckTypeCodeType typeCode; /** The Country. */ - @XmlElement(name = "Country") + @SerializedName("Country") @Schema(description = "Country of the bank check. --Rule: Absent if country of the Sale system") protected String country; diff --git a/src/main/java/com/adyen/model/nexo/CheckTypeCodeType.java b/src/main/java/com/adyen/model/nexo/CheckTypeCodeType.java index a7562c039..9a1612d34 100644 --- a/src/main/java/com/adyen/model/nexo/CheckTypeCodeType.java +++ b/src/main/java/com/adyen/model/nexo/CheckTypeCodeType.java @@ -1,9 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for CheckTypeCodeType. @@ -19,15 +17,13 @@ * </simpleType> * */ -@XmlType(name = "CheckTypeCodeType") -@XmlEnum public enum CheckTypeCodeType { /** Personal check type code type. */ - @XmlEnumValue("Personal") + @SerializedName("Personal") PERSONAL("Personal"), /** Company check type code type. */ - @XmlEnumValue("Company") + @SerializedName("Company") COMPANY("Company"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/CoinsOrBills.java b/src/main/java/com/adyen/model/nexo/CoinsOrBills.java index b29de0251..d5b44ff35 100644 --- a/src/main/java/com/adyen/model/nexo/CoinsOrBills.java +++ b/src/main/java/com/adyen/model/nexo/CoinsOrBills.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Number of coins or bills of a given value. -- Usage: Indicates the remaining number @@ -28,17 +25,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CoinsOrBills") public class CoinsOrBills { /** The Unit value. */ - @XmlElement(name = "UnitValue", required = true) + @SerializedName("UnitValue") @Schema(description = "Value of a coin or bill.") protected BigDecimal unitValue; /** The Number. */ - @XmlElement(name = "Number", required = true) + @SerializedName("Number") @Schema(description = "Number of elements") protected BigInteger number; diff --git a/src/main/java/com/adyen/model/nexo/ColorType.java b/src/main/java/com/adyen/model/nexo/ColorType.java index efed33595..0f00da1bf 100644 --- a/src/main/java/com/adyen/model/nexo/ColorType.java +++ b/src/main/java/com/adyen/model/nexo/ColorType.java @@ -1,9 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for ColorType. @@ -25,33 +23,31 @@ * </simpleType> * */ -@XmlType(name = "ColorType") -@XmlEnum public enum ColorType { /** White color type. */ - @XmlEnumValue("White") + @SerializedName("White") WHITE("White"), /** Black color type. */ - @XmlEnumValue("Black") + @SerializedName("Black") BLACK("Black"), /** Red color type. */ - @XmlEnumValue("Red") + @SerializedName("Red") RED("Red"), /** Green color type. */ - @XmlEnumValue("Green") + @SerializedName("Green") GREEN("Green"), /** Blue color type. */ - @XmlEnumValue("Blue") + @SerializedName("Blue") BLUE("Blue"), /** Yellow color type. */ - @XmlEnumValue("Yellow") + @SerializedName("Yellow") YELLOW("Yellow"), /** Magenta color type. */ - @XmlEnumValue("Magenta") + @SerializedName("Magenta") MAGENTA("Magenta"), /** Cyan color type. */ - @XmlEnumValue("Cyan") + @SerializedName("Cyan") CYAN("Cyan"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/ContentInformation.java b/src/main/java/com/adyen/model/nexo/ContentInformation.java index 608e64ffd..c8b81d9ad 100644 --- a/src/main/java/com/adyen/model/nexo/ContentInformation.java +++ b/src/main/java/com/adyen/model/nexo/ContentInformation.java @@ -1,9 +1,6 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import com.google.gson.annotations.SerializedName; /** * Definition: General Cryptographic Message Syntax (CMS) data structure -- Reference: RFC 3852: @@ -34,40 +31,30 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "ContentInformation", - propOrder = { - "envelopedData", - "authenticatedData", - "signedData", - "digestedData", - "namedKeyEncryptedData" - }) public class ContentInformation { /** The Enveloped data. */ - @XmlElement(name = "EnvelopedData") + @SerializedName("EnvelopedData") protected EnvelopedData envelopedData; /** The Authenticated data. */ - @XmlElement(name = "AuthenticatedData") + @SerializedName("AuthenticatedData") protected AuthenticatedData authenticatedData; /** The Signed data. */ - @XmlElement(name = "SignedData") + @SerializedName("SignedData") protected SignedData signedData; /** The Digested data. */ - @XmlElement(name = "DigestedData") + @SerializedName("DigestedData") protected DigestedData digestedData; /** The Named key encrypted data. */ - @XmlElement(name = "NamedKeyEncryptedData") + @SerializedName("NamedKeyEncryptedData") protected NamedKeyEncryptedData namedKeyEncryptedData; /** The Content. */ - @XmlElement(name = "ContentType", required = true) + @SerializedName("ContentType") protected ContentType contentType; /** diff --git a/src/main/java/com/adyen/model/nexo/ContentType.java b/src/main/java/com/adyen/model/nexo/ContentType.java index ea7234a32..c7c1cea46 100644 --- a/src/main/java/com/adyen/model/nexo/ContentType.java +++ b/src/main/java/com/adyen/model/nexo/ContentType.java @@ -1,9 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for ContentType. @@ -23,50 +21,48 @@ * </simpleType> * */ -@XmlType(name = "ContentType") -@XmlEnum public enum ContentType { /** * Generic, non cryptographic, or unqualified data content - (OID: iso(1) member-body(2) us(840) * rsadsi(113549) pkcs(1) pkcs7(7) 1) */ - @XmlEnumValue("id-data") + @SerializedName("id-data") ID_DATA("id-data"), /** * Signature CMS data content - (OID: iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) * pkcs7(7) 2) */ - @XmlEnumValue("id-signedData") + @SerializedName("id-signedData") ID_SIGNED_DATA("id-signedData"), /** * Encrypted CMS data content, with encryption key - (OID: iso(1) member-body(2) us(840) * rsadsi(113549) pkcs(1) pkcs7(7) 3) */ - @XmlEnumValue("id-envelopedData") + @SerializedName("id-envelopedData") ID_ENVELOPED_DATA("id-envelopedData"), /** * Message digest CMS data content - (OID: iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) * pkcs7(7) 5) */ - @XmlEnumValue("id-digestedData") + @SerializedName("id-digestedData") ID_DIGESTED_DATA("id-digestedData"), /** * Encrypted CMS data content - (OID: iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) * pkcs7(7) 6) */ - @XmlEnumValue("id-encryptedData") + @SerializedName("id-encryptedData") ID_ENCRYPTED_DATA("id-encryptedData"), /** * MAC CMS data content, with encryption key - (OID: iso(1) member- body(2) us(840) rsadsi(113549) * pkcs(1) pkcs9(9) smime(16) ct(1) 2) */ - @XmlEnumValue("id-ct-authData") + @SerializedName("id-ct-authData") ID_CT_AUTH_DATA("id-ct-authData"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/CurrencyConversion.java b/src/main/java/com/adyen/model/nexo/CurrencyConversion.java index f452d5506..35bc16594 100644 --- a/src/main/java/com/adyen/model/nexo/CurrencyConversion.java +++ b/src/main/java/com/adyen/model/nexo/CurrencyConversion.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Information related to a currency conversion -- Usage: A currency conversion occurred @@ -33,43 +30,39 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "CurrencyConversion", - propOrder = {"convertedAmount", "commission", "declaration"}) public class CurrencyConversion { /** The Converted amount. */ - @XmlElement(name = "ConvertedAmount", required = true) + @SerializedName("ConvertedAmount") @Schema(description = "Amount after a currency conversion.") protected Amount convertedAmount; /** The Commission. */ - @XmlElement(name = "Commission") + @SerializedName("Commission") @Schema(description = "Commission for a service. --Rule: Commission of the conversion.") protected BigDecimal commission; /** The Declaration. */ - @XmlElement(name = "Declaration") + @SerializedName("Declaration") @Schema( description = "Declaration to present to the customer or the cashier for validation. --Rule: If a declaration has to be presented to the customer") protected String declaration; /** The Customer approved flag. */ - @XmlElement(name = "CustomerApprovedFlag") + @SerializedName("CustomerApprovedFlag") @Schema(description = "Notify if the customer has approved something.") protected Boolean customerApprovedFlag; /** The Rate. */ - @XmlElement(name = "Rate") + @SerializedName("Rate") @Schema( description = "Rate of currency conversion. --Rule: Conversion rate of the target currency against the source currency.") protected BigDecimal rate; /** The Markup. */ - @XmlElement(name = "Markup") + @SerializedName("Markup") @Schema(description = "Markup of an amount in percentage. --Rule: Markup of the conversion.") protected BigDecimal markup; diff --git a/src/main/java/com/adyen/model/nexo/CustomerOrder.java b/src/main/java/com/adyen/model/nexo/CustomerOrder.java index 8863b96f8..5bbf5573e 100644 --- a/src/main/java/com/adyen/model/nexo/CustomerOrder.java +++ b/src/main/java/com/adyen/model/nexo/CustomerOrder.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** @@ -38,62 +35,58 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "CustomerOrder", - propOrder = {"additionalInformation"}) public class CustomerOrder { /** The Additional information. */ - @XmlElement(name = "AdditionalInformation") + @SerializedName("AdditionalInformation") @Schema(description = "Unqualified information. --Rule: If order process in progress.") protected String additionalInformation; /** The Customer order id. */ - @XmlElement(name = "CustomerOrderID", required = true) + @SerializedName("CustomerOrderID") @Schema(description = "Identification of a customer order.") protected String customerOrderID; /** The Sale reference id. */ - @XmlElement(name = "SaleReferenceID", required = true) + @SerializedName("SaleReferenceID") @Schema( description = "Identification of a Sale global transaction for a sequence of related POI transactions.") protected String saleReferenceID; /** The Open order state. */ - @XmlElement(name = "OpenOrderState") + @SerializedName("OpenOrderState") @Schema(description = "State of a customer order.") protected Boolean openOrderState; /** The Start date. */ - @XmlElement(name = "StartDate", required = true) + @SerializedName("StartDate") @Schema(description = "Date time of the beginning of an operation.") protected XMLGregorianCalendar startDate; /** The End date. */ - @XmlElement(name = "EndDate") + @SerializedName("EndDate") @Schema( description = "Date time of the end of an operation. --Rule: If ClosedOrderFlag = \"True\".") protected XMLGregorianCalendar endDate; /** The Forecasted amount. */ - @XmlElement(name = "ForecastedAmount", required = true) + @SerializedName("ForecastedAmount") @Schema(description = "Amount of a transaction.") protected BigDecimal forecastedAmount; /** The Current amount. */ - @XmlElement(name = "CurrentAmount", required = true) + @SerializedName("CurrentAmount") @Schema(description = "Remaining amount to pay in a transaction.") protected BigDecimal currentAmount; /** The Currency. */ - @XmlElement(name = "Currency") + @SerializedName("Currency") @Schema(description = "Currency of a monetary amount.") protected String currency; /** The Accessed by. */ - @XmlElement(name = "AccessedBy") + @SerializedName("AccessedBy") @Schema( description = "Identification of an entity accessing data to perform an operation. --Rule: If multiple currencies are allowed.") diff --git a/src/main/java/com/adyen/model/nexo/CustomerOrderReqType.java b/src/main/java/com/adyen/model/nexo/CustomerOrderReqType.java index 188372b45..b3c6207d1 100644 --- a/src/main/java/com/adyen/model/nexo/CustomerOrderReqType.java +++ b/src/main/java/com/adyen/model/nexo/CustomerOrderReqType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for CustomerOrderReqType. @@ -21,22 +19,20 @@ * </simpleType> * */ -@XmlType(name = "CustomerOrderReqType") -@XmlEnum public enum CustomerOrderReqType { /** Customer order not completed. */ - @XmlEnumValue("Open") + @SerializedName("Open") @Schema(description = "Customer order not completed.") OPEN("Open"), /** Completed customer orders. */ - @XmlEnumValue("Closed") + @SerializedName("Closed") @Schema(description = "Completed customer orders.") CLOSED("Closed"), /** All type of CustomerOrder should be listed */ - @XmlEnumValue("Both") + @SerializedName("Both") @Schema(description = "All type of CustomerOrder should be listed") BOTH("Both"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/DeviceType.java b/src/main/java/com/adyen/model/nexo/DeviceType.java index 7fa800d59..963a94192 100644 --- a/src/main/java/com/adyen/model/nexo/DeviceType.java +++ b/src/main/java/com/adyen/model/nexo/DeviceType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for DeviceType. @@ -22,15 +20,13 @@ * </simpleType> * */ -@XmlType(name = "DeviceType") -@XmlEnum public enum DeviceType { /** * Used by the POI System (or the Sale System when the device is managed by the POI Terminal), to * display some information to the Cashier. */ - @XmlEnumValue("CashierDisplay") + @SerializedName("CashierDisplay") @Schema( description = "Used by the POI System (or the Sale System when the device is managed by the POI Terminal), to display some information to the Cashier.") @@ -40,7 +36,7 @@ public enum DeviceType { * Used by the Sale System (or the POI System when the device is managed by the Sale Terminal), to * display some information to the Customer. */ - @XmlEnumValue("CustomerDisplay") + @SerializedName("CustomerDisplay") @Schema( description = "Used by the Sale System (or the POI System when the device is managed by the Sale Terminal), to display some information to the Customer.") @@ -50,7 +46,7 @@ public enum DeviceType { * Any kind of keyboard allowing all or part of the commands of the Input messageType request from * the Sale System to the POI System (InputCommand data element). The */ - @XmlEnumValue("CashierInput") + @SerializedName("CashierInput") @Schema( description = "Any kind of keyboard allowing all or part of the commands of the Input message request from the Sale System to the POI System (InputCommand data element). The") @@ -60,7 +56,7 @@ public enum DeviceType { * Any kind of keyboard allowing all or part of the commands of the Input messageType request from * the POI System to the Sale System (InputCommand data element). The */ - @XmlEnumValue("CustomerInput") + @SerializedName("CustomerInput") @Schema( description = "Any kind of keyboard allowing all or part of the commands of the Input message request from the POI System to the Sale System (InputCommand data element). The") diff --git a/src/main/java/com/adyen/model/nexo/DiagnosisRequest.java b/src/main/java/com/adyen/model/nexo/DiagnosisRequest.java index b3f6e6ce5..684e06de8 100644 --- a/src/main/java/com/adyen/model/nexo/DiagnosisRequest.java +++ b/src/main/java/com/adyen/model/nexo/DiagnosisRequest.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Diagnosis Request messageType. -- Usage: It conveys Information @@ -30,28 +27,24 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "DiagnosisRequest", - propOrder = {"acquirerID"}) public class DiagnosisRequest { /** The Acquirer id. */ - @XmlElement(name = "AcquirerID") + @SerializedName("AcquirerID") @Schema( description = "Identification of the Acquirer --Rule: Present if requesting the diagnosis of these hosts only.") protected List acquirerID; /** The Poiid. */ - @XmlElement(name = "POIID") + @SerializedName("POIID") @Schema( description = "Identification of a POI System or a POI Terminal for the Sale to POI protocol --Rule: MessageHeader.POIID") protected String poiid; /** The Host diagnosis flag. */ - @XmlElement(name = "HostDiagnosisFlag") + @SerializedName("HostDiagnosisFlag") @Schema(description = "Indicates if Host Diagnosis are required") protected Boolean hostDiagnosisFlag; diff --git a/src/main/java/com/adyen/model/nexo/DiagnosisResponse.java b/src/main/java/com/adyen/model/nexo/DiagnosisResponse.java index 29d806ee0..3be5b4a4d 100644 --- a/src/main/java/com/adyen/model/nexo/DiagnosisResponse.java +++ b/src/main/java/com/adyen/model/nexo/DiagnosisResponse.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Diagnosis Response messageType. -- Usage: It conveys the result of the @@ -31,30 +28,26 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "DiagnosisResponse", - propOrder = {"response", "loggedSaleID", "poiStatus", "hostStatus"}) public class DiagnosisResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Logged sale id. */ - @XmlElement(name = "LoggedSaleID") + @SerializedName("LoggedSaleID") @Schema( description = "Sale Terminal logged to. --Rule: If Sale Terminal logged to this POI Terminal") protected List loggedSaleID; /** The Poi status. */ - @XmlElement(name = "POIStatus") + @SerializedName("POIStatus") @Schema(description = "State of a POI Terminal. --Rule: if Response.Result is Success") protected POIStatus poiStatus; /** The Host status. */ - @XmlElement(name = "HostStatus") + @SerializedName("HostStatus") @Schema(description = "State of a Host.") protected List hostStatus; diff --git a/src/main/java/com/adyen/model/nexo/DigestedData.java b/src/main/java/com/adyen/model/nexo/DigestedData.java index 65e7bf56f..b32402aae 100644 --- a/src/main/java/com/adyen/model/nexo/DigestedData.java +++ b/src/main/java/com/adyen/model/nexo/DigestedData.java @@ -1,9 +1,6 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import com.google.gson.annotations.SerializedName; /** * Definition: Cryptographic Message Syntax (CMS) data structure containing digested data -- @@ -30,26 +27,22 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "DigestedData", - propOrder = {"digestAlgorithm", "encapsulatedContent", "digest"}) public class DigestedData { /** The Digest algorithm. */ - @XmlElement(name = "DigestAlgorithm", required = true) + @SerializedName("DigestAlgorithm") protected AlgorithmIdentifier digestAlgorithm; /** The Encapsulated content. */ - @XmlElement(name = "EncapsulatedContent", required = true) + @SerializedName("EncapsulatedContent") protected EncapsulatedContent encapsulatedContent; /** The Digest. */ - @XmlElement(name = "Digest", required = true) + @SerializedName("Digest") protected byte[] digest; /** The Version. */ - @XmlElement(name = "Version") + @SerializedName("Version") protected VersionType version; /** diff --git a/src/main/java/com/adyen/model/nexo/DisplayOutput.java b/src/main/java/com/adyen/model/nexo/DisplayOutput.java index 65bcc2d97..185798437 100644 --- a/src/main/java/com/adyen/model/nexo/DisplayOutput.java +++ b/src/main/java/com/adyen/model/nexo/DisplayOutput.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Information to display and the way to process the display. -- Usage: It contains a @@ -35,50 +32,46 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "DisplayOutput", - propOrder = {"outputContent", "menuEntry", "outputSignature"}) public class DisplayOutput { /** The Output content. */ - @XmlElement(name = "OutputContent", required = true) + @SerializedName("OutputContent") @Schema(description = "Content to display or print.") protected OutputContent outputContent; /** The Menu entry. */ - @XmlElement(name = "MenuEntry") + @SerializedName("MenuEntry") @Schema( description = "An entryof the menu to present to the Cashier --Rule: One instance of MenuEntry per item to display in the menu for the get menu input command.") protected List menuEntry; /** The Output signature. */ - @XmlElement(name = "OutputSignature") + @SerializedName("OutputSignature") @Schema( description = "Vendor specific signature of text message to display or print. --Rule: If protection has to be provided to the vendor on the text to display or print.") protected byte[] outputSignature; /** The Response required flag. */ - @XmlElement(name = "ResponseRequiredFlag") + @SerializedName("ResponseRequiredFlag") @Schema(description = "Request of a message response.") protected Boolean responseRequiredFlag; /** The Minimum display time. */ - @XmlElement(name = "MinimumDisplayTime") + @SerializedName("MinimumDisplayTime") @Schema(description = "Number of seconds the message has to be displayed") protected Integer minimumDisplayTime; /** The Device. */ - @XmlElement(name = "Device", required = true) + @SerializedName("Device") @Schema( description = "Logical device located on a Sale Terminal or a POI Terminal, in term of class of information to output (display, print --Rule: CashierDisplay, CustomerDisplay") protected DeviceType device; /** The Info qualify. */ - @XmlElement(name = "InfoQualify", required = true) + @SerializedName("InfoQualify") @Schema( description = "Qualification of the information to sent to an output logical device, to display or print to the Cashier or the --Rule: Status, Error, Display, POIReplication") diff --git a/src/main/java/com/adyen/model/nexo/DisplayRequest.java b/src/main/java/com/adyen/model/nexo/DisplayRequest.java index da3f71f36..806264985 100644 --- a/src/main/java/com/adyen/model/nexo/DisplayRequest.java +++ b/src/main/java/com/adyen/model/nexo/DisplayRequest.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Display Request messageType. -- Usage: It conveys the data to display @@ -29,14 +26,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "DisplayRequest", - propOrder = {"displayOutput"}) public class DisplayRequest { /** The Display output. */ - @XmlElement(name = "DisplayOutput", required = true) + @SerializedName("DisplayOutput") @Schema( description = "Information to display and the way to process the display. --Rule: Complete display content for output devices. At most one DisplayOutput per Device/ InfoQualify pair") diff --git a/src/main/java/com/adyen/model/nexo/DisplayResponse.java b/src/main/java/com/adyen/model/nexo/DisplayResponse.java index 76af580c3..e33f971ae 100644 --- a/src/main/java/com/adyen/model/nexo/DisplayResponse.java +++ b/src/main/java/com/adyen/model/nexo/DisplayResponse.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Display Response messageType. -- Usage: It conveys the result of the @@ -28,14 +25,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "DisplayResponse", - propOrder = {"outputResult"}) public class DisplayResponse { /** The Output result. */ - @XmlElement(name = "OutputResult", required = true) + @SerializedName("OutputResult") @Schema( description = "Information related to the result the output (display, print, input). --Rule: One per DisplayOutput item of the request, and in the same order.") diff --git a/src/main/java/com/adyen/model/nexo/DocumentQualifierType.java b/src/main/java/com/adyen/model/nexo/DocumentQualifierType.java index 265288f73..89bf49dc6 100644 --- a/src/main/java/com/adyen/model/nexo/DocumentQualifierType.java +++ b/src/main/java/com/adyen/model/nexo/DocumentQualifierType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for DocumentQualifierType. @@ -24,12 +22,10 @@ * </simpleType> * */ -@XmlType(name = "DocumentQualifierType") -@XmlEnum public enum DocumentQualifierType { /** Where the POI system print the Sale receipt when requested by the Sale Terminal. */ - @XmlEnumValue("SaleReceipt") + @SerializedName("SaleReceipt") @Schema( description = "Where the POI system print the Sale receipt when requested by the Sale Terminal.") @@ -39,7 +35,7 @@ public enum DocumentQualifierType { * Where the Sale system print the Cashier copy of the Payment receipt when requested by the POI * Terminal. */ - @XmlEnumValue("CashierReceipt") + @SerializedName("CashierReceipt") @Schema( description = "Where the Sale system print the Cashier copy of the Payment receipt when requested by the POI Terminal.") @@ -49,7 +45,7 @@ public enum DocumentQualifierType { * Where you print the Customer Payment receipt that could be located on the Sale Terminal or in * some cases a restricted Customer Sale ticket on the POI Terminal. */ - @XmlEnumValue("CustomerReceipt") + @SerializedName("CustomerReceipt") @Schema( description = "Where you print the Customer Payment receipt that could be located on the Sale Terminal or in some cases a restricted Customer Sale ticket on the POI Terminal.") @@ -59,7 +55,7 @@ public enum DocumentQualifierType { * When the POI System wants to print specific document (check, dynamic currency conversion ...). * Used by the Sale System when the printer is not located on the */ - @XmlEnumValue("Document") + @SerializedName("Document") @Schema( description = "When the POI System wants to print specific document (check, dynamic currency conversion ...). Used by the Sale System when the printer is not located on the") @@ -68,7 +64,7 @@ public enum DocumentQualifierType { /** * Coupons, voucher or special ticket generated by the POI or the Sale System and to be printed. */ - @XmlEnumValue("Voucher") + @SerializedName("Voucher") @Schema( description = "Coupons, voucher or special ticket generated by the POI or the Sale System and to be printed.") @@ -78,7 +74,7 @@ public enum DocumentQualifierType { * When the POI or the Sale System wants to store a messageType on the journal printer or * electronic journal of the Sale Terminal (it is sometimes a Sale */ - @XmlEnumValue("Journal") + @SerializedName("Journal") @Schema( description = "When the POI or the Sale System wants to store a message on the journal printer or electronic journal of the Sale Terminal (it is sometimes a Sale") diff --git a/src/main/java/com/adyen/model/nexo/EnableServiceRequest.java b/src/main/java/com/adyen/model/nexo/EnableServiceRequest.java index 64cb7d5cf..047e4d94e 100644 --- a/src/main/java/com/adyen/model/nexo/EnableServiceRequest.java +++ b/src/main/java/com/adyen/model/nexo/EnableServiceRequest.java @@ -1,13 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlList; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Enable Service Request messageType. -- Usage: It conveys the services @@ -32,27 +28,22 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "EnableServiceRequest", - propOrder = {"servicesEnabled", "displayOutput"}) public class EnableServiceRequest { /** The Services enabled. */ - @XmlList - @XmlElement(name = "ServicesEnabled") + @SerializedName("ServicesEnabled") @Schema( description = "Services which are enabled before the start-up of a transaction --Rule: Mandatory if TransactionAction is \"StartTransaction\", absent if not.") protected List servicesEnabled; /** The Display output. */ - @XmlElement(name = "DisplayOutput") + @SerializedName("DisplayOutput") @Schema(description = "Information to display and the way to process the display.") protected DisplayOutput displayOutput; /** The Transaction action. */ - @XmlElement(name = "TransactionAction", required = true) + @SerializedName("TransactionAction") @Schema(description = "Action to realise on a transaction.") protected TransactionActionType transactionAction; diff --git a/src/main/java/com/adyen/model/nexo/EnableServiceResponse.java b/src/main/java/com/adyen/model/nexo/EnableServiceResponse.java index 22158c703..1f7771ff8 100644 --- a/src/main/java/com/adyen/model/nexo/EnableServiceResponse.java +++ b/src/main/java/com/adyen/model/nexo/EnableServiceResponse.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Enable Service Response messageType. -- Usage: It conveys the result @@ -26,14 +23,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "EnableServiceResponse", - propOrder = {"response"}) public class EnableServiceResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; diff --git a/src/main/java/com/adyen/model/nexo/EncapsulatedContent.java b/src/main/java/com/adyen/model/nexo/EncapsulatedContent.java index 3a64870d6..95ff0cbaa 100644 --- a/src/main/java/com/adyen/model/nexo/EncapsulatedContent.java +++ b/src/main/java/com/adyen/model/nexo/EncapsulatedContent.java @@ -1,9 +1,6 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import com.google.gson.annotations.SerializedName; /** * Definition: Cryptographic Message Syntax (CMS) data structure containing content to authenticate @@ -28,18 +25,14 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "EncapsulatedContent", - propOrder = {"content"}) public class EncapsulatedContent { /** The Content. */ - @XmlElement(name = "Content") + @SerializedName("Content") protected byte[] content; /** The Content type. */ - @XmlElement(name = "ContentType", required = true) + @SerializedName("ContentType") protected ContentType contentType; /** diff --git a/src/main/java/com/adyen/model/nexo/EncryptedContent.java b/src/main/java/com/adyen/model/nexo/EncryptedContent.java index 8aae3e066..06336d87a 100644 --- a/src/main/java/com/adyen/model/nexo/EncryptedContent.java +++ b/src/main/java/com/adyen/model/nexo/EncryptedContent.java @@ -1,9 +1,6 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import com.google.gson.annotations.SerializedName; /** * Definition: Cryptographic Message Syntax (CMS) data structure containing encrypted data with @@ -29,22 +26,18 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "EncryptedContent", - propOrder = {"contentEncryptionAlgorithm", "encryptedData"}) public class EncryptedContent { /** The Content encryption algorithm. */ - @XmlElement(name = "ContentEncryptionAlgorithm", required = true) + @SerializedName("ContentEncryptionAlgorithm") protected AlgorithmIdentifier contentEncryptionAlgorithm; /** The Encrypted data. */ - @XmlElement(name = "EncryptedData", required = true) + @SerializedName("EncryptedData") protected byte[] encryptedData; /** The Content. */ - @XmlElement(name = "ContentType", required = true) + @SerializedName("ContentType") protected ContentType contentType; /** diff --git a/src/main/java/com/adyen/model/nexo/EntryModeType.java b/src/main/java/com/adyen/model/nexo/EntryModeType.java index 85a38d53d..1fc29e33c 100644 --- a/src/main/java/com/adyen/model/nexo/EntryModeType.java +++ b/src/main/java/com/adyen/model/nexo/EntryModeType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for EntryModeType. @@ -29,39 +27,37 @@ * </simpleType> * */ -@XmlType(name = "EntryModeType") -@XmlEnum public enum EntryModeType { /** Payment instrument information are taken from RFID */ RFID("RFID"), /** Manual key entry */ - @XmlEnumValue("Keyed") + @SerializedName("Keyed") @Schema(description = "Manual key entry") KEYED("Keyed"), /** * Reading of embossing or OCR of printed data either at time of transaction or after the event. */ - @XmlEnumValue("Manual") + @SerializedName("Manual") @Schema( description = "Reading of embossing or OCR of printed data either at time of transaction or after the event.") MANUAL("Manual"), /** Account data on file */ - @XmlEnumValue("File") + @SerializedName("File") @Schema(description = "Account data on file") FILE("File"), /** Scanned by a bar code reader. */ - @XmlEnumValue("Scanned") + @SerializedName("Scanned") @Schema(description = "Scanned by a bar code reader.") SCANNED("Scanned"), /** Magnetic stripe card reader. */ - @XmlEnumValue("MagStripe") + @SerializedName("MagStripe") @Schema(description = "Magnetic stripe card reader.") MAG_STRIPE("MagStripe"), @@ -69,22 +65,22 @@ public enum EntryModeType { ICC("ICC"), /** Contact ICC (synchronous) */ - @XmlEnumValue("SynchronousICC") + @SerializedName("SynchronousICC") @Schema(description = "Contact ICC (synchronous)") SYNCHRONOUS_ICC("SynchronousICC"), /** Contactless card reader Magnetic Stripe */ - @XmlEnumValue("Tapped") + @SerializedName("Tapped") @Schema(description = "Contactless card reader Magnetic Stripe") TAPPED("Tapped"), /** Contactless card reader conform to ISO 14443 */ - @XmlEnumValue("Contactless") + @SerializedName("Contactless") @Schema(description = "Contactless card reader conform to ISO 14443") CONTACTLESS("Contactless"), /** Mobile phone. */ - @XmlEnumValue("Mobile") + @SerializedName("Mobile") @Schema(description = "Mobile phone.") MOBILE("Mobile"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/EnvelopedData.java b/src/main/java/com/adyen/model/nexo/EnvelopedData.java index e9bc82f37..deea77057 100644 --- a/src/main/java/com/adyen/model/nexo/EnvelopedData.java +++ b/src/main/java/com/adyen/model/nexo/EnvelopedData.java @@ -1,12 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElements; -import javax.xml.bind.annotation.XmlType; /** * Definition: Cryptographic Message Syntax (CMS) data structure containing encrypted data with @@ -35,25 +31,18 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "EnvelopedData", - propOrder = {"keyTransportOrKEK", "encryptedContent"}) public class EnvelopedData { /** The Key transport or kek. */ - @XmlElements({ - @XmlElement(name = "KeyTransport", type = KeyTransport.class), - @XmlElement(name = "KEK", type = KEK.class) - }) + @SerializedName("keyTransportOrKEK") protected List keyTransportOrKEK; /** The Encrypted content. */ - @XmlElement(name = "EncryptedContent", required = true) + @SerializedName("EncryptedContent") protected EncryptedContent encryptedContent; /** The Version. */ - @XmlElement(name = "Version") + @SerializedName("Version") protected VersionType version; /** diff --git a/src/main/java/com/adyen/model/nexo/ErrorConditionType.java b/src/main/java/com/adyen/model/nexo/ErrorConditionType.java index 4037720eb..bf1dc74dd 100644 --- a/src/main/java/com/adyen/model/nexo/ErrorConditionType.java +++ b/src/main/java/com/adyen/model/nexo/ErrorConditionType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for ErrorConditionType. @@ -35,34 +33,32 @@ * </simpleType> * */ -@XmlType(name = "ErrorConditionType") -@XmlEnum public enum ErrorConditionType { /** * The Initiator of the request has sent an Abort messageType request, which was accepted and * processed. */ - @XmlEnumValue("Aborted") + @SerializedName("Aborted") @Schema( description = "The Initiator of the request has sent an Abort message request, which was accepted and processed.") ABORTED("Aborted"), /** The system is busy, try later */ - @XmlEnumValue("Busy") + @SerializedName("Busy") @Schema(description = "The system is busy, try later") BUSY("Busy"), /** The user has aborted the transaction on the PED keyboard, for instance during PIN entering. */ - @XmlEnumValue("Cancel") + @SerializedName("Cancel") @Schema( description = "The user has aborted the transaction on the PED keyboard, for instance during PIN entering.") CANCEL("Cancel"), /** Device out of order */ - @XmlEnumValue("DeviceOut") + @SerializedName("DeviceOut") @Schema(description = "Device out of order") DEVICE_OUT("DeviceOut"), @@ -70,20 +66,20 @@ public enum ErrorConditionType { * If the Input Device request a NotifyCardInputFlag and the Customer enters a card in the card * reader without answers to the Input command, the POI abort the */ - @XmlEnumValue("InsertedCard") + @SerializedName("InsertedCard") @Schema( description = "If the Input Device request a NotifyCardInputFlag and the Customer enters a card in the card reader without answers to the Input command, the POI abort the") INSERTED_CARD("InsertedCard"), /** The transaction is still in progress and then the command cannot be processed */ - @XmlEnumValue("InProgress") + @SerializedName("InProgress") @Schema( description = "The transaction is still in progress and then the command cannot be processed") IN_PROGRESS("InProgress"), /** Not logged in */ - @XmlEnumValue("LoggedOut") + @SerializedName("LoggedOut") @Schema(description = "Not logged in") LOGGED_OUT("LoggedOut"), @@ -91,7 +87,7 @@ public enum ErrorConditionType { * Error on the format of the messageType, AdditionalResponse shall contain the identification of * the data, and the reason in clear text. */ - @XmlEnumValue("MessageFormat") + @SerializedName("MessageFormat") @Schema( description = "Error on the format of the message, AdditionalResponse shall contain the identification of the data, and the reason in clear text.") @@ -101,19 +97,19 @@ public enum ErrorConditionType { * A service request is sent during a Service dialogue. A combination of services not possible to * provide. During the CardReaderInit messageType processing, the user */ - @XmlEnumValue("NotAllowed") + @SerializedName("NotAllowed") @Schema( description = "A service request is sent during a Service dialogue. A combination of services not possible to provide. During the CardReaderInit message processing, the user") NOT_ALLOWED("NotAllowed"), /** The transaction is not found (e.g. for a reversal or a repeat) */ - @XmlEnumValue("NotFound") + @SerializedName("NotFound") @Schema(description = "The transaction is not found (e.g. for a reversal or a repeat)") NOT_FOUND("NotFound"), /** Some sale items are not payable by the card proposed by the Customer. */ - @XmlEnumValue("PaymentRestriction") + @SerializedName("PaymentRestriction") @Schema(description = "Some sale items are not payable by the card proposed by the Customer.") PAYMENT_RESTRICTION("PaymentRestriction"), @@ -121,19 +117,19 @@ public enum ErrorConditionType { * The transaction is refused by the host or the rules associated to the card, and cannot be * repeated. */ - @XmlEnumValue("Refusal") + @SerializedName("Refusal") @Schema( description = "The transaction is refused by the host or the rules associated to the card, and cannot be repeated.") REFUSAL("Refusal"), /** The hardware is not available (absent, not configured...) */ - @XmlEnumValue("UnavailableDevice") + @SerializedName("UnavailableDevice") @Schema(description = "The hardware is not available (absent, not configured...)") UNAVAILABLE_DEVICE("UnavailableDevice"), /** The service is not available (not implemented, not configured, protocol version too old...) */ - @XmlEnumValue("UnavailableService") + @SerializedName("UnavailableService") @Schema( description = "The service is not available (not implemented, not configured, protocol version too old...)") @@ -143,7 +139,7 @@ public enum ErrorConditionType { * The card entered by the Customer cannot be processed by the POI because this card is not * configured in the system */ - @XmlEnumValue("InvalidCard") + @SerializedName("InvalidCard") @Schema( description = "The card entered by the Customer cannot be processed by the POI because this card is not configured in the system") @@ -153,14 +149,14 @@ public enum ErrorConditionType { * Acquirer or any host is unreachable or has not answered to an online request, so is considered * as temporary unavailable. Depending on the Sale context, the */ - @XmlEnumValue("UnreachableHost") + @SerializedName("UnreachableHost") @Schema( description = "Acquirer or any host is unreachable or has not answered to an online request, so is considered as temporary unavailable. Depending on the Sale context, the") UNREACHABLE_HOST("UnreachableHost"), /** The user has entered the PIN on the PED keyboard and the verification fails. */ - @XmlEnumValue("WrongPIN") + @SerializedName("WrongPIN") @Schema( description = "The user has entered the PIN on the PED keyboard and the verification fails.") WRONG_PIN("WrongPIN"); diff --git a/src/main/java/com/adyen/model/nexo/EventNotification.java b/src/main/java/com/adyen/model/nexo/EventNotification.java index 0e123ffc1..eeb3e966a 100644 --- a/src/main/java/com/adyen/model/nexo/EventNotification.java +++ b/src/main/java/com/adyen/model/nexo/EventNotification.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** @@ -33,52 +30,48 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "EventNotification", - propOrder = {"eventDetails", "rejectedMessage", "displayOutput"}) public class EventNotification { /** The Event details. */ - @XmlElement(name = "EventDetails") + @SerializedName("EventDetails") @Schema( description = "Information about the event the POI notifies to the Sale System. --Rule: EventToNotify") protected String eventDetails; /** The Rejected message. */ - @XmlElement(name = "RejectedMessage") + @SerializedName("RejectedMessage") @Schema( description = "Message request rejected by the receiver. --Rule: Mandatory if EventToNotify is \"Reject\", absent in other cases") protected byte[] rejectedMessage; /** The Display output. */ - @XmlElement(name = "DisplayOutput") + @SerializedName("DisplayOutput") @Schema( description = "Information to display and the way to process the display. --Rule: To display an event message") protected DisplayOutput displayOutput; /** The Time stamp. */ - @XmlElement(name = "TimeStamp", required = true) + @SerializedName("TimeStamp") @Schema( description = "Date and time of a transaction for the Sale System, the POI System or the Acquirer.") protected XMLGregorianCalendar timeStamp; /** The Event to notify. */ - @XmlElement(name = "EventToNotify", required = true) + @SerializedName("EventToNotify") @Schema(description = "Event the POI notifies to the Sale System.") protected EventToNotifyType eventToNotify; /** The Maintenance required flag. */ - @XmlElement(name = "MaintenanceRequiredFlag") + @SerializedName("MaintenanceRequiredFlag") @Schema(description = "Indicates if the occurred event requires maintenance call or action.") protected Boolean maintenanceRequiredFlag; /** The Customer language. */ - @XmlElement(name = "CustomerLanguage") + @SerializedName("CustomerLanguage") @Schema(description = "Language of the Customer --Rule: EventToNotify") protected String customerLanguage; diff --git a/src/main/java/com/adyen/model/nexo/EventToNotifyType.java b/src/main/java/com/adyen/model/nexo/EventToNotifyType.java index fda00230f..197b89d07 100644 --- a/src/main/java/com/adyen/model/nexo/EventToNotifyType.java +++ b/src/main/java/com/adyen/model/nexo/EventToNotifyType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for EventToNotifyType. @@ -36,37 +34,35 @@ * </simpleType> * */ -@XmlType(name = "EventToNotifyType") -@XmlEnum public enum EventToNotifyType { /** Begin of POI Maintenance */ - @XmlEnumValue("BeginMaintenance") + @SerializedName("BeginMaintenance") @Schema(description = "Begin of POI Maintenance") BEGIN_MAINTENANCE("BeginMaintenance"), /** End of POI Maintenance */ - @XmlEnumValue("EndMaintenance") + @SerializedName("EndMaintenance") @Schema(description = "End of POI Maintenance") END_MAINTENANCE("EndMaintenance"), /** The POI Terminal or the POI System is shutting down */ - @XmlEnumValue("Shutdown") + @SerializedName("Shutdown") @Schema(description = "The POI Terminal or the POI System is shutting down") SHUTDOWN("Shutdown"), /** The POI Terminal or the POI System is now ready to work */ - @XmlEnumValue("Initialised") + @SerializedName("Initialised") @Schema(description = "The POI Terminal or the POI System is now ready to work") INITIALISED("Initialised"), /** The POI Terminal or the POI System cannot work */ - @XmlEnumValue("OutOfOrder") + @SerializedName("OutOfOrder") @Schema(description = "The POI Terminal or the POI System cannot work") OUT_OF_ORDER("OutOfOrder"), /** An Abort request has been sent to abort a messageType which is already completed. */ - @XmlEnumValue("Completed") + @SerializedName("Completed") @Schema( description = "An Abort request has been sent to abort a message which is already completed.") COMPLETED("Completed"), @@ -75,7 +71,7 @@ public enum EventToNotifyType { * One or several device request has been sent by the POI during the processing of a service * requested by the Sale System. The processing is cancelled by the */ - @XmlEnumValue("Abort") + @SerializedName("Abort") @Schema( description = "One or several device request has been sent by the POI during the processing of a service requested by the Sale System. The processing is cancelled by the") @@ -85,7 +81,7 @@ public enum EventToNotifyType { * A POI terminal requests the payment of the transaction identified by the content of * EventDetails in the Event notification. */ - @XmlEnumValue("SaleWakeUp") + @SerializedName("SaleWakeUp") @Schema( description = "A POI terminal requests the payment of the transaction identified by the content of EventDetails in the Event notification.") @@ -95,43 +91,43 @@ public enum EventToNotifyType { * The POI has performed, or want to perform an automatic administrative process, e.g. the reports * at the end of day. */ - @XmlEnumValue("SaleAdmin") + @SerializedName("SaleAdmin") @Schema( description = "The POI has performed, or want to perform an automatic administrative process, e.g. the reports at the end of day.") SALE_ADMIN("SaleAdmin"), /** The customer has selected a different language on the POI. */ - @XmlEnumValue("CustomerLanguage") + @SerializedName("CustomerLanguage") @Schema(description = "The customer has selected a different language on the POI.") CUSTOMER_LANGUAGE("CustomerLanguage"), /** The customer has pressed a specific key on the POI. */ - @XmlEnumValue("KeyPressed") + @SerializedName("KeyPressed") @Schema(description = "The customer has pressed a specific key on the POI.") KEY_PRESSED("KeyPressed"), /** Problem of security */ - @XmlEnumValue("SecurityAlarm") + @SerializedName("SecurityAlarm") @Schema(description = "Problem of security") SECURITY_ALARM("SecurityAlarm"), /** When the Customer assistance is stopped, because the Customer has completed its input. */ - @XmlEnumValue("StopAssistance") + @SerializedName("StopAssistance") @Schema( description = "When the Customer assistance is stopped, because the Customer has completed its input.") STOP_ASSISTANCE("StopAssistance"), /** A card is inserted in the card reader (see Input request and NotifyCardInputFlag) */ - @XmlEnumValue("CardInserted") + @SerializedName("CardInserted") @Schema( description = "A card is inserted in the card reader (see Input request and NotifyCardInputFlag)") CARD_INSERTED("CardInserted"), /** A card is removed from the card reader. */ - @XmlEnumValue("CardRemoved") + @SerializedName("CardRemoved") @Schema(description = "A card is removed from the card reader.") CARD_REMOVED("CardRemoved"), @@ -139,24 +135,24 @@ public enum EventToNotifyType { * A messageType request is rejected. An error explanation and the messageType in error have to be * put in the EventDetails data element. */ - @XmlEnumValue("Reject") + @SerializedName("Reject") @Schema( description = "A message request is rejected. An error explanation and the message in error have to be put in the EventDetails data element.") REJECT("Reject"), /** The terminal has established a network connection to the POS and is online. */ - @XmlEnumValue("NetworkConnected") + @SerializedName("NetworkConnected") @Schema(description = "The terminal is connected to the POS over the Internet.") NETWORK_CONNECTED("NetworkConnected"), /** The terminal has lost its network connection to the POS and is offline. */ - @XmlEnumValue("NetworkDisconnected") + @SerializedName("NetworkDisconnected") @Schema(description = "The terminal is disconnected from the POS.") NETWORK_DISCONNECTED("NetworkDisconnected"), /** Delivers the result (or timeout failure) of the Barcode scan. */ - @XmlEnumValue("ScanBarcodeResult") + @SerializedName("ScanBarcodeResult") @Schema(description = "Delivers the result (or timeout failure) of the Barcode scan.") SCAN_BARCODE_RESULT("ScanBarcodeResult"); diff --git a/src/main/java/com/adyen/model/nexo/ForceEntryModeType.java b/src/main/java/com/adyen/model/nexo/ForceEntryModeType.java index efec2114a..19cac9ce8 100644 --- a/src/main/java/com/adyen/model/nexo/ForceEntryModeType.java +++ b/src/main/java/com/adyen/model/nexo/ForceEntryModeType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for ForceEntryModeType. @@ -29,39 +27,37 @@ * </simpleType> * */ -@XmlType(name = "ForceEntryModeType") -@XmlEnum public enum ForceEntryModeType { /** Payment instrument information are taken from RFID */ RFID("RFID"), /** Manual key entry */ - @XmlEnumValue("Keyed") + @SerializedName("Keyed") @Schema(description = "Manual key entry") KEYED("Keyed"), /** * Reading of embossing or OCR of printed data either at time of transaction or after the event. */ - @XmlEnumValue("Manual") + @SerializedName("Manual") @Schema( description = "Reading of embossing or OCR of printed data either at time of transaction or after the event.") MANUAL("Manual"), /** Account data on file */ - @XmlEnumValue("File") + @SerializedName("File") @Schema(description = "Account data on file") FILE("File"), /** Scanned by a bar code reader. */ - @XmlEnumValue("Scanned") + @SerializedName("Scanned") @Schema(description = "Scanned by a bar code reader.") SCANNED("Scanned"), /** Magnetic stripe */ - @XmlEnumValue("MagStripe") + @SerializedName("MagStripe") @Schema(description = "Magnetic stripe ") MAG_STRIPE("MagStripe"), @@ -69,22 +65,22 @@ public enum ForceEntryModeType { ICC("ICC"), /** Contact ICC (synchronous) */ - @XmlEnumValue("SynchronousICC") + @SerializedName("SynchronousICC") @Schema(description = "Contact ICC (synchronous)") SYNCHRONOUS_ICC("SynchronousICC"), /** Contactless card reader Magnetic Stripe */ - @XmlEnumValue("Tapped") + @SerializedName("Tapped") @Schema(description = "Contactless card reader Magnetic Stripe") TAPPED("Tapped"), /** Contactless card reader conform to ISO 14443 */ - @XmlEnumValue("Contactless") + @SerializedName("Contactless") @Schema(description = "Contactless card reader conform to ISO 14443") CONTACTLESS("Contactless"), /** Check Reader */ - @XmlEnumValue("CheckReader") + @SerializedName("CheckReader") @Schema(description = "Check Reader") CHECK_READER("CheckReader"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/GenericProfileType.java b/src/main/java/com/adyen/model/nexo/GenericProfileType.java index 5955f98dc..b4cd01e90 100644 --- a/src/main/java/com/adyen/model/nexo/GenericProfileType.java +++ b/src/main/java/com/adyen/model/nexo/GenericProfileType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for GenericProfileType. @@ -21,12 +19,10 @@ * </simpleType> * */ -@XmlType(name = "GenericProfileType") -@XmlEnum public enum GenericProfileType { /** Protocol services that needs to be implemented by all the Sale and POI */ - @XmlEnumValue("Basic") + @SerializedName("Basic") @Schema(description = "Protocol services that needs to be implemented by all the Sale and POI") BASIC("Basic"), @@ -34,14 +30,14 @@ public enum GenericProfileType { * Protocol services involving interaction between Sale System and POI System as devices shared * between the two Systems. */ - @XmlEnumValue("Standard") + @SerializedName("Standard") @Schema( description = "Protocol services involving interaction between Sale System and POI System as devices shared between the two Systems.") STANDARD("Standard"), /** Complete Protocol services */ - @XmlEnumValue("Extended") + @SerializedName("Extended") @Schema(description = "Complete Protocol services") EXTENDED("Extended"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/GeographicCoordinates.java b/src/main/java/com/adyen/model/nexo/GeographicCoordinates.java index 44c3579ed..279805f83 100644 --- a/src/main/java/com/adyen/model/nexo/GeographicCoordinates.java +++ b/src/main/java/com/adyen/model/nexo/GeographicCoordinates.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Location on the Earth specified by two numbers representing vertical and horizontal @@ -27,20 +24,16 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "GeographicCoordinates", - propOrder = {"latitude", "longitude"}) public class GeographicCoordinates { /** The Latitude. */ - @XmlElement(name = "Latitude", required = true) + @SerializedName("Latitude") @Schema( description = "Angular distance of a location on the earth south or north of the equator.") protected String latitude; /** The Longitude. */ - @XmlElement(name = "Longitude", required = true) + @SerializedName("Longitude") @Schema( description = "Angular measurement of the distance of a location on the earth east or west of the Greenwich observatory.") diff --git a/src/main/java/com/adyen/model/nexo/Geolocation.java b/src/main/java/com/adyen/model/nexo/Geolocation.java index 6220819c5..03e4e06ee 100644 --- a/src/main/java/com/adyen/model/nexo/Geolocation.java +++ b/src/main/java/com/adyen/model/nexo/Geolocation.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Geographic location specified by geographic or UTM coordinates. -- Usage: Identifies @@ -27,21 +24,17 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "Geolocation", - propOrder = {"geographicCoordinates", "utmCoordinates"}) public class Geolocation { /** The Geographic coordinates. */ - @XmlElement(name = "GeographicCoordinates") + @SerializedName("GeographicCoordinates") @Schema( description = "Location on the Earth specified by two numbers representing vertical and horizontal position.") protected GeographicCoordinates geographicCoordinates; /** The Utm coordinates. */ - @XmlElement(name = "UTMCoordinates") + @SerializedName("UTMCoordinates") @Schema( description = "Location on the Earth specified by the Universal Transverse Mercator coordinate system.") diff --git a/src/main/java/com/adyen/model/nexo/GetTotalsRequest.java b/src/main/java/com/adyen/model/nexo/GetTotalsRequest.java index fa2b45e2e..645fd8d0c 100644 --- a/src/main/java/com/adyen/model/nexo/GetTotalsRequest.java +++ b/src/main/java/com/adyen/model/nexo/GetTotalsRequest.java @@ -1,13 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlList; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Get Totals Request messageType. -- Usage: It conveys information from @@ -31,22 +27,17 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "GetTotalsRequest", - propOrder = {"totalDetails", "totalFilter"}) public class GetTotalsRequest { /** The Total details. */ - @XmlList - @XmlElement(name = "TotalDetails") + @SerializedName("TotalDetails") @Schema( description = "Indicates the hierarchical structure of the reconciliation result of the Sale to POI reconciliation. --Rule: Require to present totals per value of element included in this cluster (POI Terminal, Sale Terminal, Cashier, Shift,") protected List totalDetails; /** The Total filter. */ - @XmlElement(name = "TotalFilter") + @SerializedName("TotalFilter") @Schema(description = "Filter to compute the totals. --Rule: If structure is not empty") protected TotalFilter totalFilter; diff --git a/src/main/java/com/adyen/model/nexo/GetTotalsResponse.java b/src/main/java/com/adyen/model/nexo/GetTotalsResponse.java index 03d6b4880..c9ad47c5f 100644 --- a/src/main/java/com/adyen/model/nexo/GetTotalsResponse.java +++ b/src/main/java/com/adyen/model/nexo/GetTotalsResponse.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Reconciliation Response messageType. -- Usage: It conveys Information @@ -30,26 +27,22 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "GetTotalsResponse", - propOrder = {"response", "transactionTotals"}) public class GetTotalsResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Transaction totals. */ - @XmlElement(name = "TransactionTotals") + @SerializedName("TransactionTotals") @Schema( description = "Result of the Sale to POI Reconciliation processing. --Rule: if Response.Result is Success") protected List transactionTotals; /** The Poi reconciliation id. */ - @XmlElement(name = "POIReconciliationID", required = true) + @SerializedName("POIReconciliationID") @Schema(description = "Identification of the reconciliation period between Sale and POI. ") protected String poiReconciliationID; diff --git a/src/main/java/com/adyen/model/nexo/GlobalStatusType.java b/src/main/java/com/adyen/model/nexo/GlobalStatusType.java index 64e1f5666..923c245ed 100644 --- a/src/main/java/com/adyen/model/nexo/GlobalStatusType.java +++ b/src/main/java/com/adyen/model/nexo/GlobalStatusType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for GlobalStatusType. @@ -22,27 +20,25 @@ * </simpleType> * */ -@XmlType(name = "GlobalStatusType") -@XmlEnum public enum GlobalStatusType { /** The POI is ready to receive and process a request */ OK("OK"), /** The POI Terminal cannot process a request because another processing is in progress. */ - @XmlEnumValue("Busy") + @SerializedName("Busy") @Schema( description = "The POI Terminal cannot process a request because another processing is in progress.") BUSY("Busy"), /** The POI is in maintenance processing */ - @XmlEnumValue("Maintenance") + @SerializedName("Maintenance") @Schema(description = "The POI is in maintenance processing") MAINTENANCE("Maintenance"), /** The POI is unreachable or not responding */ - @XmlEnumValue("Unreachable") + @SerializedName("Unreachable") @Schema(description = "The POI is unreachable or not responding") UNREACHABLE("Unreachable"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/HostStatus.java b/src/main/java/com/adyen/model/nexo/HostStatus.java index ddc3a84af..609acbb29 100644 --- a/src/main/java/com/adyen/model/nexo/HostStatus.java +++ b/src/main/java/com/adyen/model/nexo/HostStatus.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: State of a Host. -- Usage: Indicate the reachability of the host by the POI Terminal. @@ -24,17 +21,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "HostStatus") public class HostStatus { /** The Acquirer id. */ - @XmlElement(name = "AcquirerID", required = true) + @SerializedName("AcquirerID") @Schema(description = "Identification of the Acquirer") protected String acquirerID; /** The Is reachable flag. */ - @XmlElement(name = "IsReachableFlag") + @SerializedName("IsReachableFlag") @Schema(description = "Indicate if a Host is reachable") protected Boolean isReachableFlag; diff --git a/src/main/java/com/adyen/model/nexo/ICCResetData.java b/src/main/java/com/adyen/model/nexo/ICCResetData.java index 004fe15da..60d0a0e1d 100644 --- a/src/main/java/com/adyen/model/nexo/ICCResetData.java +++ b/src/main/java/com/adyen/model/nexo/ICCResetData.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data of a Chip Card related to the reset of the chip. -- Usage: Card reader device @@ -25,12 +22,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ICCResetData") public class ICCResetData { /** The Atr value. */ - @XmlElement(name = "ATRValue") + @SerializedName("ATRValue") @Schema( description = "Value of the Answer To Reset of a chip card --Rule: if available", minLength = 1, @@ -38,7 +33,7 @@ public class ICCResetData { protected byte[] atrValue; /** The Card status words. */ - @XmlElement(name = "CardStatusWords") + @SerializedName("CardStatusWords") @Schema( description = "Status of a smartcard response to a command (SW1-SW2) --Rule: if available", minLength = 2, diff --git a/src/main/java/com/adyen/model/nexo/IdentificationSupportType.java b/src/main/java/com/adyen/model/nexo/IdentificationSupportType.java index 48eefcfe8..f6495e411 100644 --- a/src/main/java/com/adyen/model/nexo/IdentificationSupportType.java +++ b/src/main/java/com/adyen/model/nexo/IdentificationSupportType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for IdentificationSupportType. @@ -22,22 +20,20 @@ * </simpleType> * */ -@XmlType(name = "IdentificationSupportType") -@XmlEnum public enum IdentificationSupportType { /** The identification is not found on a card */ - @XmlEnumValue("NoCard") + @SerializedName("NoCard") @Schema(description = "The identification is not found on a card") NO_CARD("NoCard"), /** The identification is on a card dedicated to this loyalty brand. */ - @XmlEnumValue("LoyaltyCard") + @SerializedName("LoyaltyCard") @Schema(description = "The identification is on a card dedicated to this loyalty brand.") LOYALTY_CARD("LoyaltyCard"), /** The identification is on a card which might be used both for the loyalty and the payment. */ - @XmlEnumValue("HybridCard") + @SerializedName("HybridCard") @Schema( description = "The identification is on a card which might be used both for the loyalty and the payment.") @@ -47,7 +43,7 @@ public enum IdentificationSupportType { * The loyalty account is implicitly attached to the payment card. This is usually detected by the * loyalty Acquirer. */ - @XmlEnumValue("LinkedCard") + @SerializedName("LinkedCard") @Schema( description = "The loyalty account is implicitly attached to the payment card. This is usually detected by the loyalty Acquirer.") diff --git a/src/main/java/com/adyen/model/nexo/IdentificationType.java b/src/main/java/com/adyen/model/nexo/IdentificationType.java index 80773cfb8..07a50250e 100644 --- a/src/main/java/com/adyen/model/nexo/IdentificationType.java +++ b/src/main/java/com/adyen/model/nexo/IdentificationType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for IdentificationType. @@ -23,30 +21,28 @@ * </simpleType> * */ -@XmlType(name = "IdentificationType") -@XmlEnum public enum IdentificationType { /** Standard card identification (card number) */ PAN("PAN"), /** ISO Track 2 including identification. */ - @XmlEnumValue("ISOTrack2") + @SerializedName("ISOTrack2") @Schema(description = "ISO Track 2 including identification.") ISO_TRACK_2("ISOTrack2"), /** Bar-code with a specific form of identification */ - @XmlEnumValue("BarCode") + @SerializedName("BarCode") @Schema(description = "Bar-code with a specific form of identification") BAR_CODE("BarCode"), /** Account number */ - @XmlEnumValue("AccountNumber") + @SerializedName("AccountNumber") @Schema(description = "Account number") ACCOUNT_NUMBER("AccountNumber"), /** A phone number identifies the account on which the phone card is assigned. */ - @XmlEnumValue("PhoneNumber") + @SerializedName("PhoneNumber") @Schema( description = "A phone number identifies the account on which the phone card is assigned.") PHONE_NUMBER("PhoneNumber"); diff --git a/src/main/java/com/adyen/model/nexo/InfoQualifyType.java b/src/main/java/com/adyen/model/nexo/InfoQualifyType.java index c196d0587..3a973075e 100644 --- a/src/main/java/com/adyen/model/nexo/InfoQualifyType.java +++ b/src/main/java/com/adyen/model/nexo/InfoQualifyType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for InfoQualifyType. @@ -28,34 +26,32 @@ * </simpleType> * */ -@XmlType(name = "InfoQualifyType") -@XmlEnum public enum InfoQualifyType { /** * The information is a new state on which the messageType sender is entering. For instance, * during a payment, the POI could display to the Cashier that POI request */ - @XmlEnumValue("Status") + @SerializedName("Status") @Schema( description = "The information is a new state on which the message sender is entering. For instance, during a payment, the POI could display to the Cashier that POI request") STATUS("Status"), /** The information is related to an error situation occurring on the messageType sender. */ - @XmlEnumValue("Error") + @SerializedName("Error") @Schema( description = "The information is related to an error situation occurring on the message sender.") ERROR("Error"), /** Standard display interface. */ - @XmlEnumValue("Display") + @SerializedName("Display") @Schema(description = "Standard display interface.") DISPLAY("Display"), /** Standard sound interface. */ - @XmlEnumValue("Sound") + @SerializedName("Sound") @Schema(description = "Standard sound interface.") SOUND("Sound"), @@ -63,14 +59,14 @@ public enum InfoQualifyType { * Answer to a question or information to be entered by the Cashier or the Customer, at the * request of the POI Terminal or the Sale Terminal. */ - @XmlEnumValue("Input") + @SerializedName("Input") @Schema( description = "Answer to a question or information to be entered by the Cashier or the Customer, at the request of the POI Terminal or the Sale Terminal.") INPUT("Input"), /** Information displayed on the Cardholder POI interface, replicated on the Cashier interface. */ - @XmlEnumValue("POIReplication") + @SerializedName("POIReplication") @Schema( description = "Information displayed on the Cardholder POI interface, replicated on the Cashier interface.") @@ -80,7 +76,7 @@ public enum InfoQualifyType { * Input of the Cardholder POI interface which can be entered by the Cashier to assist the * Customer. */ - @XmlEnumValue("CustomerAssistance") + @SerializedName("CustomerAssistance") @Schema( description = "Input of the Cardholder POI interface which can be entered by the Cashier to assist the Customer.") @@ -90,7 +86,7 @@ public enum InfoQualifyType { * Where you print the Payment receipt that could be located on the Sale Terminal or in some cases * a restricted Sale ticket on the POI Terminal. */ - @XmlEnumValue("Receipt") + @SerializedName("Receipt") @Schema( description = "Where you print the Payment receipt that could be located on the Sale Terminal or in some cases a restricted Sale ticket on the POI Terminal.") @@ -100,7 +96,7 @@ public enum InfoQualifyType { * When the POI System wants to print specific document (check, dynamic currency conversion ...). * Used by the Sale System when the printer is not located on the */ - @XmlEnumValue("Document") + @SerializedName("Document") @Schema( description = "When the POI System wants to print specific document (check, dynamic currency conversion ...). Used by the Sale System when the printer is not located on the") @@ -109,7 +105,7 @@ public enum InfoQualifyType { /** * Coupons, voucher or special ticket generated by the POI or the Sale System and to be printed. */ - @XmlEnumValue("Voucher") + @SerializedName("Voucher") @Schema( description = "Coupons, voucher or special ticket generated by the POI or the Sale System and to be printed.") diff --git a/src/main/java/com/adyen/model/nexo/Input.java b/src/main/java/com/adyen/model/nexo/Input.java index 5c32a8f94..0c0973ba5 100644 --- a/src/main/java/com/adyen/model/nexo/Input.java +++ b/src/main/java/com/adyen/model/nexo/Input.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data entered by the user, related to the input command. -- Usage: Choice of a data @@ -34,63 +31,52 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "Input", - propOrder = { - "confirmedFlag", - "functionKey", - "textInput", - "digitInput", - "password", - "menuEntryNumber" - }) public class Input { /** The Confirmed flag. */ - @XmlElement(name = "ConfirmedFlag") + @SerializedName("ConfirmedFlag") @Schema( description = "Confirmation or not of what has been requested to the user in a GetConfirmation input command. --Rule: Mandatory, if InputCommand is GetConfirmation or SiteManager Not allowed, otherwise") protected Boolean confirmedFlag; /** The Function key. */ - @XmlElement(name = "FunctionKey") + @SerializedName("FunctionKey") @Schema( description = "The number of the function key which is typed by the Customer on the POI or the Cashier on the Sale Terminal. --Rule: Mandatory, if InputCommand is GetFunctionKey Not allowed, otherwise") protected String functionKey; /** The Text input. */ - @XmlElement(name = "TextInput") + @SerializedName("TextInput") @Schema( description = "The text which is typed by the Customer on the POI or the Cashier on the Sale Terminal. --Rule: Mandatory, if InputCommand is TextString Not allowed, otherwise") protected String textInput; /** The Digit input. */ - @XmlElement(name = "DigitInput") + @SerializedName("DigitInput") @Schema( description = "The digits which are typed by the Customer on the POI or the Cashier on the Sale Terminal. --Rule: Mandatory, if InputCommand is DigitString Not allowed, otherwise") protected String digitInput; /** The Password. */ - @XmlElement(name = "Password") + @SerializedName("Password") @Schema( description = "A text password which is typed by the Customer on the POI or the Cashier on the Sale Terminal. --Rule: Mandatory, if InputCommand is Password Not allowed, otherwise") protected ContentInformation password; /** The Menu entry number. */ - @XmlElement(name = "MenuEntryNumber") + @SerializedName("MenuEntryNumber") @Schema( description = "The index from 1 to n, of the menu item which is selected by the Cashier on the Sale Terminal. The value -1 indicates --Rule: Mandatory, if InputCommand is GetMenuEntry Not allowed, otherwise") protected Integer[] menuEntryNumber; /** The Input command. */ - @XmlElement(name = "InputCommand", required = true) + @SerializedName("InputCommand") @Schema(description = "Type of requested input --Rule: Copy") protected InputCommandType inputCommand; diff --git a/src/main/java/com/adyen/model/nexo/InputCommandType.java b/src/main/java/com/adyen/model/nexo/InputCommandType.java index fa792db8b..64068759c 100644 --- a/src/main/java/com/adyen/model/nexo/InputCommandType.java +++ b/src/main/java/com/adyen/model/nexo/InputCommandType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for InputCommandType. @@ -27,15 +25,13 @@ * </simpleType> * */ -@XmlType(name = "InputCommandType") -@XmlEnum public enum InputCommandType { /** * Wait for a key pressed on the Terminal, to be able to read the messageType displayed on the * Terminal. */ - @XmlEnumValue("GetAnyKey") + @SerializedName("GetAnyKey") @Schema( description = "Wait for a key pressed on the Terminal, to be able to read the message displayed on the Terminal.") @@ -45,28 +41,28 @@ public enum InputCommandType { * Wait for a confirmation Yes (Y) or No (N) on the Sale Terminal. Wait for a confirmation (Valid * or Cancel button) on the POI Terminal. The result of the command */ - @XmlEnumValue("GetConfirmation") + @SerializedName("GetConfirmation") @Schema( description = "Wait for a confirmation Yes (Y) or No (N) on the Sale Terminal. Wait for a confirmation (Valid or Cancel button) on the POI Terminal. The result of the command") GET_CONFIRMATION("GetConfirmation"), /** Wait for a confirmation Yes (Y) or No (N) of the Site Manager on the Sale Terminal. */ - @XmlEnumValue("SiteManager") + @SerializedName("SiteManager") @Schema( description = "Wait for a confirmation Yes (Y) or No (N) of the Site Manager on the Sale Terminal.") SITE_MANAGER("SiteManager"), /** Wait for a string of alphanumeric characters, the length range could be specified. */ - @XmlEnumValue("TextString") + @SerializedName("TextString") @Schema( description = "Wait for a string of alphanumeric characters, the length range could be specified.") TEXT_STRING("TextString"), /** Wait for a string of digit characters, the length range could be specified. */ - @XmlEnumValue("DigitString") + @SerializedName("DigitString") @Schema( description = "Wait for a string of digit characters, the length range could be specified.") DIGIT_STRING("DigitString"), @@ -75,7 +71,7 @@ public enum InputCommandType { * Wait for a string of digit characters with a decimal point, the length range could be * specified. */ - @XmlEnumValue("DecimalString") + @SerializedName("DecimalString") @Schema( description = "Wait for a string of digit characters with a decimal point, the length range could be specified.") @@ -85,7 +81,7 @@ public enum InputCommandType { * Wait for a function key pressed on the Terminal: From POI, Valid, Clear, Correct, Generic * Function key number. From Sale, Generic Function key. */ - @XmlEnumValue("GetFunctionKey") + @SerializedName("GetFunctionKey") @Schema( description = "Wait for a function key pressed on the Terminal: From POI, Valid, Clear, Correct, Generic Function key number. From Sale, Generic Function key.") @@ -95,14 +91,14 @@ public enum InputCommandType { * To choose an entry among a list of entrys (all of them are not necessary selectable). The * OutputFormat has to be MenuEntry. */ - @XmlEnumValue("GetMenuEntry") + @SerializedName("GetMenuEntry") @Schema( description = "To choose an entry among a list of entrys (all of them are not necessary selectable). The OutputFormat has to be MenuEntry.") GET_MENU_ENTRY("GetMenuEntry"), /** Request to enter a password with masked characters while typing the password. */ - @XmlEnumValue("Password") + @SerializedName("Password") @Schema( description = "Request to enter a password with masked characters while typing the password.") PASSWORD("Password"); diff --git a/src/main/java/com/adyen/model/nexo/InputData.java b/src/main/java/com/adyen/model/nexo/InputData.java index 91966b84b..6c061caf6 100644 --- a/src/main/java/com/adyen/model/nexo/InputData.java +++ b/src/main/java/com/adyen/model/nexo/InputData.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Information related to an Input request. -- Usage: It conveys the target input @@ -48,141 +45,137 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "InputData", - propOrder = {"defaultInputString", "stringMask"}) public class InputData { /** The Default input string. */ - @XmlElement(name = "DefaultInputString") + @SerializedName("DefaultInputString") @Schema( description = "Default string value for an input command. --Rule: Not allowed if InputCommand is not TextString, DigitString or DecimalString") protected String defaultInputString; /** The String mask. */ - @XmlElement(name = "StringMask") + @SerializedName("StringMask") @Schema( description = "String mask to get information requiring a specific format. --Rule: Not allowed if InputCommand is not TextString, DigitString or DecimalString") protected String stringMask; /** The Device. */ - @XmlElement(name = "Device", required = true) + @SerializedName("Device") @Schema( description = "Logical device located on a Sale Terminal or a POI Terminal, in term of class of information to output (display, print --Rule: CashierInput , CustomerInput, CustomerAssistance") protected DeviceType device; /** The Info qualify. */ - @XmlElement(name = "InfoQualify", required = true) + @SerializedName("InfoQualify") @Schema( description = "Qualification of the information to sent to an output logical device, to display or print to the Cashier or the --Rule: Input, CustomerAssistance") protected InfoQualifyType infoQualify; /** The Input command. */ - @XmlElement(name = "InputCommand", required = true) + @SerializedName("InputCommand") @Schema(description = "Type of requested input") protected InputCommandType inputCommand; /** The Notify card input flag. */ - @XmlElement(name = "NotifyCardInputFlag") + @SerializedName("NotifyCardInputFlag") @Schema(description = "Request Notification of card entered in the POI card reader.") protected Boolean notifyCardInputFlag; /** The Max input time. */ - @XmlElement(name = "MaxInputTime") + @SerializedName("MaxInputTime") @Schema(description = "Maximum input time in seconds --Rule: If time limit for responding") protected BigInteger maxInputTime; /** The Immediate response flag. */ - @XmlElement(name = "ImmediateResponseFlag") + @SerializedName("ImmediateResponseFlag") @Schema( description = "Request Immediate response to the message without waiting for the completion of the command. --Rule: Optional if InputCommand is \"GetAnyKey\".") protected Boolean immediateResponseFlag; /** The Min length. */ - @XmlElement(name = "MinLength") + @SerializedName("MinLength") @Schema( description = "Minimum input length --Rule: Not allowed if InputCommand is not TextString or DigitString") protected BigInteger minLength; /** The Max length. */ - @XmlElement(name = "MaxLength") + @SerializedName("MaxLength") @Schema( description = "Maximum input length --Rule: Not allowed if InputCommand is not TextString or DigitString") protected BigInteger maxLength; /** The Max decimal length. */ - @XmlElement(name = "MaxDecimalLength") + @SerializedName("MaxDecimalLength") @Schema( description = "Maximum input length of the decimal part (without decimal point) --Rule: Not allowed if InputCommand is not DecimalString Greater than MinLength, lower than MaxLength.") protected BigInteger maxDecimalLength; /** The Wait user validation flag. */ - @XmlElement(name = "WaitUserValidationFlag") + @SerializedName("WaitUserValidationFlag") @Schema( description = "Indicates that the user must confirm the entered characters, when the maximum allowed length is reached. --Rule: Optional if MaxLength or MaxDecimalLength present ") protected Boolean waitUserValidationFlag; /** The From right to left flag. */ - @XmlElement(name = "FromRightToLeftFlag") + @SerializedName("FromRightToLeftFlag") @Schema( description = "Indicate if the entered character has to be displayed from the right to the left of the display field. --Rule: Not allowed if InputCommand is not TextString, DigitString or DecimalString") protected Boolean fromRightToLeftFlag; /** The Mask characters flag. */ - @XmlElement(name = "MaskCharactersFlag") + @SerializedName("MaskCharactersFlag") @Schema( description = "Indicates to mask the characters entered by the user (i.e. replacing in the display of the input, the entered character --Rule: Not allowed if InputCommand is not TextString, DigitString or Password") protected Boolean maskCharactersFlag; /** The Beep key flag. */ - @XmlElement(name = "BeepKeyFlag") + @SerializedName("BeepKeyFlag") @Schema( description = "Indicates, when the user press a key, if a beep has to be generated (value True).") protected Boolean beepKeyFlag; /** The Global correction flag. */ - @XmlElement(name = "GlobalCorrectionFlag") + @SerializedName("GlobalCorrectionFlag") @Schema( description = "Indicates, when the user press the Correct function key in an input entry, if all the entered characters are removed --Rule: Not allowed if InputCommand is not TextString, DigitString, Password or DecimalString") protected Boolean globalCorrectionFlag; /** The Disable cancel flag. */ - @XmlElement(name = "DisableCancelFlag") + @SerializedName("DisableCancelFlag") @Schema( description = "Indicates if the Cancel function key has to be desactived (value True). --Rule: Not allowed if InputCommand is not GetConfirmation, SiteManager, or GetMenuEntry") protected Boolean disableCancelFlag; /** The Disable correct flag. */ - @XmlElement(name = "DisableCorrectFlag") + @SerializedName("DisableCorrectFlag") @Schema( description = "Indicates if the Correct function key has to be desactived (value True). --Rule: Not allowed if InputCommand is not GetConfirmation, SiteManager, or GetMenuEntry") protected Boolean disableCorrectFlag; /** The Disable valid flag. */ - @XmlElement(name = "DisableValidFlag") + @SerializedName("DisableValidFlag") @Schema( description = "Indicates if the Valid function key has to be desactived (value True). --Rule: Not allowed if InputCommand is not GetConfirmation, SiteManager, or GetMenuEntry") protected Boolean disableValidFlag; /** The Menu back flag. */ - @XmlElement(name = "MenuBackFlag") + @SerializedName("MenuBackFlag") @Schema( description = "If it has the value True, it indicates that the \"Back\" function key (respectively \"Home\" function key) may be used to --Rule: Allowed for the GetMenuEntry value of InputCommand.") diff --git a/src/main/java/com/adyen/model/nexo/InputRequest.java b/src/main/java/com/adyen/model/nexo/InputRequest.java index eaad3c9c4..33b6ab0ef 100644 --- a/src/main/java/com/adyen/model/nexo/InputRequest.java +++ b/src/main/java/com/adyen/model/nexo/InputRequest.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Input Request messageType. -- Usage: It conveys data to display and @@ -29,21 +26,17 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "InputRequest", - propOrder = {"displayOutput", "inputData"}) public class InputRequest { /** The Display output. */ - @XmlElement(name = "DisplayOutput") + @SerializedName("DisplayOutput") @Schema( description = "Information to display and the way to process the display. --Rule: Mandatory if the display device is managed by the receiver.") protected DisplayOutput displayOutput; /** The Input data. */ - @XmlElement(name = "InputData", required = true) + @SerializedName("InputData") @Schema(description = "Information related to an Input request.") protected InputData inputData; diff --git a/src/main/java/com/adyen/model/nexo/InputResponse.java b/src/main/java/com/adyen/model/nexo/InputResponse.java index 9b9fbec2e..227c5cc71 100644 --- a/src/main/java/com/adyen/model/nexo/InputResponse.java +++ b/src/main/java/com/adyen/model/nexo/InputResponse.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Input Response messageType. -- Usage: It conveys:The result of the @@ -28,21 +25,17 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "InputResponse", - propOrder = {"outputResult", "inputResult"}) public class InputResponse { /** The Output result. */ - @XmlElement(name = "OutputResult") + @SerializedName("OutputResult") @Schema( description = "Information related to the result the output (display, print, input). --Rule: If DisplayOutput present in the request.") protected OutputResult outputResult; /** The Input result. */ - @XmlElement(name = "InputResult", required = true) + @SerializedName("InputResult") @Schema(description = "Information related to the result the input.") protected InputResult inputResult; diff --git a/src/main/java/com/adyen/model/nexo/InputResult.java b/src/main/java/com/adyen/model/nexo/InputResult.java index aafb26907..6ded264e2 100644 --- a/src/main/java/com/adyen/model/nexo/InputResult.java +++ b/src/main/java/com/adyen/model/nexo/InputResult.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Information related to the result the input. -- Usage: In the messageType response, @@ -29,33 +26,29 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "InputResult", - propOrder = {"response", "input"}) public class InputResult { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Input. */ - @XmlElement(name = "Input") + @SerializedName("Input") @Schema( description = "Data entered by the user, related to the input command. --Rule: If Response.Result is Success") protected Input input; /** The Device. */ - @XmlElement(name = "Device", required = true) + @SerializedName("Device") @Schema( description = "Logical device located on a Sale Terminal or a POI Terminal, in term of class of information to output (display, print --Rule: Copy") protected DeviceType device; /** The Info qualify. */ - @XmlElement(name = "InfoQualify", required = true) + @SerializedName("InfoQualify") @Schema( description = "Qualification of the information to sent to an output logical device, to display or print to the Cashier or the --Rule: Copy") diff --git a/src/main/java/com/adyen/model/nexo/InputUpdate.java b/src/main/java/com/adyen/model/nexo/InputUpdate.java index 91b1bb27f..08fd203b8 100644 --- a/src/main/java/com/adyen/model/nexo/InputUpdate.java +++ b/src/main/java/com/adyen/model/nexo/InputUpdate.java @@ -1,13 +1,10 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Input Update messageType. -- Usage: It conveys update of the display @@ -35,44 +32,40 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "InputUpdate", - propOrder = {"messageReference", "outputContent", "menuEntry", "outputSignature"}) public class InputUpdate { /** The Message reference. */ - @XmlElement(name = "MessageReference", required = true) + @SerializedName("MessageReference") @Schema(description = "Identification of a previous POI transaction.") protected MessageReference messageReference; /** The Output content. */ - @XmlElement(name = "OutputContent", required = true) + @SerializedName("OutputContent") @Schema(description = "Content to display or print.") protected OutputContent outputContent; /** The Menu entry. */ - @XmlElement(name = "MenuEntry") + @SerializedName("MenuEntry") @Schema(description = "An entryof the menu to present to the Cashier") protected List menuEntry; /** The Output signature. */ - @XmlElement(name = "OutputSignature") + @SerializedName("OutputSignature") @Schema(description = "Vendor specific signature of text message to display or print.") protected byte[] outputSignature; /** The Min length. */ - @XmlElement(name = "MinLength") + @SerializedName("MinLength") @Schema(description = "Minimum input length --Rule: If present in the Input to update.") protected BigInteger minLength; /** The Max length. */ - @XmlElement(name = "MaxLength") + @SerializedName("MaxLength") @Schema(description = "Maximum input length --Rule: If present in the Input to update.") protected BigInteger maxLength; /** The Max decimal length. */ - @XmlElement(name = "MaxDecimalLength") + @SerializedName("MaxDecimalLength") @Schema( description = "Maximum input length of the decimal part (without decimal point) --Rule: If present in the Input to update.") diff --git a/src/main/java/com/adyen/model/nexo/Instalment.java b/src/main/java/com/adyen/model/nexo/Instalment.java index 5e5af8c7a..6dc1e840c 100644 --- a/src/main/java/com/adyen/model/nexo/Instalment.java +++ b/src/main/java/com/adyen/model/nexo/Instalment.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Information related an instalment transaction. -- Usage: To request an instalment to @@ -35,56 +32,54 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "Instalment") public class Instalment { /** The Instalment type. */ - @XmlElement(name = "InstalmentType") + @SerializedName("InstalmentType") @Schema(description = "Type of instalment transaction.") protected InstalmentType instalmentType; /** The Sequence number. */ - @XmlElement(name = "SequenceNumber") + @SerializedName("SequenceNumber") @Schema(description = "Sequence number of the instalment.") protected BigInteger sequenceNumber; /** The Plan id. */ - @XmlElement(name = "PlanID") + @SerializedName("PlanID") @Schema(description = "Identification of an instalment plan.") protected String planID; /** The Period. */ - @XmlElement(name = "Period") + @SerializedName("Period") @Schema(description = "Period of time with defined unit of time.") protected BigInteger period; /** The Period unit. */ - @XmlElement(name = "PeriodUnit") + @SerializedName("PeriodUnit") protected PeriodUnitType periodUnit; /** The First payment date. */ - @XmlElement(name = "FirstPaymentDate") + @SerializedName("FirstPaymentDate") @Schema(description = "First date of a payment.") protected String firstPaymentDate; /** The Total nb of payments. */ - @XmlElement(name = "TotalNbOfPayments") + @SerializedName("TotalNbOfPayments") @Schema(description = "Total number of payments.") protected BigInteger totalNbOfPayments; /** The Cumulative amount. */ - @XmlElement(name = "CumulativeAmount") + @SerializedName("CumulativeAmount") @Schema(description = "Sum of a collection of amounts.") protected BigDecimal cumulativeAmount; /** The First amount. */ - @XmlElement(name = "FirstAmount") + @SerializedName("FirstAmount") @Schema(description = "First amount of a payment.") protected BigDecimal firstAmount; /** The Charges. */ - @XmlElement(name = "Charges") + @SerializedName("Charges") @Schema(description = "Charges related to a transaction.") protected BigDecimal charges; diff --git a/src/main/java/com/adyen/model/nexo/InstalmentType.java b/src/main/java/com/adyen/model/nexo/InstalmentType.java index 42b881034..cbd453a76 100644 --- a/src/main/java/com/adyen/model/nexo/InstalmentType.java +++ b/src/main/java/com/adyen/model/nexo/InstalmentType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for InstalmentType. @@ -21,22 +19,20 @@ * </simpleType> * */ -@XmlType(name = "InstalmentType") -@XmlEnum public enum InstalmentType { /** The payment of the service or goods is deferred. */ - @XmlEnumValue("DeferredInstalments") + @SerializedName("DeferredInstalments") @Schema(description = "The payment of the service or goods is deferred.") DEFERRED_INSTALMENTS("DeferredInstalments"), /** The payment is split in several instalments of equal amounts. */ - @XmlEnumValue("EqualInstalments") + @SerializedName("EqualInstalments") @Schema(description = "The payment is split in several instalments of equal amounts.") EQUAL_INSTALMENTS("EqualInstalments"), /** The payment is split in several instalments of different amounts. */ - @XmlEnumValue("InequalInstalments") + @SerializedName("InequalInstalments") @Schema(description = "The payment is split in several instalments of different amounts.") INEQUAL_INSTALMENTS("InequalInstalments"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/Issuer.java b/src/main/java/com/adyen/model/nexo/Issuer.java index d283ae490..0fefe709b 100644 --- a/src/main/java/com/adyen/model/nexo/Issuer.java +++ b/src/main/java/com/adyen/model/nexo/Issuer.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Certificate issuer name (see X.501-88) -- Reference: RFC 3880: Internet X.509 Public @@ -29,14 +26,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "Issuer", - propOrder = {"relativeDistinguishedName"}) public class Issuer { /** The Relative distinguished name. */ - @XmlElement(name = "RelativeDistinguishedName", required = true) + @SerializedName("RelativeDistinguishedName") protected List relativeDistinguishedName; /** diff --git a/src/main/java/com/adyen/model/nexo/IssuerAndSerialNumber.java b/src/main/java/com/adyen/model/nexo/IssuerAndSerialNumber.java index 8aadef276..439517c3e 100644 --- a/src/main/java/com/adyen/model/nexo/IssuerAndSerialNumber.java +++ b/src/main/java/com/adyen/model/nexo/IssuerAndSerialNumber.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Cryptographic Message Syntax (CMS) data structure containing the issuer name and @@ -29,18 +26,14 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "IssuerAndSerialNumber", - propOrder = {"issuer", "serialNumber"}) public class IssuerAndSerialNumber { /** The Issuer. */ - @XmlElement(name = "Issuer", required = true) + @SerializedName("Issuer") protected Issuer issuer; /** The Serial number. */ - @XmlElement(name = "SerialNumber", required = true) + @SerializedName("SerialNumber") protected BigInteger serialNumber; /** diff --git a/src/main/java/com/adyen/model/nexo/KEK.java b/src/main/java/com/adyen/model/nexo/KEK.java index 875b9128b..6da543d2f 100644 --- a/src/main/java/com/adyen/model/nexo/KEK.java +++ b/src/main/java/com/adyen/model/nexo/KEK.java @@ -1,9 +1,6 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import com.google.gson.annotations.SerializedName; /** * Definition: Encryption key using previously distributed symmetric key -- Reference: RFC 3852: @@ -29,26 +26,22 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "KEK", - propOrder = {"kekIdentifier", "keyEncryptionAlgorithm"}) public class KEK { /** The Kek identifier. */ - @XmlElement(name = "KEKIdentifier", required = true) + @SerializedName("KEKIdentifier") protected KEKIdentifier kekIdentifier; /** The Key encryption algorithm. */ - @XmlElement(name = "KeyEncryptionAlgorithm", required = true) + @SerializedName("KeyEncryptionAlgorithm") protected AlgorithmIdentifier keyEncryptionAlgorithm; /** The Version. */ - @XmlElement(name = "Version") + @SerializedName("Version") protected VersionType version; /** The Encrypted key. */ - @XmlElement(name = "EncryptedKey", required = true) + @SerializedName("EncryptedKey") protected byte[] encryptedKey; /** diff --git a/src/main/java/com/adyen/model/nexo/KEKIdentifier.java b/src/main/java/com/adyen/model/nexo/KEKIdentifier.java index f2e202712..1d14c7e63 100644 --- a/src/main/java/com/adyen/model/nexo/KEKIdentifier.java +++ b/src/main/java/com/adyen/model/nexo/KEKIdentifier.java @@ -1,9 +1,6 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import com.google.gson.annotations.SerializedName; /** * Definition: Identification of a key encryption key (key management using previously distributed @@ -26,20 +23,18 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "KEKIdentifier") public class KEKIdentifier { /** The Key identifier. */ - @XmlElement(name = "KeyIdentifier", required = true) + @SerializedName("KeyIdentifier") protected String keyIdentifier; /** The Key version. */ - @XmlElement(name = "KeyVersion", required = true) + @SerializedName("KeyVersion") protected String keyVersion; /** The Derivation identifier. */ - @XmlElement(name = "DerivationIdentifier") + @SerializedName("DerivationIdentifier") protected byte[] derivationIdentifier; /** diff --git a/src/main/java/com/adyen/model/nexo/KeyTransport.java b/src/main/java/com/adyen/model/nexo/KeyTransport.java index aac3495c8..8c6c45e3c 100644 --- a/src/main/java/com/adyen/model/nexo/KeyTransport.java +++ b/src/main/java/com/adyen/model/nexo/KeyTransport.java @@ -1,9 +1,6 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import com.google.gson.annotations.SerializedName; /** * Definition: Encryption key using previously distributed asymmetric key -- Reference: RFC 3852: @@ -29,26 +26,22 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "KeyTransport", - propOrder = {"recipientIdentifier", "keyEncryptionAlgorithm"}) public class KeyTransport { /** The Recipient identifier. */ - @XmlElement(name = "RecipientIdentifier", required = true) + @SerializedName("RecipientIdentifier") protected RecipientIdentifier recipientIdentifier; /** The Key encryption algorithm. */ - @XmlElement(name = "KeyEncryptionAlgorithm", required = true) + @SerializedName("KeyEncryptionAlgorithm") protected AlgorithmIdentifier keyEncryptionAlgorithm; /** The Version. */ - @XmlElement(name = "Version") + @SerializedName("Version") protected VersionType version; /** The Encrypted key. */ - @XmlElement(name = "EncryptedKey", required = true) + @SerializedName("EncryptedKey") protected byte[] encryptedKey; /** diff --git a/src/main/java/com/adyen/model/nexo/LoginRequest.java b/src/main/java/com/adyen/model/nexo/LoginRequest.java index 76d42ba24..58d2b4e67 100644 --- a/src/main/java/com/adyen/model/nexo/LoginRequest.java +++ b/src/main/java/com/adyen/model/nexo/LoginRequest.java @@ -1,13 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** @@ -39,74 +35,69 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "LoginRequest", - propOrder = {"dateTime", "saleSoftware", "saleTerminalData"}) public class LoginRequest { /** The Date time. */ - @XmlElement(name = "DateTime", required = true) + @SerializedName("DateTime") @Schema(description = "Date and Time") - @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar dateTime; /** The Sale software. */ - @XmlElement(name = "SaleSoftware", required = true) + @SerializedName("SaleSoftware") @Schema( description = "Information related to the software of the Sale System which manages the Sale to POI protocol.") protected SaleSoftware saleSoftware; /** The Sale terminal data. */ - @XmlElement(name = "SaleTerminalData") + @SerializedName("SaleTerminalData") @Schema( description = "Information related to the software and hardware feature of the Sale Terminal. --Rule: Present if the login involve a Sale Terminal") protected SaleTerminalData saleTerminalData; /** The Training mode flag. */ - @XmlElement(name = "TrainingModeFlag") + @SerializedName("TrainingModeFlag") @Schema( description = "Training mode --Rule: The POI does not realise the transaction with the Acquirer") protected Boolean trainingModeFlag; /** The Operator language. */ - @XmlElement(name = "OperatorLanguage", required = true) + @SerializedName("OperatorLanguage") @Schema( description = "Language of the Cashier or Operator. --Rule: Default value for Device type displays") protected String operatorLanguage; /** The Operator id. */ - @XmlElement(name = "OperatorID") + @SerializedName("OperatorID") @Schema( description = "Identification of the Cashier or Operator. --Rule: 4 conditions to send it: a) the Sale System wants the POI log it in the transaction log b) because of reconciliation") protected String operatorID; /** The Shift number. */ - @XmlElement(name = "ShiftNumber") + @SerializedName("ShiftNumber") @Schema(description = "Shift number. --Rule: Same as OperatorID") protected String shiftNumber; /** The Token requested. */ - @XmlElement(name = "TokenRequestedType") + @SerializedName("TokenRequestedType") @Schema( description = "Type of token replacing the PAN of a payment card to identify the payment mean of the customer. --Rule: If a token is requested during the the session.") protected TokenRequestedType tokenRequestedType; /** The Customer order req. */ - @XmlElement(name = "CustomerOrderReq") + @SerializedName("CustomerOrderReq") @Schema( description = "List of customer orders must be sent in response message. --Rule: If customer orders must be listed in Card Acquisition and Payment response messages during the session.") protected List customerOrderReq; /** The Poi serial number. */ - @XmlElement(name = "POISerialNumber") + @SerializedName("POISerialNumber") @Schema( description = "Serial number of a POI Terminal --Rule: If the login involve a POI Terminal and not the first Login to the POI System") diff --git a/src/main/java/com/adyen/model/nexo/LoginResponse.java b/src/main/java/com/adyen/model/nexo/LoginResponse.java index 51cce89ff..49b283f8d 100644 --- a/src/main/java/com/adyen/model/nexo/LoginResponse.java +++ b/src/main/java/com/adyen/model/nexo/LoginResponse.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Login Response messageType. -- Usage: It conveys Information related @@ -27,19 +24,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "LoginResponse", - propOrder = {"response", "poiSystemData"}) public class LoginResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Poi system data. */ - @XmlElement(name = "POISystemData") + @SerializedName("POISystemData") @Schema( description = "Information related to the POI System --Rule: if Response.Result is Success") protected POISystemData poiSystemData; diff --git a/src/main/java/com/adyen/model/nexo/LogoutRequest.java b/src/main/java/com/adyen/model/nexo/LogoutRequest.java index 7c32ef322..124b51f88 100644 --- a/src/main/java/com/adyen/model/nexo/LogoutRequest.java +++ b/src/main/java/com/adyen/model/nexo/LogoutRequest.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Logout Request messageType. -- Usage: Empty @@ -23,12 +20,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "LogoutRequest") public class LogoutRequest { /** The Maintenance allowed. */ - @XmlElement(name = "MaintenanceAllowed") + @SerializedName("MaintenanceAllowed") @Schema( description = "Indicates that the POI terminal is able to (or have to) go to maintenance.") protected Boolean maintenanceAllowed; diff --git a/src/main/java/com/adyen/model/nexo/LogoutResponse.java b/src/main/java/com/adyen/model/nexo/LogoutResponse.java index 2071d285b..6d4ecc887 100644 --- a/src/main/java/com/adyen/model/nexo/LogoutResponse.java +++ b/src/main/java/com/adyen/model/nexo/LogoutResponse.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Logout Response messageType. -- Usage: It conveys the result of the @@ -26,14 +23,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "LogoutResponse", - propOrder = {"response"}) public class LogoutResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyAccount.java b/src/main/java/com/adyen/model/nexo/LoyaltyAccount.java index f3e92cb86..3d3ae31f9 100644 --- a/src/main/java/com/adyen/model/nexo/LoyaltyAccount.java +++ b/src/main/java/com/adyen/model/nexo/LoyaltyAccount.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to a loyalty account processed in the transaction. -- Usage: This data @@ -27,19 +24,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "LoyaltyAccount", - propOrder = {"loyaltyAccountID"}) public class LoyaltyAccount { /** The Loyalty account id. */ - @XmlElement(name = "LoyaltyAccountID", required = true) + @SerializedName("LoyaltyAccountID") @Schema(description = "Identification of a Loyalty account.") protected LoyaltyAccountID loyaltyAccountID; /** The Loyalty brand. */ - @XmlElement(name = "LoyaltyBrand") + @SerializedName("LoyaltyBrand") @Schema(description = "Identification of a Loyalty brand. --Rule: If a card is analysed") protected String loyaltyBrand; diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyAccountID.java b/src/main/java/com/adyen/model/nexo/LoyaltyAccountID.java index c66e7af39..7d038316a 100644 --- a/src/main/java/com/adyen/model/nexo/LoyaltyAccountID.java +++ b/src/main/java/com/adyen/model/nexo/LoyaltyAccountID.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Identification of a Loyalty account. -- Usage: In the Payment or the Loyalty Request @@ -31,23 +28,21 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "LoyaltyAccountID") public class LoyaltyAccountID { - @XmlElement(name = "LoyaltyID", required = true) + @SerializedName("LoyaltyID") @Schema(description = "Loyalty account identification") protected String loyaltyID; - @XmlElement(name = "EntryMode", required = true) + @SerializedName("EntryMode") @Schema(description = "Entry mode of the payment instrument information") protected List entryMode; - @XmlElement(name = "IdentificationType", required = true) + @SerializedName("IdentificationType") @Schema(description = "Type of account identification") protected IdentificationType identificationType; - @XmlElement(name = "IdentificationSupport") + @SerializedName("IdentificationSupport") @Schema( description = "Support of the loyalty account identification --Rule: if PaymentResponse or LoyaltyResponse or BalanceInquiryResponse") diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyAccountReq.java b/src/main/java/com/adyen/model/nexo/LoyaltyAccountReq.java index 36ceea14f..706840b85 100644 --- a/src/main/java/com/adyen/model/nexo/LoyaltyAccountReq.java +++ b/src/main/java/com/adyen/model/nexo/LoyaltyAccountReq.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to a requested Loyalty program or account. -- Usage: In the Balance @@ -28,21 +25,17 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "LoyaltyAccountReq", - propOrder = {"cardAcquisitionReference", "loyaltyAccountID"}) public class LoyaltyAccountReq { /** The Card acquisition reference. */ - @XmlElement(name = "CardAcquisitionReference") + @SerializedName("CardAcquisitionReference") @Schema( description = "Reference to the last CardAcquisition, to use the same card. --Rule: If the loyalty account ID comes from a previous CardAcquisition") protected TransactionIdentification cardAcquisitionReference; /** The Loyalty account id. */ - @XmlElement(name = "LoyaltyAccountID") + @SerializedName("LoyaltyAccountID") @Schema( description = "Identification of a Loyalty account. --Rule: If loyalty identification of the loyalty account is realised by the Sale System") diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyAccountStatus.java b/src/main/java/com/adyen/model/nexo/LoyaltyAccountStatus.java index 3fba7b5e5..89f47fb10 100644 --- a/src/main/java/com/adyen/model/nexo/LoyaltyAccountStatus.java +++ b/src/main/java/com/adyen/model/nexo/LoyaltyAccountStatus.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the result of a loyalty Balance Inquiry. -- Usage: In the Message @@ -30,31 +27,27 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "LoyaltyAccountStatus", - propOrder = {"loyaltyAccount"}) public class LoyaltyAccountStatus { /** The Loyalty account. */ - @XmlElement(name = "LoyaltyAccount", required = true) + @SerializedName("LoyaltyAccount") @Schema(description = "Data related to a loyalty account processed in the transaction.") protected LoyaltyAccount loyaltyAccount; /** The Current balance. */ - @XmlElement(name = "CurrentBalance") + @SerializedName("CurrentBalance") @Schema( description = "Balance of an account. --Rule: if known (provided by the card or an external host)") protected BigDecimal currentBalance; /** The Loyalty unit. */ - @XmlElement(name = "LoyaltyUnit") + @SerializedName("LoyaltyUnit") @Schema(description = "Unit of a loyalty amount.") protected LoyaltyUnitType loyaltyUnit; /** The Currency. */ - @XmlElement(name = "Currency") + @SerializedName("Currency") @Schema( description = "Currency of a monetary amount. --Rule: If Result is Success and If LoyaltyUnit is \"Monetary\"") diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyAcquirerData.java b/src/main/java/com/adyen/model/nexo/LoyaltyAcquirerData.java index 68602e7d5..768d5cd89 100644 --- a/src/main/java/com/adyen/model/nexo/LoyaltyAcquirerData.java +++ b/src/main/java/com/adyen/model/nexo/LoyaltyAcquirerData.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the loyalty Acquirer during a loyalty transaction. -- Usage: @@ -30,33 +27,29 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "LoyaltyAcquirerData", - propOrder = {"approvalCode", "loyaltyTransactionID"}) public class LoyaltyAcquirerData { /** The Approval code. */ - @XmlElement(name = "ApprovalCode") + @SerializedName("ApprovalCode") @Schema( description = "Code assigned to a transaction approval by the Acquirer. --Rule: If provided by the Acquirer") protected String approvalCode; /** The Loyalty transaction id. */ - @XmlElement(name = "LoyaltyTransactionID") + @SerializedName("LoyaltyTransactionID") @Schema( description = "Identification of the Transaction for the Loyalty Acquirer. --Rule: If provided by the Acquirer") protected TransactionIdentification loyaltyTransactionID; /** The Loyalty acquirer id. */ - @XmlElement(name = "LoyaltyAcquirerID") + @SerializedName("LoyaltyAcquirerID") @Schema(description = "Identification of the loyalty Acquirer. --Rule: If available") protected String loyaltyAcquirerID; /** The Host reconciliation id. */ - @XmlElement(name = "HostReconciliationID") + @SerializedName("HostReconciliationID") @Schema( description = "Identifier of a reconciliation period with a payment or loyalty host. --Rule: If provided by the Acquirer") diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyAmount.java b/src/main/java/com/adyen/model/nexo/LoyaltyAmount.java index be56ea4b2..56a29d08a 100644 --- a/src/main/java/com/adyen/model/nexo/LoyaltyAmount.java +++ b/src/main/java/com/adyen/model/nexo/LoyaltyAmount.java @@ -1,12 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; /** * Definition: Amount of a loyalty account. -- Usage: An awarded amount or an amount to redeem to @@ -29,21 +25,17 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "LoyaltyAmount", - propOrder = {"value"}) public class LoyaltyAmount { /** The Value. */ - @XmlValue protected BigDecimal value; + protected BigDecimal value; /** The Loyalty unit. */ - @XmlElement(name = "LoyaltyUnit") + @SerializedName("LoyaltyUnit") protected LoyaltyUnitType loyaltyUnit; /** The Currency. */ - @XmlElement(name = "Currency") + @SerializedName("Currency") @Schema(description = "Currency of a monetary amount. --Rule: if LoyaltyUnit is Monetary") protected String currency; diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyData.java b/src/main/java/com/adyen/model/nexo/LoyaltyData.java index 48c05cf31..8cdae2bef 100644 --- a/src/main/java/com/adyen/model/nexo/LoyaltyData.java +++ b/src/main/java/com/adyen/model/nexo/LoyaltyData.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to a Loyalty program or account. -- Usage: In the Payment, Loyalty or @@ -29,28 +26,24 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "LoyaltyData", - propOrder = {"cardAcquisitionReference", "loyaltyAccountID", "loyaltyAmount"}) public class LoyaltyData { /** The Card acquisition reference. */ - @XmlElement(name = "CardAcquisitionReference") + @SerializedName("CardAcquisitionReference") @Schema( description = "Reference to the last CardAcquisition, to use the same card. --Rule: If the loyalty account ID comes from a previous CardAcquisition") protected TransactionIdentification cardAcquisitionReference; /** The Loyalty account id. */ - @XmlElement(name = "LoyaltyAccountID") + @SerializedName("LoyaltyAccountID") @Schema( description = "Identification of a Loyalty account. --Rule: If loyalty identification of the loyalty account is realised by the Sale System") protected LoyaltyAccountID loyaltyAccountID; /** The Loyalty amount. */ - @XmlElement(name = "LoyaltyAmount") + @SerializedName("LoyaltyAmount") @Schema( description = "Amount of a loyalty account. --Rule: When the Sale System want to award the Loyalty account (not for BalanceInquiryRequest)") diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyHandlingType.java b/src/main/java/com/adyen/model/nexo/LoyaltyHandlingType.java index 000b405d3..2aca08e86 100644 --- a/src/main/java/com/adyen/model/nexo/LoyaltyHandlingType.java +++ b/src/main/java/com/adyen/model/nexo/LoyaltyHandlingType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for LoyaltyHandlingType. @@ -23,15 +21,13 @@ * </simpleType> * */ -@XmlType(name = "LoyaltyHandlingType") -@XmlEnum public enum LoyaltyHandlingType { /** * No loyalty card to read and loyalty transaction to process. Any attempt to enter a pure loyalty * card is rejected. */ - @XmlEnumValue("Forbidden") + @SerializedName("Forbidden") @Schema( description = "No loyalty card to read and loyalty transaction to process. Any attempt to enter a pure loyalty card is rejected.") @@ -41,7 +37,7 @@ public enum LoyaltyHandlingType { * The loyalty transaction is already processed, no loyalty card or loyalty transaction to * process. */ - @XmlEnumValue("Processed") + @SerializedName("Processed") @Schema( description = "The loyalty transaction is already processed, no loyalty card or loyalty transaction to process.") @@ -51,7 +47,7 @@ public enum LoyaltyHandlingType { * The loyalty is accepted, but the POI has not to require or ask a loyalty card. The loyalty is * involved by the payment card (e.g. an hybrid or linked card). */ - @XmlEnumValue("Allowed") + @SerializedName("Allowed") @Schema( description = "The loyalty is accepted, but the POI has not to require or ask a loyalty card. The loyalty is involved by the payment card (e.g. an hybrid or linked card).") @@ -61,7 +57,7 @@ public enum LoyaltyHandlingType { * The loyalty is accepted, and the POI has to ask a loyalty card. If the Customer does not enter * a loyalty card, no loyalty transaction is realised. */ - @XmlEnumValue("Proposed") + @SerializedName("Proposed") @Schema( description = "The loyalty is accepted, and the POI has to ask a loyalty card. If the Customer does not enter a loyalty card, no loyalty transaction is realised.") @@ -71,7 +67,7 @@ public enum LoyaltyHandlingType { * The loyalty is required, and the POI refuses the processing of the messageType request if the * cardholder does not entre a loyalty card */ - @XmlEnumValue("Required") + @SerializedName("Required") @Schema( description = "The loyalty is required, and the POI refuses the processing of the message request if the cardholder does not entre a loyalty card") diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyRequest.java b/src/main/java/com/adyen/model/nexo/LoyaltyRequest.java index 7e0b06c22..179ae21da 100644 --- a/src/main/java/com/adyen/model/nexo/LoyaltyRequest.java +++ b/src/main/java/com/adyen/model/nexo/LoyaltyRequest.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Loyalty Request messageType. -- Usage: It conveys Information related @@ -30,24 +27,20 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "LoyaltyRequest", - propOrder = {"saleData", "loyaltyTransaction", "loyaltyData"}) public class LoyaltyRequest { /** The Sale data. */ - @XmlElement(name = "SaleData", required = true) + @SerializedName("SaleData") @Schema(description = "Data related to the Sale System.") protected SaleData saleData; /** The Loyalty transaction. */ - @XmlElement(name = "LoyaltyTransaction", required = true) + @SerializedName("LoyaltyTransaction") @Schema(description = "Data related to the loyalty transaction.") protected LoyaltyTransaction loyaltyTransaction; /** The Loyalty data. */ - @XmlElement(name = "LoyaltyData") + @SerializedName("LoyaltyData") @Schema(description = "Data related to a Loyalty program or account.") protected List loyaltyData; diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyResponse.java b/src/main/java/com/adyen/model/nexo/LoyaltyResponse.java index 0085c8734..3cba2fde0 100644 --- a/src/main/java/com/adyen/model/nexo/LoyaltyResponse.java +++ b/src/main/java/com/adyen/model/nexo/LoyaltyResponse.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Loyalty Response messageType. -- Usage: It conveys Information related @@ -32,36 +29,32 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "LoyaltyResponse", - propOrder = {"response", "saleData", "poiData", "loyaltyResult", "paymentReceipt"}) public class LoyaltyResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Sale data. */ - @XmlElement(name = "SaleData", required = true) + @SerializedName("SaleData") @Schema(description = "Data related to the Sale System.") protected SaleData saleData; /** The Poi data. */ - @XmlElement(name = "POIData", required = true) + @SerializedName("POIData") @Schema(description = "Data related to the POI System.") protected POIData poiData; /** The Loyalty result. */ - @XmlElement(name = "LoyaltyResult") + @SerializedName("LoyaltyResult") @Schema( description = "Data related to the result of a processed loyalty transaction. --Rule: if loyalty account identified") protected List loyaltyResult; /** The Payment receipt. */ - @XmlElement(name = "PaymentReceipt") + @SerializedName("PaymentReceipt") @Schema( description = "Customer or Merchant payment receipt. --Rule: If Basic profile implementation with no printer on the POI.") diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyResult.java b/src/main/java/com/adyen/model/nexo/LoyaltyResult.java index 7008e7f6b..f7118bda5 100644 --- a/src/main/java/com/adyen/model/nexo/LoyaltyResult.java +++ b/src/main/java/com/adyen/model/nexo/LoyaltyResult.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the result of a processed loyalty transaction. -- Usage: In the @@ -31,36 +28,32 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "LoyaltyResult", - propOrder = {"loyaltyAccount", "loyaltyAmount", "loyaltyAcquirerData", "rebates"}) public class LoyaltyResult { /** The Loyalty account. */ - @XmlElement(name = "LoyaltyAccount", required = true) + @SerializedName("LoyaltyAccount") @Schema(description = "Data related to a loyalty account processed in the transaction.") protected LoyaltyAccount loyaltyAccount; /** The Loyalty amount. */ - @XmlElement(name = "LoyaltyAmount") + @SerializedName("LoyaltyAmount") @Schema(description = "Amount of a loyalty account. --Rule: If awarded amount") protected LoyaltyAmount loyaltyAmount; /** The Loyalty acquirer data. */ - @XmlElement(name = "LoyaltyAcquirerData") + @SerializedName("LoyaltyAcquirerData") @Schema( description = "Data related to the loyalty Acquirer during a loyalty transaction. --Rule: if content not empty") protected LoyaltyAcquirerData loyaltyAcquirerData; /** The Rebates. */ - @XmlElement(name = "Rebates") + @SerializedName("Rebates") @Schema(description = "Rebate form to an award; --Rule: if rebates awarded") protected Rebates rebates; /** The Current balance. */ - @XmlElement(name = "CurrentBalance") + @SerializedName("CurrentBalance") @Schema( description = "Balance of an account. --Rule: if known (provided by the card or an external host)") diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyTotals.java b/src/main/java/com/adyen/model/nexo/LoyaltyTotals.java index bc122a992..8f0f8eada 100644 --- a/src/main/java/com/adyen/model/nexo/LoyaltyTotals.java +++ b/src/main/java/com/adyen/model/nexo/LoyaltyTotals.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Totals of the loyalty transaction during the reconciliation period. @@ -27,24 +24,22 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "LoyaltyTotals") public class LoyaltyTotals { /** The Transaction. */ - @XmlElement(name = "TransactionType", required = true) + @SerializedName("TransactionType") @Schema( description = "Type of transaction for which totals are grouped. --Rule: Award, ReverseAward, Redemption, ReverseRedemption, Rebate, ReverseRebate") protected TransactionType transactionType; /** The Transaction count. */ - @XmlElement(name = "TransactionCount", required = true) + @SerializedName("TransactionCount") @Schema(description = "Number of processed transaction during the period.") protected BigInteger transactionCount; /** The Transaction amount. */ - @XmlElement(name = "TransactionAmount", required = true) + @SerializedName("TransactionAmount") @Schema(description = "Sum of amount of processed transaction during the period.") protected BigDecimal transactionAmount; diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyTransaction.java b/src/main/java/com/adyen/model/nexo/LoyaltyTransaction.java index b5af32bfe..4ab1da7dc 100644 --- a/src/main/java/com/adyen/model/nexo/LoyaltyTransaction.java +++ b/src/main/java/com/adyen/model/nexo/LoyaltyTransaction.java @@ -1,13 +1,10 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the loyalty transaction. @@ -33,43 +30,39 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "LoyaltyTransaction", - propOrder = {"originalPOITransaction", "transactionConditions", "saleItem"}) public class LoyaltyTransaction { /** The Original poi transaction. */ - @XmlElement(name = "OriginalPOITransaction") + @SerializedName("OriginalPOITransaction") @Schema( description = "Identification of a previous POI transaction. --Rule: if LoyaltyTransactionType is \"AwardRefund\", \"RebateRefund\" or \"RedemptionRefund\"") protected OriginalPOITransaction originalPOITransaction; /** The Transaction conditions. */ - @XmlElement(name = "TransactionConditions") + @SerializedName("TransactionConditions") @Schema( description = "Conditions on which the transaction must be processed. --Rule: If one data element is present") protected TransactionConditions transactionConditions; /** The Sale item. */ - @XmlElement(name = "SaleItem") + @SerializedName("SaleItem") @Schema(description = "Sale items of a transaction.") protected List saleItem; /** The Loyalty transaction. */ - @XmlElement(name = "LoyaltyTransactionType", required = true) + @SerializedName("LoyaltyTransactionType") @Schema(description = "Type of loyalty transaction.") protected LoyaltyTransactionType loyaltyTransactionType; /** The Currency. */ - @XmlElement(name = "Currency") + @SerializedName("Currency") @Schema(description = "Currency of a monetary amount.") protected String currency; /** The Total amount. */ - @XmlElement(name = "TotalAmount") + @SerializedName("TotalAmount") @Schema(description = "Amount of a transaction.") protected BigDecimal totalAmount; diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyTransactionType.java b/src/main/java/com/adyen/model/nexo/LoyaltyTransactionType.java index 27c58f5c5..a6fcab972 100644 --- a/src/main/java/com/adyen/model/nexo/LoyaltyTransactionType.java +++ b/src/main/java/com/adyen/model/nexo/LoyaltyTransactionType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for LoyaltyTransactionType. @@ -24,42 +22,40 @@ * </simpleType> * */ -@XmlType(name = "LoyaltyTransactionType") -@XmlEnum public enum LoyaltyTransactionType { /** * Direct or payment related award on a loyalty account. Award alone, award associated to a * payment (may be with an additional award alone), award because of a */ - @XmlEnumValue("Award") + @SerializedName("Award") @Schema( description = "Direct or payment related award on a loyalty account. Award alone, award associated to a payment (may be with an additional award alone), award because of a") AWARD("Award"), /** Rebate on a total amount, sale item amount, or sale items */ - @XmlEnumValue("Rebate") + @SerializedName("Rebate") @Schema(description = "Rebate on a total amount, sale item amount, or sale items") REBATE("Rebate"), /** Redemption on a loyalty account. */ - @XmlEnumValue("Redemption") + @SerializedName("Redemption") @Schema(description = "Redemption on a loyalty account.") REDEMPTION("Redemption"), /** Refund of a loyalty award transaction. */ - @XmlEnumValue("AwardRefund") + @SerializedName("AwardRefund") @Schema(description = "Refund of a loyalty award transaction.") AWARD_REFUND("AwardRefund"), /** Refund of a loyalty rebate transaction. */ - @XmlEnumValue("RebateRefund") + @SerializedName("RebateRefund") @Schema(description = "Refund of a loyalty rebate transaction.") REBATE_REFUND("RebateRefund"), /** Refund of a loyalty redemption transaction. */ - @XmlEnumValue("RedemptionRefund") + @SerializedName("RedemptionRefund") @Schema(description = "Refund of a loyalty redemption transaction.") REDEMPTION_REFUND("RedemptionRefund"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyUnitType.java b/src/main/java/com/adyen/model/nexo/LoyaltyUnitType.java index 7c2cd445f..b6dec1178 100644 --- a/src/main/java/com/adyen/model/nexo/LoyaltyUnitType.java +++ b/src/main/java/com/adyen/model/nexo/LoyaltyUnitType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for LoyaltyUnitType. @@ -20,17 +18,15 @@ * </simpleType> * */ -@XmlType(name = "LoyaltyUnitType") -@XmlEnum public enum LoyaltyUnitType { /** The amount is expressed in point. */ - @XmlEnumValue("Point") + @SerializedName("Point") @Schema(description = "The amount is expressed in point.") POINT("Point"), /** The amount is expressed in a monetary value in a currency. */ - @XmlEnumValue("Monetary") + @SerializedName("Monetary") @Schema(description = "The amount is expressed in a monetary value in a currency.") MONETARY("Monetary"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/MenuEntry.java b/src/main/java/com/adyen/model/nexo/MenuEntry.java index a43531449..9410c1800 100644 --- a/src/main/java/com/adyen/model/nexo/MenuEntry.java +++ b/src/main/java/com/adyen/model/nexo/MenuEntry.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: An entryof the menu to present to the Cashier -- Usage: It conveys messageType text @@ -34,45 +31,41 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "MenuEntry", - propOrder = {"predefinedContent", "outputText", "outputXHTML"}) public class MenuEntry { /** The Predefined content. */ - @XmlElement(name = "PredefinedContent") + @SerializedName("PredefinedContent") @Schema( description = "Reference of a predefined message to display or print. --Rule: Mandatory, if OutputFormat is MessageRef, not allowed otherwise.") protected PredefinedContent predefinedContent; /** The Output text. */ - @XmlElement(name = "OutputText") + @SerializedName("OutputText") @Schema( description = "Content of text message to display or print. --Rule: Mandatory, if OutputFormat is Text, not allowed otherwise. One instance of OutputText per shared format") protected List outputText; /** The Output xhtml. */ - @XmlElement(name = "OutputXHTML") + @SerializedName("OutputXHTML") @Schema( description = "XHTML document body containing the message to display or print. --Rule: Mandatory, if OutputFormat is XHTML, not allowed otherwise.") protected byte[] outputXHTML; /** The Menu entry tag. */ - @XmlElement(name = "MenuEntryTag") + @SerializedName("MenuEntryTag") @Schema(description = "Characteristics related to the selection of a menu entry") protected MenuEntryTagType menuEntryTag; /** The Output format. */ - @XmlElement(name = "OutputFormat", required = true) + @SerializedName("OutputFormat") @Schema(description = "Format of the content to display or print --Rule: MessageRef, Text, XHTML") protected OutputFormatType outputFormat; /** The Default selected flag. */ - @XmlElement(name = "DefaultSelectedFlag") + @SerializedName("DefaultSelectedFlag") @Schema(description = "Selection of a menu entry to be displayed.") protected Boolean defaultSelectedFlag; diff --git a/src/main/java/com/adyen/model/nexo/MenuEntryTagType.java b/src/main/java/com/adyen/model/nexo/MenuEntryTagType.java index 3b2a28cc2..f190052c5 100644 --- a/src/main/java/com/adyen/model/nexo/MenuEntryTagType.java +++ b/src/main/java/com/adyen/model/nexo/MenuEntryTagType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for MenuEntryTagType. @@ -22,17 +20,15 @@ * </simpleType> * */ -@XmlType(name = "MenuEntryTagType") -@XmlEnum public enum MenuEntryTagType { /** The Cashier may select this entryof the menu */ - @XmlEnumValue("Selectable") + @SerializedName("Selectable") @Schema(description = "The Cashier may select this entryof the menu") SELECTABLE("Selectable"), /** The Cashier cannot select this entryof the menu */ - @XmlEnumValue("NonSelectable") + @SerializedName("NonSelectable") @Schema(description = "The Cashier cannot select this entryof the menu") NON_SELECTABLE("NonSelectable"), @@ -40,14 +36,14 @@ public enum MenuEntryTagType { * The selection of this entry produces the display of a sub-menu (by the sending of another Input * Request messageType containing the entries of this sub-menu). */ - @XmlEnumValue("SubMenu") + @SerializedName("SubMenu") @Schema( description = "The selection of this entry produces the display of a sub-menu (by the sending of another Input Request message containing the entries of this sub-menu).") SUB_MENU("SubMenu"), /** The menu entry is a submenu, but cannot be selected. */ - @XmlEnumValue("NonSelectableSubMenu") + @SerializedName("NonSelectableSubMenu") @Schema(description = "The menu entry is a submenu, but cannot be selected.") NON_SELECTABLE_SUB_MENU("NonSelectableSubMenu"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/MessageCategoryType.java b/src/main/java/com/adyen/model/nexo/MessageCategoryType.java index 060f70bd5..f5f4caf07 100644 --- a/src/main/java/com/adyen/model/nexo/MessageCategoryType.java +++ b/src/main/java/com/adyen/model/nexo/MessageCategoryType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for MessageCategoryType. @@ -45,102 +43,100 @@ * </simpleType> * */ -@XmlType(name = "MessageCategoryType") -@XmlEnum public enum MessageCategoryType { /** Abort messageType request */ - @XmlEnumValue("Abort") + @SerializedName("Abort") @Schema(description = "Abort message request") ABORT("Abort"), /** Admin request or response */ - @XmlEnumValue("Admin") + @SerializedName("Admin") @Schema(description = "Admin request or response") ADMIN("Admin"), /** Balance Inquiry request or response */ - @XmlEnumValue("BalanceInquiry") + @SerializedName("BalanceInquiry") @Schema(description = "Balance Inquiry request or response") BALANCE_INQUIRY("BalanceInquiry"), /** Batch request or response */ - @XmlEnumValue("Batch") + @SerializedName("Batch") @Schema(description = "Batch request or response") BATCH("Batch"), /** Card Acquisition request or response */ - @XmlEnumValue("CardAcquisition") + @SerializedName("CardAcquisition") @Schema(description = "Card Acquisition request or response") CARD_ACQUISITION("CardAcquisition"), /** Card Reader APDU request or response */ - @XmlEnumValue("CardReaderAPDU") + @SerializedName("CardReaderAPDU") @Schema(description = "Card Reader APDU request or response") CARD_READER_APDU("CardReaderAPDU"), /** Card Reader Init request or response */ - @XmlEnumValue("CardReaderInit") + @SerializedName("CardReaderInit") @Schema(description = "Card Reader Init request or response") CARD_READER_INIT("CardReaderInit"), /** Card Reader Power-Off request or response */ - @XmlEnumValue("CardReaderPowerOff") + @SerializedName("CardReaderPowerOff") @Schema(description = "Card Reader Power-Off request or response") CARD_READER_POWER_OFF("CardReaderPowerOff"), /** Diagnosis request or response */ - @XmlEnumValue("Diagnosis") + @SerializedName("Diagnosis") @Schema(description = "Diagnosis request or response") DIAGNOSIS("Diagnosis"), /** Display messageType request or response */ - @XmlEnumValue("Display") + @SerializedName("Display") @Schema(description = "Display message request or response") DISPLAY("Display"), /** Enable Service messageType request or response */ - @XmlEnumValue("EnableService") + @SerializedName("EnableService") @Schema(description = "Enable Service message request or response") ENABLE_SERVICE("EnableService"), /** Event Notification messageType */ - @XmlEnumValue("Event") + @SerializedName("Event") @Schema(description = "Event Notification message") EVENT("Event"), /** GetTotals messageType request or response */ - @XmlEnumValue("GetTotals") + @SerializedName("GetTotals") @Schema(description = "GetTotals message request or response") GET_TOTALS("GetTotals"), /** Input messageType request or response */ - @XmlEnumValue("Input") + @SerializedName("Input") @Schema(description = "Input message request or response") INPUT("Input"), /** Input Update messageType */ - @XmlEnumValue("InputUpdate") + @SerializedName("InputUpdate") @Schema(description = "Input Update message") INPUT_UPDATE("InputUpdate"), /** Login messageType request or response */ - @XmlEnumValue("Login") + @SerializedName("Login") @Schema(description = "Login message request or response") LOGIN("Login"), /** Logout messageType request or response */ - @XmlEnumValue("Logout") + @SerializedName("Logout") @Schema(description = "Logout message request or response") LOGOUT("Logout"), /** Loyalty messageType request or response */ - @XmlEnumValue("Loyalty") + @SerializedName("Loyalty") @Schema(description = "Loyalty message request or response") LOYALTY("Loyalty"), /** Payment messageType request or response */ - @XmlEnumValue("Payment") + @SerializedName("Payment") @Schema(description = "Payment message request or response") PAYMENT("Payment"), @@ -148,37 +144,37 @@ public enum MessageCategoryType { PIN("PIN"), /** Print messageType request or response */ - @XmlEnumValue("Print") + @SerializedName("Print") @Schema(description = "Print message request or response") PRINT("Print"), /** Reconciliation messageType request or response */ - @XmlEnumValue("Reconciliation") + @SerializedName("Reconciliation") @Schema(description = "Reconciliation message request or response") RECONCILIATION("Reconciliation"), /** Reversal messageType request or response */ - @XmlEnumValue("Reversal") + @SerializedName("Reversal") @Schema(description = "Reversal message request or response") REVERSAL("Reversal"), /** Sound messageType request or response */ - @XmlEnumValue("Sound") + @SerializedName("Sound") @Schema(description = "Sound message request or response") SOUND("Sound"), /** Stored Value messageType request or response */ - @XmlEnumValue("StoredValue") + @SerializedName("StoredValue") @Schema(description = "Stored Value message request or response") STORED_VALUE("StoredValue"), /** TransactionStatus messageType request or response */ - @XmlEnumValue("TransactionStatus") + @SerializedName("TransactionStatus") @Schema(description = "TransactionStatus message request or response") TRANSACTION_STATUS("TransactionStatus"), /** Transmit messageType request or response */ - @XmlEnumValue("Transmit") + @SerializedName("Transmit") @Schema(description = "Transmit message request or response") TRANSMIT("Transmit"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/MessageClassType.java b/src/main/java/com/adyen/model/nexo/MessageClassType.java index f5229425c..5586610a0 100644 --- a/src/main/java/com/adyen/model/nexo/MessageClassType.java +++ b/src/main/java/com/adyen/model/nexo/MessageClassType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for MessageClassType. @@ -21,14 +19,12 @@ * </simpleType> * */ -@XmlType(name = "MessageClassType") -@XmlEnum public enum MessageClassType { /** * A transaction messageType pair initiated by the Sale System, and requested to the POI System. */ - @XmlEnumValue("Service") + @SerializedName("Service") @Schema( description = "A transaction message pair initiated by the Sale System, and requested to the POI System.") @@ -38,14 +34,14 @@ public enum MessageClassType { * A device messageType pair either: Inside a Service request and response. This device * messageType pair is initiated by the POI System, and sent to Sale System, */ - @XmlEnumValue("Device") + @SerializedName("Device") @Schema( description = "A device message pair either: Inside a Service request and response. This device message pair is initiated by the POI System, and sent to Sale System,") DEVICE("Device"), /** An unsolicited event notification by the POI System to the Sale System. */ - @XmlEnumValue("Event") + @SerializedName("Event") @Schema(description = "An unsolicited event notification by the POI System to the Sale System.") EVENT("Event"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/MessageHeader.java b/src/main/java/com/adyen/model/nexo/MessageHeader.java index 1326cdac3..b43ae4be2 100644 --- a/src/main/java/com/adyen/model/nexo/MessageHeader.java +++ b/src/main/java/com/adyen/model/nexo/MessageHeader.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Message header of the Sale to POI protocol messageType. -- Usage: It conveys @@ -31,32 +28,30 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "MessageHeader") public class MessageHeader { /** The Protocol version. */ - @XmlElement(name = "ProtocolVersion") + @SerializedName("ProtocolVersion") @Schema(description = ">--Rule:If MessageCategory is Login or Diagnosis") protected String protocolVersion; /** The Message class. */ - @XmlElement(name = "MessageClass", required = true) + @SerializedName("MessageClass") @Schema(description = "Class of the message") protected MessageClassType messageClass; /** The Message category. */ - @XmlElement(name = "MessageCategory", required = true) + @SerializedName("MessageCategory") @Schema(description = "Category of message.") protected MessageCategoryType messageCategory; /** The Message type. */ - @XmlElement(name = "MessageType", required = true) + @SerializedName("MessageType") @Schema(description = "Type of message of the Sale to POI protocol") protected MessageType messageType; /** The Service id. */ - @XmlElement(name = "ServiceID") + @SerializedName("ServiceID") @Schema( description = "Identification of a message pair, which processes a transaction --Rule: If \"Service\" or \"Event\" MessageClass message. If \"Device\" MessageClass, and request from POI or response from Sale.", @@ -65,20 +60,20 @@ public class MessageHeader { protected String serviceID; /** The Device id. */ - @XmlElement(name = "DeviceID") + @SerializedName("DeviceID") @Schema( description = "Identification of a device message pair --Rule: If \"Device\" MessageClass") protected String deviceID; /** The Sale id. */ - @XmlElement(name = "SaleID", required = true) + @SerializedName("SaleID") @Schema( description = "Identification of a Sale System or a Sale Terminal for the Sale to POI protocol") protected String saleID; /** The Poiid. */ - @XmlElement(name = "POIID", required = true) + @SerializedName("POIID") @Schema( description = "Identification of a POI System or a POI Terminal for the Sale to POI protocol") protected String poiid; diff --git a/src/main/java/com/adyen/model/nexo/MessageReference.java b/src/main/java/com/adyen/model/nexo/MessageReference.java index ecbc45eb0..edb65a3f5 100644 --- a/src/main/java/com/adyen/model/nexo/MessageReference.java +++ b/src/main/java/com/adyen/model/nexo/MessageReference.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Identification of a previous POI transaction. -- Usage: To abort a transaction in @@ -30,36 +27,34 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "MessageReference") public class MessageReference { /** The Message category. */ - @XmlElement(name = "MessageCategory") + @SerializedName("MessageCategory") @Schema( description = "Category of message. --Rule: Payment, Loyalty, StoredValue, CardAcquisition, Batch, Reconciliation, Display, Input, Print, CardReaderAPDU,") protected MessageCategoryType messageCategory; /** The Service id. */ - @XmlElement(name = "ServiceID") + @SerializedName("ServiceID") @Schema(description = "Identification of a message pair, which processes a transaction") protected String serviceID; /** The Device id. */ - @XmlElement(name = "DeviceID") + @SerializedName("DeviceID") @Schema(description = "Identification of a device message pair", minLength = 1, maxLength = 10) protected String deviceID; /** The Sale id. */ - @XmlElement(name = "SaleID") + @SerializedName("SaleID") @Schema( description = "Identification of a Sale System or a Sale Terminal for the Sale to POI protocol --Rule: default MessageHeader.SaleID") protected String saleID; /** The Poiid. */ - @XmlElement(name = "POIID") + @SerializedName("POIID") @Schema( description = "Identification of a POI System or a POI Terminal for the Sale to POI protocol --Rule: default MessageHeader.POIID") diff --git a/src/main/java/com/adyen/model/nexo/MessageType.java b/src/main/java/com/adyen/model/nexo/MessageType.java index 3ccbdab5b..0fd7bf530 100644 --- a/src/main/java/com/adyen/model/nexo/MessageType.java +++ b/src/main/java/com/adyen/model/nexo/MessageType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for MessageType. @@ -21,27 +19,25 @@ * </simpleType> * */ -@XmlType(name = "MessageType") -@XmlEnum public enum MessageType { /** * Request messageType that requires a response, except if the request messageType mentions * explicitely that a response messageType is not expected. */ - @XmlEnumValue("Request") + @SerializedName("Request") @Schema( description = "Request message that requires a response, except if the request message mentions explicitely that a response message is not expected.") REQUEST("Request"), /** Response messageType, sent to answer to a request messageType. */ - @XmlEnumValue("Response") + @SerializedName("Response") @Schema(description = "Response message, sent to answer to a request message.") RESPONSE("Response"), /** Unsollicited notification messageType that does not require an answer. */ - @XmlEnumValue("Notification") + @SerializedName("Notification") @Schema(description = "Unsollicited notification message that does not require an answer.") NOTIFICATION("Notification"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/MobileData.java b/src/main/java/com/adyen/model/nexo/MobileData.java index 3c9dbd070..a6f5cfcce 100644 --- a/src/main/java/com/adyen/model/nexo/MobileData.java +++ b/src/main/java/com/adyen/model/nexo/MobileData.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Information related to the mobile for the payment transaction. -- Usage: Mobile phone @@ -31,14 +28,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "MobileData", - propOrder = {"mobileCountryCode", "geolocation", "protectedMobileData", "sensitiveMobileData"}) public class MobileData { /** The Mobile country code. */ - @XmlElement(name = "MobileCountryCode") + @SerializedName("MobileCountryCode") @Schema( description = "Identifies the country of a mobile phone operator. --Rule: If data available", minLength = 3, @@ -46,28 +39,28 @@ public class MobileData { protected String mobileCountryCode; /** The Geolocation. */ - @XmlElement(name = "Geolocation") + @SerializedName("Geolocation") @Schema( description = "Geographic location specified by geographic or UTM coordinates. --Rule: If data available") protected Geolocation geolocation; /** The Protected mobile data. */ - @XmlElement(name = "ProtectedMobileData") + @SerializedName("ProtectedMobileData") @Schema( description = "Sensitive information related to the mobile phone, protected by CMS. --Rule: SensitiveMobileData") protected ContentInformation protectedMobileData; /** The Sensitive mobile data. */ - @XmlElement(name = "SensitiveMobileData") + @SerializedName("SensitiveMobileData") @Schema( description = "Sensitive information related to the mobile phone. --Rule: If unprotected mobile data") protected SensitiveMobileData sensitiveMobileData; /** The Mobile network code. */ - @XmlElement(name = "MobileNetworkCode") + @SerializedName("MobileNetworkCode") @Schema( description = "Identifies the mobile phone operator inside a country. --Rule: If data available", @@ -76,7 +69,7 @@ public class MobileData { protected String mobileNetworkCode; /** The Masked msisdn. */ - @XmlElement(name = "MaskedMSISDN") + @SerializedName("MaskedMSISDN") @Schema( description = "Masked Mobile Subscriber Integrated Service Digital Network. --Rule: If data available") diff --git a/src/main/java/com/adyen/model/nexo/NamedKeyEncryptedData.java b/src/main/java/com/adyen/model/nexo/NamedKeyEncryptedData.java index 5a463b8fe..d7a9c45d1 100644 --- a/src/main/java/com/adyen/model/nexo/NamedKeyEncryptedData.java +++ b/src/main/java/com/adyen/model/nexo/NamedKeyEncryptedData.java @@ -1,9 +1,6 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import com.google.gson.annotations.SerializedName; /** * Definition: Cryptographic Message Syntax (CMS) data structure containing encrypted data and @@ -29,22 +26,18 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "NamedKeyEncryptedData", - propOrder = {"keyName", "encryptedContent"}) public class NamedKeyEncryptedData { /** The Key name. */ - @XmlElement(name = "KeyName") + @SerializedName("KeyName") protected String keyName; /** The Encrypted content. */ - @XmlElement(name = "EncryptedContent", required = true) + @SerializedName("EncryptedContent") protected EncryptedContent encryptedContent; /** The Version. */ - @XmlElement(name = "Version") + @SerializedName("Version") protected VersionType version; /** diff --git a/src/main/java/com/adyen/model/nexo/ObjectFactory.java b/src/main/java/com/adyen/model/nexo/ObjectFactory.java index 271613bc3..459384c8c 100644 --- a/src/main/java/com/adyen/model/nexo/ObjectFactory.java +++ b/src/main/java/com/adyen/model/nexo/ObjectFactory.java @@ -1,9 +1,6 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlRegistry; - /** The type Object factory. */ -@XmlRegistry public class ObjectFactory { /** diff --git a/src/main/java/com/adyen/model/nexo/OriginalPOITransaction.java b/src/main/java/com/adyen/model/nexo/OriginalPOITransaction.java index 5c32feda7..da62c6a68 100644 --- a/src/main/java/com/adyen/model/nexo/OriginalPOITransaction.java +++ b/src/main/java/com/adyen/model/nexo/OriginalPOITransaction.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Identification of a previous POI transaction. -- Usage: In the Payment or the Loyalty @@ -35,58 +32,54 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "OriginalPOITransaction", - propOrder = {"poiTransactionID", "approvalCode", "hostTransactionID"}) public class OriginalPOITransaction { /** The Poi transaction id. */ - @XmlElement(name = "POITransactionID") + @SerializedName("POITransactionID") @Schema( description = "Unique identification of a POI transaction for a POI --Rule: Absent if SaleReferenceID is sufficient to identify the transaction, or for some reversal cases.") protected TransactionIdentification poiTransactionID; /** The Approval code. */ - @XmlElement(name = "ApprovalCode") + @SerializedName("ApprovalCode") @Schema( description = "Code assigned to a transaction approval by the Acquirer. --Rule: If referral") protected String approvalCode; /** The Host transaction id. */ - @XmlElement(name = "HostTransactionID") + @SerializedName("HostTransactionID") @Schema( description = "Identification of the transaction by the host in charge of the stored value transaction --Rule: If POITransactionID not present") protected TransactionIdentification hostTransactionID; /** The Sale id. */ - @XmlElement(name = "SaleID") + @SerializedName("SaleID") @Schema( description = "Identification of a Sale System or a Sale Terminal for the Sale to POI protocol") protected String saleID; /** The Poiid. */ - @XmlElement(name = "POIID") + @SerializedName("POIID") @Schema( description = "Identification of a POI System or a POI Terminal for the Sale to POI protocol --Rule: If original transaction is coming from another POI") protected String poiid; /** The Reuse card data flag. */ - @XmlElement(name = "ReuseCardDataFlag") + @SerializedName("ReuseCardDataFlag") @Schema(description = "Indicate if the card data has to be got from a previous transaction.") protected Boolean reuseCardDataFlag; /** The Customer language. */ - @XmlElement(name = "CustomerLanguage") + @SerializedName("CustomerLanguage") @Schema(description = "Language of the Customer --Rule: Optional for Reversal, otherwise absent.") protected String customerLanguage; /** The Acquirer id. */ - @XmlElement(name = "AcquirerID") + @SerializedName("AcquirerID") @Schema( description = "Identification of the Acquirer --Rule: Optional for Reversal, otherwise absent.") diff --git a/src/main/java/com/adyen/model/nexo/OutputBarcode.java b/src/main/java/com/adyen/model/nexo/OutputBarcode.java index 72d7f8572..fe44f7ccf 100644 --- a/src/main/java/com/adyen/model/nexo/OutputBarcode.java +++ b/src/main/java/com/adyen/model/nexo/OutputBarcode.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: BarCode content to display or print. -- Usage: Various usage of barcode @@ -24,15 +21,13 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "OutputBarcode") public class OutputBarcode { - @XmlElement(name = "BarcodeValue", required = true) + @SerializedName("BarcodeValue") @Schema(description = "Value with a BarCode coding.") protected String barcodeValue; - @XmlElement(name = "BarcodeType") + @SerializedName("BarcodeType") @Schema(description = "Type of BarCode coding.") protected BarcodeType barcodeType; diff --git a/src/main/java/com/adyen/model/nexo/OutputContent.java b/src/main/java/com/adyen/model/nexo/OutputContent.java index 843948480..f38b63fcd 100644 --- a/src/main/java/com/adyen/model/nexo/OutputContent.java +++ b/src/main/java/com/adyen/model/nexo/OutputContent.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content to display or print. -- Usage: This is a sequence of elements if they have @@ -32,42 +29,38 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "OutputContent", - propOrder = {"predefinedContent", "outputText", "outputXHTML", "outputBarcode"}) public class OutputContent { /** The Predefined content. */ - @XmlElement(name = "PredefinedContent") + @SerializedName("PredefinedContent") @Schema( description = "Reference of a predefined message to display or print. --Rule: Mandatory, if OutputFormat is MessageRef, not allowed otherwise.") protected PredefinedContent predefinedContent; /** The Output text. */ - @XmlElement(name = "OutputText") + @SerializedName("OutputText") @Schema( description = "Content of text message to display or print. --Rule: Mandatory, if OutputFormat is Text, not allowed otherwise. One instance of OutputText per shared format") protected List outputText; /** The Output xhtml. */ - @XmlElement(name = "OutputXHTML") + @SerializedName("OutputXHTML") @Schema( description = "XHTML document body containing the message to display or print. --Rule: Mandatory, if OutputFormat is XHTML, not allowed otherwise.") protected byte[] outputXHTML; /** The Output barcode. */ - @XmlElement(name = "OutputBarcode") + @SerializedName("OutputBarcode") @Schema( description = "BarCode content to display or print. --Rule: Mandatory, if OutputFormat is BarCode, not allowed otherwise.") protected OutputBarcode outputBarcode; /** The Output format. */ - @XmlElement(name = "OutputFormat", required = true) + @SerializedName("OutputFormat") @Schema(description = "Format of the content to display or print") protected OutputFormatType outputFormat; diff --git a/src/main/java/com/adyen/model/nexo/OutputFormatType.java b/src/main/java/com/adyen/model/nexo/OutputFormatType.java index ec326c40e..ef895578a 100644 --- a/src/main/java/com/adyen/model/nexo/OutputFormatType.java +++ b/src/main/java/com/adyen/model/nexo/OutputFormatType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for OutputFormatType. @@ -22,15 +20,13 @@ * </simpleType> * */ -@XmlType(name = "OutputFormatType") -@XmlEnum public enum OutputFormatType { /** * Predefined messageType (of any format) on the POI or the Sale. The output is then a * PredefinedContent data structure. */ - @XmlEnumValue("MessageRef") + @SerializedName("MessageRef") @Schema( description = "Predefined message (of any format) on the POI or the Sale. The output is then a PredefinedContent data structure. ") @@ -40,19 +36,19 @@ public enum OutputFormatType { * Text messageType including control characters prefixed by an escape character. The * DisplayOutput is then an OutputText data structure. */ - @XmlEnumValue("Text") + @SerializedName("Text") @Schema( description = "Text message including control characters prefixed by an escape character. The DisplayOutput is then an OutputText data structure.") TEXT("Text"), /** DisplayOutput uses the eXtensible HyperText Markup Language. */ - @XmlEnumValue("XHTML") + @SerializedName("XHTML") @Schema(description = "DisplayOutput uses the eXtensible HyperText Markup Language.") XHTML("XHTML"), /** Barcode type to print The output is then a OutputBarCode data structure. */ - @XmlEnumValue("BarCode") + @SerializedName("BarCode") @Schema(description = "Barcode type to print The output is then a OutputBarCode data structure.") BAR_CODE("BarCode"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/OutputResult.java b/src/main/java/com/adyen/model/nexo/OutputResult.java index 3dacfdad0..20e40da9d 100644 --- a/src/main/java/com/adyen/model/nexo/OutputResult.java +++ b/src/main/java/com/adyen/model/nexo/OutputResult.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Information related to the result the output (display, print, input). -- Usage: In @@ -29,26 +26,22 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "OutputResult", - propOrder = {"response"}) public class OutputResult { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Device. */ - @XmlElement(name = "Device", required = true) + @SerializedName("Device") @Schema( description = "Logical device located on a Sale Terminal or a POI Terminal, in term of class of information to output (display, print --Rule: Copy") protected DeviceType device; /** The Info qualify. */ - @XmlElement(name = "InfoQualify", required = true) + @SerializedName("InfoQualify") @Schema( description = "Qualification of the information to sent to an output logical device, to display or print to the Cashier or the --Rule: Copy") diff --git a/src/main/java/com/adyen/model/nexo/OutputText.java b/src/main/java/com/adyen/model/nexo/OutputText.java index e7e91f20a..0ab7d83a6 100644 --- a/src/main/java/com/adyen/model/nexo/OutputText.java +++ b/src/main/java/com/adyen/model/nexo/OutputText.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of text message to display or print. -- Usage: It conveys Information related @@ -35,69 +32,67 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "OutputText") public class OutputText { - @XmlElement(name = "Text", required = true) + @SerializedName("Text") @Schema(description = "Content of text message to display, print or play.") protected String text; - @XmlElement(name = "CharacterSet") + @SerializedName("CharacterSet") @Schema( description = "The character encoding of the text string. --Rule: If not present, the settings of thetarget system or device are used. ") protected Integer characterSet; - @XmlElement(name = "Font") + @SerializedName("Font") @Schema( description = "Name of the font. --Rule: If not present, the settings of the target system or deviceare used. ") protected String font; - @XmlElement(name = "StartRow") + @SerializedName("StartRow") @Schema( description = "Row from which the text string has to be displayed or printed. --Rule: If not present,the settings of the target system or device are used(e.g.current row position). ") protected Integer startRow; - @XmlElement(name = "StartColumn") + @SerializedName("StartColumn") @Schema( description = "Column from which the text string has to be displayed or printed. --Rule: If notpresent, the settings of the target system or device are used(e.g.current column position). ") protected Integer startColumn; - @XmlElement(name = "Color") + @SerializedName("Color") @Schema( description = "Color of the text string to display or print. --Rule: If not present, default colourused ") protected ColorType color; - @XmlElement(name = "CharacterWidth") + @SerializedName("CharacterWidth") @Schema( description = "Character width of the text string to display or print. --Rule: If not present, default width used") protected CharacterWidthType characterWidth; - @XmlElement(name = "CharacterHeight") + @SerializedName("CharacterHeight") @Schema( description = "Character height of the text string to display or print. --Rule: If not present, default height used ") protected CharacterHeightType characterHeight; - @XmlElement(name = "CharacterStyle") + @SerializedName("CharacterStyle") @Schema( description = "Typographic style of the sequence of characters to display or print. --Rule: If notpresent, default style used ") protected CharacterStyleType characterStyle; - @XmlElement(name = "Alignment") + @SerializedName("Alignment") @Schema( description = "Alignment of the text string on the display line or print line --Rule: If not present, default alignment used ") protected AlignmentType alignment; - @XmlElement(name = "EndOfLineFlag") + @SerializedName("EndOfLineFlag") @Schema(description = "Text is at the end of a line.") protected Boolean endOfLineFlag; diff --git a/src/main/java/com/adyen/model/nexo/PINFormatType.java b/src/main/java/com/adyen/model/nexo/PINFormatType.java index 8c07c66bc..a632bbebe 100644 --- a/src/main/java/com/adyen/model/nexo/PINFormatType.java +++ b/src/main/java/com/adyen/model/nexo/PINFormatType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for PINFormatType. @@ -22,27 +20,25 @@ * </simpleType> * */ -@XmlType(name = "PINFormatType") -@XmlEnum public enum PINFormatType { /** ISO 0 */ - @XmlEnumValue("ISO0") + @SerializedName("ISO0") @Schema(description = "ISO 0") ISO_0("ISO0"), /** ISO 1 */ - @XmlEnumValue("ISO1") + @SerializedName("ISO1") @Schema(description = "ISO 1") ISO_1("ISO1"), /** ISO 2 */ - @XmlEnumValue("ISO2") + @SerializedName("ISO2") @Schema(description = "ISO 2") ISO_2("ISO2"), /** ISO 3 */ - @XmlEnumValue("ISO3") + @SerializedName("ISO3") @Schema(description = "ISO 3") ISO_3("ISO3"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/PINRequest.java b/src/main/java/com/adyen/model/nexo/PINRequest.java index 01ef7f3d5..1a0525cb0 100644 --- a/src/main/java/com/adyen/model/nexo/PINRequest.java +++ b/src/main/java/com/adyen/model/nexo/PINRequest.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the PIN Request messageType. -- Usage: It contains the type of request @@ -34,53 +31,49 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "PINRequest", - propOrder = {"cardholderPIN"}) public class PINRequest { /** The Cardholder pin. */ - @XmlElement(name = "CardholderPIN") + @SerializedName("CardholderPIN") @Schema( description = "Encrypted PIN and related information --Rule: PINRequestTypeConformed to EPAS Acquirer protocol.") protected CardholderPIN cardholderPIN; /** The Pin request. */ - @XmlElement(name = "PINRequestType", required = true) + @SerializedName("PINRequestType") @Schema(description = "Type of PIN Service.") protected PINRequestType pinRequestType; /** The Pin verif method. */ - @XmlElement(name = "PINVerifMethod") + @SerializedName("PINVerifMethod") @Schema(description = "Identify the PIN verification method and keys. --Rule: PINRequestType") protected String pinVerifMethod; /** The Additional input. */ - @XmlElement(name = "AdditionalInput") + @SerializedName("AdditionalInput") @Schema( description = "Additional information required to verify the PIN like part of the PAN, or driver ID. --Rule: PINRequestType") protected String additionalInput; /** The Pin enc algorithm. */ - @XmlElement(name = "PINEncAlgorithm") + @SerializedName("PINEncAlgorithm") @Schema(description = "Identify the encrypted PIN block algorithm. --Rule: PINRequestType") protected String pinEncAlgorithm; /** The Pin format. */ - @XmlElement(name = "PINFormat") + @SerializedName("PINFormat") @Schema(description = "Identify the format of the PIN before encryption. --Rule: PINRequestType") protected PINFormatType pinFormat; /** The Key reference. */ - @XmlElement(name = "KeyReference") + @SerializedName("KeyReference") @Schema(description = "Identify the key to use to encrypt the PIN block. --Rule: PINRequestType") protected String keyReference; /** The Max waiting time. */ - @XmlElement(name = "MaxWaitingTime") + @SerializedName("MaxWaitingTime") @Schema( description = "Maximum time to wait for the request processing in seconds. --Rule: PINRequestTypePINRequestType") diff --git a/src/main/java/com/adyen/model/nexo/PINRequestType.java b/src/main/java/com/adyen/model/nexo/PINRequestType.java index c21888935..3c54b6740 100644 --- a/src/main/java/com/adyen/model/nexo/PINRequestType.java +++ b/src/main/java/com/adyen/model/nexo/PINRequestType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for PINRequestType. @@ -21,26 +19,24 @@ * </simpleType> * */ -@XmlType(name = "PINRequestType") -@XmlEnum public enum PINRequestType { /** The PIN Entering and Verify. */ - @XmlEnumValue("PINVerify") + @SerializedName("PINVerify") @Schema(description = "The PIN Entering and Verify.") PIN_VERIFY("PINVerify"), /** * The PIN Verify only, the PIN is entered before and the PIN Block (encrypted PIN) is provided. */ - @XmlEnumValue("PINVerifyOnly") + @SerializedName("PINVerifyOnly") @Schema( description = "The PIN Verify only, the PIN is entered before and the PIN Block (encrypted PIN) is provided.") PIN_VERIFY_ONLY("PINVerifyOnly"), /** The PIN is entered by the Cardholder, encrypted by the POI, and provided as a result. */ - @XmlEnumValue("PINEnter") + @SerializedName("PINEnter") @Schema( description = "The PIN is entered by the Cardholder, encrypted by the POI, and provided as a result.") diff --git a/src/main/java/com/adyen/model/nexo/PINResponse.java b/src/main/java/com/adyen/model/nexo/PINResponse.java index ba6a7c684..24ad93e76 100644 --- a/src/main/java/com/adyen/model/nexo/PINResponse.java +++ b/src/main/java/com/adyen/model/nexo/PINResponse.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the PIN Response messageType. -- Usage: It contains the result of the @@ -27,19 +24,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "PINResponse", - propOrder = {"response", "cardholderPIN"}) public class PINResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Cardholder pin. */ - @XmlElement(name = "CardholderPIN") + @SerializedName("CardholderPIN") @Schema(description = "Encrypted PIN and related information") protected CardholderPIN cardholderPIN; diff --git a/src/main/java/com/adyen/model/nexo/POICapabilitiesType.java b/src/main/java/com/adyen/model/nexo/POICapabilitiesType.java index 113d97c10..61c3e3b50 100644 --- a/src/main/java/com/adyen/model/nexo/POICapabilitiesType.java +++ b/src/main/java/com/adyen/model/nexo/POICapabilitiesType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for POICapabilitiesType. @@ -31,15 +29,13 @@ * </simpleType> * */ -@XmlType(name = "POICapabilitiesType") -@XmlEnum public enum POICapabilitiesType { /** * Used by the Sale System when the device is managed by the POI Terminal, to ask question or * display some information to the Cashier. */ - @XmlEnumValue("CashierDisplay") + @SerializedName("CashierDisplay") @Schema( description = "Used by the Sale System when the device is managed by the POI Terminal, to ask question or display some information to the Cashier.") @@ -49,7 +45,7 @@ public enum POICapabilitiesType { * To display to the Cashier information is related to an error situation occurring on the Sale * Terminal when the device is managed by the POI Terminal. */ - @XmlEnumValue("CashierError") + @SerializedName("CashierError") @Schema( description = "To display to the Cashier information is related to an error situation occurring on the Sale Terminal when the device is managed by the POI Terminal.") @@ -59,7 +55,7 @@ public enum POICapabilitiesType { * Any kind of keyboard allowing all or part of the commands of the Input messageType request from * the POI System to the Sale System (InputCommand data element). The */ - @XmlEnumValue("CashierInput") + @SerializedName("CashierInput") @Schema( description = "Any kind of keyboard allowing all or part of the commands of the Input message request from the POI System to the Sale System (InputCommand data element). The") @@ -69,7 +65,7 @@ public enum POICapabilitiesType { * Standard Customer display interface used by the Sale System to ask question, or to show * information to the Customer outside a Service dialogue. */ - @XmlEnumValue("CustomerDisplay") + @SerializedName("CustomerDisplay") @Schema( description = "Standard Customer display interface used by the Sale System to ask question, or to show information to the Customer outside a Service dialogue.") @@ -79,7 +75,7 @@ public enum POICapabilitiesType { * To display to the Customer information is related to an error situation occurring on the Sale * Terminal during a Sale transaction. */ - @XmlEnumValue("CustomerError") + @SerializedName("CustomerError") @Schema( description = "To display to the Customer information is related to an error situation occurring on the Sale Terminal during a Sale transaction.") @@ -89,35 +85,35 @@ public enum POICapabilitiesType { * Any kind of keyboard allowing all or part of the commands of the Input messageType request from * the POI System to the Sale System (InputCommand data element). The */ - @XmlEnumValue("CustomerInput") + @SerializedName("CustomerInput") @Schema( description = "Any kind of keyboard allowing all or part of the commands of the Input message request from the POI System to the Sale System (InputCommand data element). The") CUSTOMER_INPUT("CustomerInput"), /** Printer for the Sale receipt. */ - @XmlEnumValue("PrinterReceipt") + @SerializedName("PrinterReceipt") @Schema(description = "Printer for the Sale receipt.") PRINTER_RECEIPT("PrinterReceipt"), /** * When the Sale System wants to print specific document (check, dynamic currency conversion ...). */ - @XmlEnumValue("PrinterDocument") + @SerializedName("PrinterDocument") @Schema( description = "When the Sale System wants to print specific document (check, dynamic currency conversion ...). ") PRINTER_DOCUMENT("PrinterDocument"), /** Coupons, voucher or special ticket generated by the Sale System and to be printed. */ - @XmlEnumValue("PrinterVoucher") + @SerializedName("PrinterVoucher") @Schema( description = "Coupons, voucher or special ticket generated by the Sale System and to be printed.") PRINTER_VOUCHER("PrinterVoucher"), /** Magnetic stripe card reader */ - @XmlEnumValue("MagStripe") + @SerializedName("MagStripe") @Schema(description = "Magnetic stripe card reader") MAG_STRIPE("MagStripe"), @@ -125,12 +121,12 @@ public enum POICapabilitiesType { ICC("ICC"), /** Contactless card reader with EMV applications */ - @XmlEnumValue("EMVContactless") + @SerializedName("EMVContactless") @Schema(description = "Contactless card reader with EMV applications") EMV_CONTACTLESS("EMVContactless"), /** Device which performs cash change, cash dispense or cash acceptance. */ - @XmlEnumValue("CashHandling") + @SerializedName("CashHandling") @Schema(description = "Device which performs cash change, cash dispense or cash acceptance.") CASH_HANDLING("CashHandling"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/POIData.java b/src/main/java/com/adyen/model/nexo/POIData.java index 6e902e066..463b75efd 100644 --- a/src/main/java/com/adyen/model/nexo/POIData.java +++ b/src/main/java/com/adyen/model/nexo/POIData.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the POI System. -- Usage: In the Message Response, identification of @@ -27,19 +24,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "POIData", - propOrder = {"poiTransactionID"}) public class POIData { /** The Poi transaction id. */ - @XmlElement(name = "POITransactionID", required = true) + @SerializedName("POITransactionID") @Schema(description = "Unique identification of a POI transaction for a POI") protected TransactionIdentification poiTransactionID; /** The Poi reconciliation id. */ - @XmlElement(name = "POIReconciliationID") + @SerializedName("POIReconciliationID") @Schema( description = "Identification of the reconciliation period between Sale and POI. --Rule: If Result is Success") diff --git a/src/main/java/com/adyen/model/nexo/POIProfile.java b/src/main/java/com/adyen/model/nexo/POIProfile.java index cab6fb11d..82537de1a 100644 --- a/src/main/java/com/adyen/model/nexo/POIProfile.java +++ b/src/main/java/com/adyen/model/nexo/POIProfile.java @@ -1,13 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlList; -import javax.xml.bind.annotation.XmlType; /** * Definition: Functional profile of the POI Terminal. -- Usage: Sent in the Login Response to @@ -32,22 +28,17 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "POIProfile", - propOrder = {"serviceProfiles"}) public class POIProfile { /** The Service profiles. */ - @XmlList - @XmlElement(name = "ServiceProfiles") + @SerializedName("ServiceProfiles") @Schema( description = "Service profiles of the Sale to POI protocol. --Rule: If a service profile could be requested") protected List serviceProfiles; /** The Generic profile. */ - @XmlElement(name = "GenericProfile") + @SerializedName("GenericProfile") @Schema(description = "Functional profile of the Sale to POI protocol.") protected GenericProfileType genericProfile; diff --git a/src/main/java/com/adyen/model/nexo/POISoftware.java b/src/main/java/com/adyen/model/nexo/POISoftware.java index 60c61ea19..b236243c7 100644 --- a/src/main/java/com/adyen/model/nexo/POISoftware.java +++ b/src/main/java/com/adyen/model/nexo/POISoftware.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Information related to the software of the POI System which manages the Sale to POI @@ -27,27 +24,25 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "POISoftware") public class POISoftware { /** The Manufacturer id. */ - @XmlElement(name = "ManufacturerID", required = true) + @SerializedName("ManufacturerID") @Schema(description = "Identification of the Manufacturer") protected String manufacturerID; /** The Application name. */ - @XmlElement(name = "ApplicationName", required = true) + @SerializedName("ApplicationName") @Schema(description = "Name of the software product.") protected String applicationName; /** The Software version. */ - @XmlElement(name = "SoftwareVersion", required = true) + @SerializedName("SoftwareVersion") @Schema(description = "Version of the software product") protected String softwareVersion; /** The Certification code. */ - @XmlElement(name = "CertificationCode", required = true) + @SerializedName("CertificationCode") @Schema( description = "Certification code of the software which manages the Sale to POI protocol.") protected String certificationCode; diff --git a/src/main/java/com/adyen/model/nexo/POIStatus.java b/src/main/java/com/adyen/model/nexo/POIStatus.java index 1d194af51..f58914d8d 100644 --- a/src/main/java/com/adyen/model/nexo/POIStatus.java +++ b/src/main/java/com/adyen/model/nexo/POIStatus.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: State of a POI Terminal. -- Usage: Indicate the availability of the POI Terminal @@ -35,57 +32,53 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "POIStatus", - propOrder = {"cashHandlingDevice"}) public class POIStatus { /** The Cash handling device. */ - @XmlElement(name = "CashHandlingDevice") + @SerializedName("CashHandlingDevice") @Schema(description = "Status of cash handling device. --Rule: If cash handling devices present.") protected List cashHandlingDevice; /** The Global status. */ - @XmlElement(name = "GlobalStatus", required = true) + @SerializedName("GlobalStatus") @Schema(description = "Global status of a POI Server or POI Terminal.") protected GlobalStatusType globalStatus; /** The Security ok flag. */ - @XmlElement(name = "SecurityOKFlag") + @SerializedName("SecurityOKFlag") @Schema( description = "Indicates if the security module of the POI is working and usable. --Rule: If security module present") protected Boolean securityOKFlag; /** The Pedok flag. */ - @XmlElement(name = "PEDOKFlag") + @SerializedName("PEDOKFlag") @Schema(description = "Indicates if the PED is working and usable. --Rule: If PED present") protected Boolean pedokFlag; /** The Card reader ok flag. */ - @XmlElement(name = "CardReaderOKFlag") + @SerializedName("CardReaderOKFlag") @Schema( description = "Indicates if the card readers are working and usable. --Rule: If card reader device present") protected Boolean cardReaderOKFlag; /** The Printer status. */ - @XmlElement(name = "PrinterStatus") + @SerializedName("PrinterStatus") @Schema( description = "Indicates if the printer is working and usable. --Rule: If printer device present") protected PrinterStatusType printerStatus; /** The Communication ok flag. */ - @XmlElement(name = "CommunicationOKFlag") + @SerializedName("CommunicationOKFlag") @Schema( description = "Indicates if the communication infrastructure is working and usable. --Rule: If communication infrastructure present") protected Boolean communicationOKFlag; /** The Fraud prevention flag. */ - @XmlElement(name = "FraudPreventionFlag") + @SerializedName("FraudPreventionFlag") @Schema(description = "Indicate a suspicion of fraud by the POI System. --Rule: default False") protected Boolean fraudPreventionFlag; diff --git a/src/main/java/com/adyen/model/nexo/POISystemData.java b/src/main/java/com/adyen/model/nexo/POISystemData.java index d0e64174a..5cf020a5c 100644 --- a/src/main/java/com/adyen/model/nexo/POISystemData.java +++ b/src/main/java/com/adyen/model/nexo/POISystemData.java @@ -1,11 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** @@ -32,34 +28,29 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "POISystemData", - propOrder = {"dateTime", "poiSoftware", "poiTerminalData", "poiStatus"}) public class POISystemData { /** The Date time. */ - @XmlElement(name = "DateTime", required = true) + @SerializedName("DateTime") @Schema(description = "Date and Time") - @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar dateTime; /** The Poi software. */ - @XmlElement(name = "POISoftware", required = true) + @SerializedName("POISoftware") @Schema( description = "Information related to the software of the POI System which manages the Sale to POI protocol.") protected POISoftware poiSoftware; /** The Poi terminal data. */ - @XmlElement(name = "POITerminalData") + @SerializedName("POITerminalData") @Schema( description = "Information related to the software and hardware feature of the POI Terminal --Rule: Present if the login involve a POI Terminal") protected POITerminalData poiTerminalData; /** The Poi status. */ - @XmlElement(name = "POIStatus") + @SerializedName("POIStatus") @Schema(description = "State of a POI Terminal. --Rule: if Response.Result is Success") protected POIStatus poiStatus; diff --git a/src/main/java/com/adyen/model/nexo/POITerminalData.java b/src/main/java/com/adyen/model/nexo/POITerminalData.java index 31e8ebc34..2648bac54 100644 --- a/src/main/java/com/adyen/model/nexo/POITerminalData.java +++ b/src/main/java/com/adyen/model/nexo/POITerminalData.java @@ -1,13 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlList; -import javax.xml.bind.annotation.XmlType; /** * Definition: Information related to the software and hardware feature of the POI Terminal -- @@ -33,32 +29,27 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "POITerminalData", - propOrder = {"poiCapabilities", "poiProfile"}) public class POITerminalData { /** The Poi capabilities. */ - @XmlList - @XmlElement(name = "POICapabilities", required = true) + @SerializedName("POICapabilities") @Schema(description = "Hardware capabilities of the POI Terminal.") protected List poiCapabilities; /** The Poi profile. */ - @XmlElement(name = "POIProfile") + @SerializedName("POIProfile") @Schema( description = "Functional profile of the POI Terminal. --Rule: If at least one element is present. The Sale System decides if it can continue or not.") protected POIProfile poiProfile; /** The Terminal environment. */ - @XmlElement(name = "TerminalEnvironment", required = true) + @SerializedName("TerminalEnvironment") @Schema(description = "Environment of the Terminal.") protected TerminalEnvironmentType terminalEnvironment; /** The Poi serial number. */ - @XmlElement(name = "POISerialNumber", required = true) + @SerializedName("POISerialNumber") @Schema(description = "Serial number of a POI Terminal") protected String poiSerialNumber; diff --git a/src/main/java/com/adyen/model/nexo/Parameter.java b/src/main/java/com/adyen/model/nexo/Parameter.java index cd4c7462b..01640f4bf 100644 --- a/src/main/java/com/adyen/model/nexo/Parameter.java +++ b/src/main/java/com/adyen/model/nexo/Parameter.java @@ -1,9 +1,6 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import com.google.gson.annotations.SerializedName; /** * Definition: Parameters associated to a cryptographic algorithm -- Reference: RFC 3880: Internet @@ -23,12 +20,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "Parameter") public class Parameter { /** The Initialisation vector. */ - @XmlElement(name = "InitialisationVector") + @SerializedName("InitialisationVector") protected byte[] initialisationVector; /** diff --git a/src/main/java/com/adyen/model/nexo/PaymentAccountReq.java b/src/main/java/com/adyen/model/nexo/PaymentAccountReq.java index bb05f34b3..b1b72c312 100644 --- a/src/main/java/com/adyen/model/nexo/PaymentAccountReq.java +++ b/src/main/java/com/adyen/model/nexo/PaymentAccountReq.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the account pointed by the payment card -- Usage: Information @@ -28,26 +25,22 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "PaymentAccountReq", - propOrder = {"cardAcquisitionReference", "paymentInstrumentData"}) public class PaymentAccountReq { /** The Card acquisition reference. */ - @XmlElement(name = "CardAcquisitionReference") + @SerializedName("CardAcquisitionReference") @Schema( description = "Reference to the last CardAcquisition, to use the same card. --Rule: if the card data comes from a previous CardAcquisition") protected TransactionIdentification cardAcquisitionReference; /** The Payment instrument data. */ - @XmlElement(name = "PaymentInstrumentData") + @SerializedName("PaymentInstrumentData") @Schema(description = "Data related to the instrument of payment for the transaction.") protected PaymentInstrumentData paymentInstrumentData; /** The Account. */ - @XmlElement(name = "AccountType") + @SerializedName("AccountType") @Schema(description = "Type of cardholder account used for the transaction") protected AccountType accountType; diff --git a/src/main/java/com/adyen/model/nexo/PaymentAccountStatus.java b/src/main/java/com/adyen/model/nexo/PaymentAccountStatus.java index f8cade10d..b2a6c69f1 100644 --- a/src/main/java/com/adyen/model/nexo/PaymentAccountStatus.java +++ b/src/main/java/com/adyen/model/nexo/PaymentAccountStatus.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the result of a Balance Inquiry request. @@ -30,42 +27,38 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "PaymentAccountStatus", - propOrder = {"paymentInstrumentData", "paymentAcquirerData", "loyaltyAccountStatus"}) public class PaymentAccountStatus { /** The Payment instrument data. */ - @XmlElement(name = "PaymentInstrumentData") + @SerializedName("PaymentInstrumentData") @Schema( description = "Data related to the instrument of payment for the transaction. --Rule: If a payment instrument is analysed") protected PaymentInstrumentData paymentInstrumentData; /** The Payment acquirer data. */ - @XmlElement(name = "PaymentAcquirerData") + @SerializedName("PaymentAcquirerData") @Schema( description = "Data related to the response from the payment Acquirer. --Rule: If a card is analysed") protected PaymentAcquirerData paymentAcquirerData; /** The Loyalty account status. */ - @XmlElement(name = "LoyaltyAccountStatus") + @SerializedName("LoyaltyAccountStatus") @Schema( description = "Data related to the result of a loyalty Balance Inquiry. --Rule: If PaymentInstrumentData absent and Result is Success") protected LoyaltyAccountStatus loyaltyAccountStatus; /** The Currency. */ - @XmlElement(name = "Currency") + @SerializedName("Currency") @Schema( description = "Currency of a monetary amount. --Rule: If PaymentInstrumentData present and Result is Success") protected String currency; /** The Current balance. */ - @XmlElement(name = "CurrentBalance") + @SerializedName("CurrentBalance") @Schema( description = "Balance of an account. --Rule: If PaymentInstrumentData present and Result is Success") diff --git a/src/main/java/com/adyen/model/nexo/PaymentAcquirerData.java b/src/main/java/com/adyen/model/nexo/PaymentAcquirerData.java index 2815f189d..83951afa5 100644 --- a/src/main/java/com/adyen/model/nexo/PaymentAcquirerData.java +++ b/src/main/java/com/adyen/model/nexo/PaymentAcquirerData.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the response from the payment Acquirer. @@ -29,37 +26,33 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "PaymentAcquirerData", - propOrder = {"acquirerTransactionID", "approvalCode"}) public class PaymentAcquirerData { /** The Acquirer transaction id. */ - @XmlElement(name = "AcquirerTransactionID") + @SerializedName("AcquirerTransactionID") @Schema( description = "Identification of the Transaction for the Acquirer. --Rule: If provided by the Acquirer") protected TransactionIdentification acquirerTransactionID; /** The Approval code. */ - @XmlElement(name = "ApprovalCode") + @SerializedName("ApprovalCode") @Schema( description = "Code assigned to a transaction approval by the Acquirer. --Rule: If available") protected String approvalCode; /** The Acquirer id. */ - @XmlElement(name = "AcquirerID") + @SerializedName("AcquirerID") @Schema(description = "Identification of the Acquirer --Rule: If several Acquirers") protected String acquirerID; /** The Merchant id. */ - @XmlElement(name = "MerchantID", required = true) + @SerializedName("MerchantID") @Schema(description = "Identification of the Merchant for the Acquirer") protected String merchantID; /** The Acquirer poiid. */ - @XmlElement(name = "AcquirerPOIID", required = true) + @SerializedName("AcquirerPOIID") @Schema(description = "Identification of the POI for the payment Acquirer") protected String acquirerPOIID; diff --git a/src/main/java/com/adyen/model/nexo/PaymentData.java b/src/main/java/com/adyen/model/nexo/PaymentData.java index 9f6f2f3e1..166016b8e 100644 --- a/src/main/java/com/adyen/model/nexo/PaymentData.java +++ b/src/main/java/com/adyen/model/nexo/PaymentData.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the payment transaction. -- Usage: Elements requested by the Sale @@ -32,60 +29,50 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "PaymentData", - propOrder = { - "cardAcquisitionReference", - "requestedValidityDate", - "instalment", - "customerOrder", - "paymentInstrumentData" - }) public class PaymentData { /** The Card acquisition reference. */ - @XmlElement(name = "CardAcquisitionReference") + @SerializedName("CardAcquisitionReference") @Schema( description = "Reference to the last CardAcquisition, to use the same card. --Rule: if the card data comes from a previous CardAcquisition") protected TransactionIdentification cardAcquisitionReference; /** The Requested validity date. */ - @XmlElement(name = "RequestedValidityDate") + @SerializedName("RequestedValidityDate") @Schema( description = "Requested validity date for the reservation. --Rule: If time period of the OneTimeReservation, FirstReservation or UpdateReservation is requested") protected String requestedValidityDate; /** The Instalment. */ - @XmlElement(name = "Instalment") + @SerializedName("Instalment") @Schema( description = "Information related an instalment transaction. --Rule: If PaymentType is \"Instalment\" or \"IssuerInstalment\"") protected Instalment instalment; /** The Customer order. */ - @XmlElement(name = "CustomerOrder") + @SerializedName("CustomerOrder") @Schema( description = "Customer order attached to a card, recorded in the POI system. --Rule: If a customer orders has to be created.") protected CustomerOrder customerOrder; /** The Payment instrument data. */ - @XmlElement(name = "PaymentInstrumentData") + @SerializedName("PaymentInstrumentData") @Schema( description = "Data related to the instrument of payment for the transaction. --Rule: If payment instrument data are read by the Sale System") protected PaymentInstrumentData paymentInstrumentData; /** The Payment. */ - @XmlElement(name = "PaymentType") + @SerializedName("PaymentType") @Schema(description = "Type of payment transaction.") protected PaymentType paymentType; /** The Split payment flag. */ - @XmlElement(name = "SplitPaymentFlag") + @SerializedName("SplitPaymentFlag") @Schema(description = "Indicates if the payment of the Sale transaction is split.") protected Boolean splitPaymentFlag; diff --git a/src/main/java/com/adyen/model/nexo/PaymentInstrumentData.java b/src/main/java/com/adyen/model/nexo/PaymentInstrumentData.java index 288e54d3e..f628c3860 100644 --- a/src/main/java/com/adyen/model/nexo/PaymentInstrumentData.java +++ b/src/main/java/com/adyen/model/nexo/PaymentInstrumentData.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the instrument of payment for the transaction. -- Usage: Sent in the @@ -31,44 +28,40 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "PaymentInstrumentData", - propOrder = {"cardData", "checkData", "mobileData"}) public class PaymentInstrumentData { /** The Card data. */ - @XmlElement(name = "CardData") + @SerializedName("CardData") @Schema( description = "Information related to the payment card used for the transaction. --Rule: If PaymentInstrumentType is \"Card\"") protected CardData cardData; /** The Check data. */ - @XmlElement(name = "CheckData") + @SerializedName("CheckData") @Schema( description = "Information related to the paper check used for the transaction. --Rule: If PaymentInstrumentType is \"Check\"") protected CheckData checkData; /** The Mobile data. */ - @XmlElement(name = "MobileData") + @SerializedName("MobileData") @Schema( description = "Information related to the mobile for the payment transaction. --Rule: If PaymentInstrumentType is \"Mobile\"") protected MobileData mobileData; /** The Payment instrument. */ - @XmlElement(name = "PaymentInstrumentType", required = true) + @SerializedName("PaymentInstrumentType") @Schema(description = "Type of payment instrument.") protected PaymentInstrumentType paymentInstrumentType; /** The Stored value account id. */ - @XmlElement(name = "StoredValueAccountID") + @SerializedName("StoredValueAccountID") protected StoredValueAccountID storedValueAccountID; /** The Protected card data. */ - @XmlElement(name = "ProtectedCardData") + @SerializedName("ProtectedCardData") protected String protectedCardData; /** diff --git a/src/main/java/com/adyen/model/nexo/PaymentInstrumentType.java b/src/main/java/com/adyen/model/nexo/PaymentInstrumentType.java index a581000d7..e6456eaff 100644 --- a/src/main/java/com/adyen/model/nexo/PaymentInstrumentType.java +++ b/src/main/java/com/adyen/model/nexo/PaymentInstrumentType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for PaymentInstrumentType. @@ -23,33 +21,31 @@ * </simpleType> * */ -@XmlType(name = "PaymentInstrumentType") -@XmlEnum public enum PaymentInstrumentType { /** Payment card (credit or debit). */ - @XmlEnumValue("Card") + @SerializedName("Card") @Schema(description = "Payment card (credit or debit).") CARD("Card"), /** Paper check. */ - @XmlEnumValue("Check") + @SerializedName("Check") @Schema(description = "Paper check.") CHECK("Check"), /** Operator account accessed by a mobile phone. */ - @XmlEnumValue("Mobile") + @SerializedName("Mobile") @Schema(description = "Operator account accessed by a mobile phone.") MOBILE("Mobile"), /** Account accesed by a stored value instrument such as a card or a certificate. */ - @XmlEnumValue("StoredValue") + @SerializedName("StoredValue") @Schema( description = "Account accesed by a stored value instrument such as a card or a certificate.") STORED_VALUE("StoredValue"), /** Cash managed by a cash handling system. */ - @XmlEnumValue("Cash") + @SerializedName("Cash") @Schema(description = "Cash managed by a cash handling system.") CASH("Cash"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/PaymentReceipt.java b/src/main/java/com/adyen/model/nexo/PaymentReceipt.java index 2c0cdea86..f756985b4 100644 --- a/src/main/java/com/adyen/model/nexo/PaymentReceipt.java +++ b/src/main/java/com/adyen/model/nexo/PaymentReceipt.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Customer or Merchant payment receipt. -- Usage: If the payment receipts are printed @@ -29,31 +26,27 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "PaymentReceipt", - propOrder = {"outputContent"}) public class PaymentReceipt { /** The Output content. */ - @XmlElement(name = "OutputContent", required = true) + @SerializedName("OutputContent") @Schema(description = "Content to display or print.") protected OutputContent outputContent; /** The Document qualifier. */ - @XmlElement(name = "DocumentQualifier", required = true) + @SerializedName("DocumentQualifier") @Schema( description = "Qualification of the document to print to the Cashier or the Customer. --Rule: SaleReceipt or CashierReceipt") protected DocumentQualifierType documentQualifier; /** The Integrated print flag. */ - @XmlElement(name = "IntegratedPrintFlag") + @SerializedName("IntegratedPrintFlag") @Schema(description = "Type of the print integrated to other prints.") protected Boolean integratedPrintFlag; /** The Required signature flag. */ - @XmlElement(name = "RequiredSignatureFlag") + @SerializedName("RequiredSignatureFlag") @Schema( description = "Indicate that the cardholder payment receipt requires a physical signature by the Customer.") diff --git a/src/main/java/com/adyen/model/nexo/PaymentRequest.java b/src/main/java/com/adyen/model/nexo/PaymentRequest.java index ac7c7d0dc..375325df5 100644 --- a/src/main/java/com/adyen/model/nexo/PaymentRequest.java +++ b/src/main/java/com/adyen/model/nexo/PaymentRequest.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Payment Request messageType. -- Usage: It conveys Information related @@ -31,31 +28,27 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "PaymentRequest", - propOrder = {"saleData", "paymentTransaction", "paymentData", "loyaltyData"}) public class PaymentRequest { /** The Sale data. */ - @XmlElement(name = "SaleData", required = true) + @SerializedName("SaleData") @Schema(description = "Data related to the Sale System.") protected SaleData saleData; /** The Payment transaction. */ - @XmlElement(name = "PaymentTransaction", required = true) + @SerializedName("PaymentTransaction") @Schema(description = "Data related to the payment and loyalty transaction.") protected PaymentTransaction paymentTransaction; /** The Payment data. */ - @XmlElement(name = "PaymentData") + @SerializedName("PaymentData") @Schema( description = "Data related to the payment transaction. --Rule: If one data element is present") protected PaymentData paymentData; /** The Loyalty data. */ - @XmlElement(name = "LoyaltyData") + @SerializedName("LoyaltyData") @Schema( description = "Data related to a Loyalty program or account. --Rule: Loyalty cards used with the payment transaction and read by the Sale System") diff --git a/src/main/java/com/adyen/model/nexo/PaymentResponse.java b/src/main/java/com/adyen/model/nexo/PaymentResponse.java index 829755bf5..683d2a62b 100644 --- a/src/main/java/com/adyen/model/nexo/PaymentResponse.java +++ b/src/main/java/com/adyen/model/nexo/PaymentResponse.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Payment Response messageType. -- Usage: It conveys Information related @@ -34,58 +31,46 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "PaymentResponse", - propOrder = { - "response", - "saleData", - "poiData", - "paymentResult", - "loyaltyResult", - "paymentReceipt", - "customerOrder" - }) public class PaymentResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Sale data. */ - @XmlElement(name = "SaleData", required = true) + @SerializedName("SaleData") @Schema(description = "Data related to the Sale System. --Rule: Copy") protected SaleData saleData; /** The Poi data. */ - @XmlElement(name = "POIData", required = true) + @SerializedName("POIData") @Schema(description = "Data related to the POI System.") protected POIData poiData; /** The Payment result. */ - @XmlElement(name = "PaymentResult") + @SerializedName("PaymentResult") @Schema( description = "Data related to the result of a processed payment transaction. --Rule: If one data element is present") protected PaymentResult paymentResult; /** The Loyalty result. */ - @XmlElement(name = "LoyaltyResult") + @SerializedName("LoyaltyResult") @Schema( description = "Data related to the result of a processed loyalty transaction. --Rule: Loyalty cards used with the payment transaction") protected List loyaltyResult; /** The Payment receipt. */ - @XmlElement(name = "PaymentReceipt") + @SerializedName("PaymentReceipt") @Schema( description = "Customer or Merchant payment receipt. --Rule: If Basic profile implementation with no printer on the POI.") protected List paymentReceipt; /** The Customer order. */ - @XmlElement(name = "CustomerOrder") + @SerializedName("CustomerOrder") @Schema( description = "Customer order attached to a card, recorded in the POI system. --Rule: If the list of customer orders has been requested.") diff --git a/src/main/java/com/adyen/model/nexo/PaymentResult.java b/src/main/java/com/adyen/model/nexo/PaymentResult.java index 53d54fddc..5f80fee39 100644 --- a/src/main/java/com/adyen/model/nexo/PaymentResult.java +++ b/src/main/java/com/adyen/model/nexo/PaymentResult.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the result of a processed payment transaction. -- Usage: In the @@ -40,104 +37,92 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "PaymentResult", - propOrder = { - "paymentInstrumentData", - "amountsResp", - "instalment", - "currencyConversion", - "capturedSignature", - "protectedSignature", - "paymentAcquirerData" - }) public class PaymentResult { /** The Payment instrument data. */ - @XmlElement(name = "PaymentInstrumentData") + @SerializedName("PaymentInstrumentData") @Schema( description = "Data related to the instrument of payment for the transaction. --Rule: If a payment instrument is analysed by the POI") protected PaymentInstrumentData paymentInstrumentData; /** The Amounts resp. */ - @XmlElement(name = "AmountsResp") + @SerializedName("AmountsResp") @Schema( description = "Various amounts related to the payment response from the POI System. --Rule: If Result is Success or Partial") protected AmountsResp amountsResp; /** The Instalment. */ - @XmlElement(name = "Instalment") + @SerializedName("Instalment") @Schema( description = "Information related an instalment transaction. --Rule: Absent if PaymentType is not \"IssuerInstalment\"") protected Instalment instalment; /** The Currency conversion. */ - @XmlElement(name = "CurrencyConversion") + @SerializedName("CurrencyConversion") @Schema( description = "Information related to a currency conversion --Rule: If currency conversion the Sale needs to know") protected List currencyConversion; /** The Captured signature. */ - @XmlElement(name = "CapturedSignature") + @SerializedName("CapturedSignature") @Schema( description = "Numeric value of a handwritten signature. --Rule: If handwritten signature is captured on the POI by a signature capture device.") protected CapturedSignature capturedSignature; /** The Protected signature. */ - @XmlElement(name = "ProtectedSignature") + @SerializedName("ProtectedSignature") @Schema( description = "Numeric value of a handwritten signature. --Rule: Encrypted handwritten signature captured on the POI by a signature capture device.") protected ContentInformation protectedSignature; /** The Payment acquirer data. */ - @XmlElement(name = "PaymentAcquirerData") + @SerializedName("PaymentAcquirerData") @Schema( description = "Data related to the response from the payment Acquirer. --Rule: If a card is analysed and data available") protected PaymentAcquirerData paymentAcquirerData; /** The Payment type. */ - @XmlElement(name = "PaymentType") + @SerializedName("PaymentType") @Schema(description = "Type of payment transaction. --Rule: Copy") protected PaymentType paymentType; /** The Merchant override flag. */ - @XmlElement(name = "MerchantOverrideFlag") + @SerializedName("MerchantOverrideFlag") @Schema( description = "Indicate that the Merchant forced the result of the payment to successfull. --Rule: If payment forced by the Cashier") protected Boolean merchantOverrideFlag; /** The Customer language. */ - @XmlElement(name = "CustomerLanguage") + @SerializedName("CustomerLanguage") @Schema( description = "Language of the Customer --Rule: If the customer language is different from the default language or different from the CustomerLanguage of the") protected String customerLanguage; /** The Online flag. */ - @XmlElement(name = "OnlineFlag") + @SerializedName("OnlineFlag") @Schema( description = "Indicate that the payment transaction processing has required the approval of a host. --Rule: \"True\" if the payment transaction processing has required the approval of a host.") protected Boolean onlineFlag; /** The Authentication method. */ - @XmlElement(name = "AuthenticationMethod") + @SerializedName("AuthenticationMethod") @Schema( description = "Method for customer authentication. --Rule: Method for customer authentication.") protected List authenticationMethod; /** The Validity date. */ - @XmlElement(name = "ValidityDate") + @SerializedName("ValidityDate") @Schema( description = "End of the validity period for the reservation. --Rule: if OneTimeReservation, FirstReservation or UpdateReservation") diff --git a/src/main/java/com/adyen/model/nexo/PaymentToken.java b/src/main/java/com/adyen/model/nexo/PaymentToken.java index c030c3486..552953d74 100644 --- a/src/main/java/com/adyen/model/nexo/PaymentToken.java +++ b/src/main/java/com/adyen/model/nexo/PaymentToken.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** @@ -27,26 +24,24 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "PaymentToken") public class PaymentToken { /** The Token requested. */ - @XmlElement(name = "TokenRequestedType", required = true) + @SerializedName("TokenRequestedType") @Schema( description = "Type of token replacing the PAN of a payment card to identify the payment mean of the customer.") protected TokenRequestedType tokenRequestedType; /** The Token value. */ - @XmlElement(name = "TokenValue", required = true) + @SerializedName("TokenValue") @Schema( description = "Payment token replacing the PAN of the payment card to identify the payment mean of the customer.") protected String tokenValue; /** The Expiry date time. */ - @XmlElement(name = "ExpiryDateTime") + @SerializedName("ExpiryDateTime") @Schema(description = "Expiry date and time.") protected XMLGregorianCalendar expiryDateTime; diff --git a/src/main/java/com/adyen/model/nexo/PaymentTotals.java b/src/main/java/com/adyen/model/nexo/PaymentTotals.java index 1d0b1230d..5acd09ceb 100644 --- a/src/main/java/com/adyen/model/nexo/PaymentTotals.java +++ b/src/main/java/com/adyen/model/nexo/PaymentTotals.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Totals of the payment transaction during the reconciliation period. @@ -27,24 +24,22 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "PaymentTotals") public class PaymentTotals { /** The Transaction. */ - @XmlElement(name = "TransactionType", required = true) + @SerializedName("TransactionType") @Schema( description = "Type of transaction for which totals are grouped. --Rule: Debit, Credit, ReverseDebit, ReverseCredit, OneTimeReservation, CompletedDeffered, FirstReservation, UpdateReservation,") protected TransactionType transactionType; /** The Transaction count. */ - @XmlElement(name = "TransactionCount", required = true) + @SerializedName("TransactionCount") @Schema(description = "Number of processed transaction during the period.") protected BigInteger transactionCount; /** The Transaction amount. */ - @XmlElement(name = "TransactionAmount", required = true) + @SerializedName("TransactionAmount") @Schema(description = "Sum of amount of processed transaction during the period.") protected BigDecimal transactionAmount; diff --git a/src/main/java/com/adyen/model/nexo/PaymentTransaction.java b/src/main/java/com/adyen/model/nexo/PaymentTransaction.java index a5fd95bee..0e78e0d72 100644 --- a/src/main/java/com/adyen/model/nexo/PaymentTransaction.java +++ b/src/main/java/com/adyen/model/nexo/PaymentTransaction.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the payment and loyalty transaction. -- Usage: Elements requested by @@ -31,35 +28,31 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "PaymentTransaction", - propOrder = {"amountsReq", "originalPOITransaction", "transactionConditions", "saleItem"}) public class PaymentTransaction { /** The Amounts req. */ - @XmlElement(name = "AmountsReq", required = true) + @SerializedName("AmountsReq") @Schema( description = "Various amounts related to the payment and loyalty request from the Sale System.") protected AmountsReq amountsReq; /** The Original poi transaction. */ - @XmlElement(name = "OriginalPOITransaction") + @SerializedName("OriginalPOITransaction") @Schema( description = "Identification of a previous POI transaction. --Rule: if UpdateReservation, Completion or Refund") protected OriginalPOITransaction originalPOITransaction; /** The Transaction conditions. */ - @XmlElement(name = "TransactionConditions") + @SerializedName("TransactionConditions") @Schema( description = "Conditions on which the transaction must be processed. --Rule: If one data element is present") protected TransactionConditions transactionConditions; /** The Sale item. */ - @XmlElement(name = "SaleItem") + @SerializedName("SaleItem") @Schema( description = "Sale items of a transaction. --Rule: If purchased products are required for the payment") diff --git a/src/main/java/com/adyen/model/nexo/PaymentType.java b/src/main/java/com/adyen/model/nexo/PaymentType.java index d73db14d8..5cd4006bf 100644 --- a/src/main/java/com/adyen/model/nexo/PaymentType.java +++ b/src/main/java/com/adyen/model/nexo/PaymentType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for PaymentType. @@ -30,17 +28,15 @@ * </simpleType> * */ -@XmlType(name = "PaymentType") -@XmlEnum public enum PaymentType { /** Normal Payment */ - @XmlEnumValue("Normal") + @SerializedName("Normal") @Schema(description = "Normal Payment") NORMAL("Normal"), /** Payment refund */ - @XmlEnumValue("Refund") + @SerializedName("Refund") @Schema(description = "Payment refund") REFUND("Refund"), @@ -48,7 +44,7 @@ public enum PaymentType { * One time reservation to be just followed by a completion when the service or good is delivered. * This service is sometimes called "Deferred Sale". */ - @XmlEnumValue("OneTimeReservation") + @SerializedName("OneTimeReservation") @Schema( description = "One time reservation to be just followed by a completion when the service or good is delivered. This service is sometimes called \"Deferred Sale\".") @@ -58,49 +54,49 @@ public enum PaymentType { * First reservation for an amount and period of time. This service is sometimes called * "Pre-Authorisation". */ - @XmlEnumValue("FirstReservation") + @SerializedName("FirstReservation") @Schema( description = "First reservation for an amount and period of time. This service is sometimes called \"Pre-Authorisation\".") FIRST_RESERVATION("FirstReservation"), /** Adjustment of the amount or period of time of a reservation. */ - @XmlEnumValue("UpdateReservation") + @SerializedName("UpdateReservation") @Schema(description = "Adjustment of the amount or period of time of a reservation. ") UPDATE_RESERVATION("UpdateReservation"), /** End of the reservation transaction. */ - @XmlEnumValue("Completion") + @SerializedName("Completion") @Schema(description = "End of the reservation transaction.") COMPLETION("Completion"), /** Cash advance at the POI System. */ - @XmlEnumValue("CashAdvance") + @SerializedName("CashAdvance") @Schema(description = "Cash advance at the POI System.") CASH_ADVANCE("CashAdvance"), /** Cash deposit at the POI System, to credit an account. */ - @XmlEnumValue("CashDeposit") + @SerializedName("CashDeposit") @Schema(description = "Cash deposit at the POI System, to credit an account.") CASH_DEPOSIT("CashDeposit"), /** Recurring payment. */ - @XmlEnumValue("Recurring") + @SerializedName("Recurring") @Schema(description = "Recurring payment.") RECURRING("Recurring"), /** Instalments of payment performed on behalf of the merchant. */ - @XmlEnumValue("Instalment") + @SerializedName("Instalment") @Schema(description = "Instalments of payment performed on behalf of the merchant.") INSTALMENT("Instalment"), /** Instalments of payment performed by the card issuer. */ - @XmlEnumValue("IssuerInstalment") + @SerializedName("IssuerInstalment") @Schema(description = "Instalments of payment performed by the card issuer.") ISSUER_INSTALMENT("IssuerInstalment"), /** Give money to in return for goods or services rendered to the merchant. */ - @XmlEnumValue("PaidOut") + @SerializedName("PaidOut") @Schema(description = "Give money to in return for goods or services rendered to the merchant.") PAID_OUT("PaidOut"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/PerformedTransaction.java b/src/main/java/com/adyen/model/nexo/PerformedTransaction.java index 8c7898e88..dcb40723d 100644 --- a/src/main/java/com/adyen/model/nexo/PerformedTransaction.java +++ b/src/main/java/com/adyen/model/nexo/PerformedTransaction.java @@ -1,13 +1,10 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Result of performed transactions. -- Usage: Contains result of transaction performed @@ -34,45 +31,41 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "PerformedTransaction", - propOrder = {"response", "saleData", "poiData", "paymentResult", "loyaltyResult"}) public class PerformedTransaction { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Sale data. */ - @XmlElement(name = "SaleData") + @SerializedName("SaleData") @Schema( description = "Data related to the Sale System. --Rule: If a request has been generated by the Sale system.") protected SaleData saleData; /** The Poi data. */ - @XmlElement(name = "POIData", required = true) + @SerializedName("POIData") @Schema(description = "Data related to the POI System.") protected POIData poiData; /** The Payment result. */ - @XmlElement(name = "PaymentResult") + @SerializedName("PaymentResult") @Schema( description = "Data related to the result of a processed payment transaction. --Rule: If a Payment transaction has been performed and one (or several) data element is present") protected PaymentResult paymentResult; /** The Loyalty result. */ - @XmlElement(name = "LoyaltyResult") + @SerializedName("LoyaltyResult") @Schema( description = "Data related to the result of a processed loyalty transaction. --Rule: If a Loyalty transaction has been performed alone or with the Payment transaction.") protected List loyaltyResult; /** The Reversed amount. */ - @XmlElement(name = "ReversedAmount") + @SerializedName("ReversedAmount") @Schema( description = "Amount of the payment or loyalty to reverse.. --Rule: If a transaction Reversal has been performed.") diff --git a/src/main/java/com/adyen/model/nexo/PeriodUnitType.java b/src/main/java/com/adyen/model/nexo/PeriodUnitType.java index bcb501cae..ef2ca2def 100644 --- a/src/main/java/com/adyen/model/nexo/PeriodUnitType.java +++ b/src/main/java/com/adyen/model/nexo/PeriodUnitType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for PeriodUnitType. @@ -22,27 +20,25 @@ * </simpleType> * */ -@XmlType(name = "PeriodUnitType") -@XmlEnum public enum PeriodUnitType { /** The day is the unit of the period. */ - @XmlEnumValue("Daily") + @SerializedName("Daily") @Schema(description = "The day is the unit of the period.") DAILY("Daily"), /** The week is the unit of the period. */ - @XmlEnumValue("Weekly") + @SerializedName("Weekly") @Schema(description = "The week is the unit of the period.") WEEKLY("Weekly"), /** The month is the unit of the period. */ - @XmlEnumValue("Monthly") + @SerializedName("Monthly") @Schema(description = "The month is the unit of the period.") MONTHLY("Monthly"), /** The year is the unit of the period. */ - @XmlEnumValue("Annual") + @SerializedName("Annual") @Schema(description = "The year is the unit of the period.") ANNUAL("Annual"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/PredefinedContent.java b/src/main/java/com/adyen/model/nexo/PredefinedContent.java index 49638267e..e5bd5cb49 100644 --- a/src/main/java/com/adyen/model/nexo/PredefinedContent.java +++ b/src/main/java/com/adyen/model/nexo/PredefinedContent.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Reference of a predefined messageType to display or print. -- Usage: It conveys @@ -25,17 +22,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "PredefinedContent") public class PredefinedContent { /** The Reference id. */ - @XmlElement(name = "ReferenceID", required = true) + @SerializedName("ReferenceID") @Schema(description = "Identification of a predefined message to display, print or play.") protected String referenceID; /** The Language. */ - @XmlElement(name = "Language") + @SerializedName("Language") @Schema(description = "Identification of a language.") protected String language; diff --git a/src/main/java/com/adyen/model/nexo/PrintOutput.java b/src/main/java/com/adyen/model/nexo/PrintOutput.java index 08b087527..07752711e 100644 --- a/src/main/java/com/adyen/model/nexo/PrintOutput.java +++ b/src/main/java/com/adyen/model/nexo/PrintOutput.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Information to print and the way to process the print. -- Usage: It contains a @@ -31,41 +28,37 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "PrintOutput", - propOrder = {"outputContent", "outputSignature"}) public class PrintOutput { /** The Output content. */ - @XmlElement(name = "OutputContent", required = true) + @SerializedName("OutputContent") @Schema(description = "Content to display or print.") protected OutputContent outputContent; /** The Output signature. */ - @XmlElement(name = "OutputSignature") + @SerializedName("OutputSignature") @Schema( description = "Vendor specific signature of text message to display or print. --Rule: If protection has to be provided to the vendor on the text to display or print.") protected byte[] outputSignature; /** The Document qualifier. */ - @XmlElement(name = "DocumentQualifier", required = true) + @SerializedName("DocumentQualifier") @Schema(description = "Qualification of the document to print to the Cashier or the Customer.") protected DocumentQualifierType documentQualifier; /** The Response mode. */ - @XmlElement(name = "ResponseMode", required = true) + @SerializedName("ResponseMode") @Schema(description = "Message response awaited by the initiator of the Request") protected ResponseModeType responseMode; /** The Integrated print flag. */ - @XmlElement(name = "IntegratedPrintFlag") + @SerializedName("IntegratedPrintFlag") @Schema(description = "Type of the print integrated to other prints.") protected Boolean integratedPrintFlag; /** The Required signature flag. */ - @XmlElement(name = "RequiredSignatureFlag") + @SerializedName("RequiredSignatureFlag") @Schema( description = "Indicate that the cardholder payment receipt requires a physical signature by the Customer.") diff --git a/src/main/java/com/adyen/model/nexo/PrintRequest.java b/src/main/java/com/adyen/model/nexo/PrintRequest.java index 2d7b6f111..ad8df1939 100644 --- a/src/main/java/com/adyen/model/nexo/PrintRequest.java +++ b/src/main/java/com/adyen/model/nexo/PrintRequest.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Print Request messageType. -- Usage: It conveys the data to print and @@ -26,14 +23,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "PrintRequest", - propOrder = {"printOutput"}) public class PrintRequest { /** The Print output. */ - @XmlElement(name = "PrintOutput", required = true) + @SerializedName("PrintOutput") @Schema(description = "Information to print and the way to process the print.") protected PrintOutput printOutput; diff --git a/src/main/java/com/adyen/model/nexo/PrintResponse.java b/src/main/java/com/adyen/model/nexo/PrintResponse.java index dc7dd578f..46574fcbb 100644 --- a/src/main/java/com/adyen/model/nexo/PrintResponse.java +++ b/src/main/java/com/adyen/model/nexo/PrintResponse.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Print Response messageType. -- Usage: It conveys the result of the @@ -27,19 +24,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "PrintResponse", - propOrder = {"response"}) public class PrintResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Document qualifier. */ - @XmlElement(name = "DocumentQualifier", required = true) + @SerializedName("DocumentQualifier") @Schema( description = "Qualification of the document to print to the Cashier or the Customer. --Rule: Copy") diff --git a/src/main/java/com/adyen/model/nexo/PrinterStatusType.java b/src/main/java/com/adyen/model/nexo/PrinterStatusType.java index 26309c1da..3ee4bb8c7 100644 --- a/src/main/java/com/adyen/model/nexo/PrinterStatusType.java +++ b/src/main/java/com/adyen/model/nexo/PrinterStatusType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for PrinterStatusType. @@ -23,30 +21,28 @@ * </simpleType> * */ -@XmlType(name = "PrinterStatusType") -@XmlEnum public enum PrinterStatusType { /** The printer is operational. */ OK("OK"), /** The printer is operational but paper roll is almost empty. */ - @XmlEnumValue("PaperLow") + @SerializedName("PaperLow") @Schema(description = "The printer is operational but paper roll is almost empty.") PAPER_LOW("PaperLow"), /** Paper roll is empty, an operator must insert a new paper roll. */ - @XmlEnumValue("NoPaper") + @SerializedName("NoPaper") @Schema(description = "Paper roll is empty, an operator must insert a new paper roll.") NO_PAPER("NoPaper"), /** An operator must remove the paper jam manually. */ - @XmlEnumValue("PaperJam") + @SerializedName("PaperJam") @Schema(description = "An operator must remove the paper jam manually.") PAPER_JAM("PaperJam"), /** The printer is out of order. */ - @XmlEnumValue("OutOfOrder") + @SerializedName("OutOfOrder") @Schema(description = "The printer is out of order.") OUT_OF_ORDER("OutOfOrder"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/Rebates.java b/src/main/java/com/adyen/model/nexo/Rebates.java index 7015abfcf..805b657ce 100644 --- a/src/main/java/com/adyen/model/nexo/Rebates.java +++ b/src/main/java/com/adyen/model/nexo/Rebates.java @@ -1,13 +1,10 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Rebate form to an award; @@ -30,28 +27,24 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "Rebates", - propOrder = {"totalRebate", "rebateLabel", "saleItemRebate"}) public class Rebates { /** The Total rebate. */ - @XmlElement(name = "TotalRebate") + @SerializedName("TotalRebate") @Schema( description = "The global awarded amount that is not attached to an item. --Rule: If rebate on the total amount for this loyalty program") protected BigDecimal totalRebate; /** The Rebate label. */ - @XmlElement(name = "RebateLabel") + @SerializedName("RebateLabel") @Schema( description = "Short text to qualify a rebate on an line item. --Rule: If provided by the Acquirer") protected String rebateLabel; /** The Sale item rebate. */ - @XmlElement(name = "SaleItemRebate") + @SerializedName("SaleItemRebate") @Schema( description = "The awarded amount that is attached to an item as a rebate. --Rule: only items with rebate (identified by ItemID)") diff --git a/src/main/java/com/adyen/model/nexo/RecipientIdentifier.java b/src/main/java/com/adyen/model/nexo/RecipientIdentifier.java index 678db5588..68bd4e9b4 100644 --- a/src/main/java/com/adyen/model/nexo/RecipientIdentifier.java +++ b/src/main/java/com/adyen/model/nexo/RecipientIdentifier.java @@ -1,9 +1,6 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import com.google.gson.annotations.SerializedName; /** * Definition: Cryptographic Message Syntax (CMS) data structure containing the Recipient Identifier @@ -26,14 +23,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "RecipientIdentifier", - propOrder = {"issuerAndSerialNumber"}) public class RecipientIdentifier { /** The Issuer and serial number. */ - @XmlElement(name = "IssuerAndSerialNumber", required = true) + @SerializedName("IssuerAndSerialNumber") protected IssuerAndSerialNumber issuerAndSerialNumber; /** diff --git a/src/main/java/com/adyen/model/nexo/ReconciliationRequest.java b/src/main/java/com/adyen/model/nexo/ReconciliationRequest.java index fa3671d00..72dbf7515 100644 --- a/src/main/java/com/adyen/model/nexo/ReconciliationRequest.java +++ b/src/main/java/com/adyen/model/nexo/ReconciliationRequest.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Reconciliation Request messageType. -- Usage: It conveys Information @@ -32,26 +29,22 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "ReconciliationRequest", - propOrder = {"acquirerID"}) public class ReconciliationRequest { /** The Acquirer id. */ - @XmlElement(name = "AcquirerID") + @SerializedName("AcquirerID") @Schema( description = "Identification of the Acquirer --Rule: Could be present only if ReconciliationType is \"AcquirerReconciliation\" or \"AcquirerSynchronisation\"") protected List acquirerID; /** The Reconciliation. */ - @XmlElement(name = "ReconciliationType", required = true) + @SerializedName("ReconciliationType") @Schema(description = "Type of Reconciliation requested by the Sale to the POI.") protected ReconciliationType reconciliationType; /** The Poi reconciliation id. */ - @XmlElement(name = "POIReconciliationID") + @SerializedName("POIReconciliationID") @Schema( description = "Identification of the reconciliation period between Sale and POI. --Rule: Absent if ReconciliationType is not \"PreviousReconciliation\"") diff --git a/src/main/java/com/adyen/model/nexo/ReconciliationResponse.java b/src/main/java/com/adyen/model/nexo/ReconciliationResponse.java index c414e6826..79ef11f47 100644 --- a/src/main/java/com/adyen/model/nexo/ReconciliationResponse.java +++ b/src/main/java/com/adyen/model/nexo/ReconciliationResponse.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Reconciliation Response messageType. -- Usage: It conveys Information @@ -31,31 +28,27 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "ReconciliationResponse", - propOrder = {"response", "transactionTotals"}) public class ReconciliationResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Transaction totals. */ - @XmlElement(name = "TransactionTotals") + @SerializedName("TransactionTotals") @Schema( description = "Result of the Sale to POI Reconciliation processing. --Rule: if Response.Result is Success") protected List transactionTotals; /** The Reconciliation. */ - @XmlElement(name = "ReconciliationType", required = true) + @SerializedName("ReconciliationType") @Schema(description = "Type of Reconciliation requested by the Sale to the POI. --Rule: Copy") protected ReconciliationType reconciliationType; /** The Poi reconciliation id. */ - @XmlElement(name = "POIReconciliationID") + @SerializedName("POIReconciliationID") @Schema( description = "Identification of the reconciliation period between Sale and POI. --Rule: Absent if ReconciliationType is \"AcquirerReconciliation\"") diff --git a/src/main/java/com/adyen/model/nexo/ReconciliationType.java b/src/main/java/com/adyen/model/nexo/ReconciliationType.java index d004ca2ab..36f03ef3a 100644 --- a/src/main/java/com/adyen/model/nexo/ReconciliationType.java +++ b/src/main/java/com/adyen/model/nexo/ReconciliationType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for ReconciliationType. @@ -22,12 +20,10 @@ * </simpleType> * */ -@XmlType(name = "ReconciliationType") -@XmlEnum public enum ReconciliationType { /** Reconciliation with closure of the current period, without any Acquirers synchronisation. */ - @XmlEnumValue("SaleReconciliation") + @SerializedName("SaleReconciliation") @Schema( description = "Reconciliation with closure of the current period, without any Acquirers synchronisation.") @@ -37,7 +33,7 @@ public enum ReconciliationType { * Reconciliation and closure of the current period, with synchronisation of the reconciliation * between the POI and Acquirers. */ - @XmlEnumValue("AcquirerSynchronisation") + @SerializedName("AcquirerSynchronisation") @Schema( description = "Reconciliation and closure of the current period, with synchronisation of the reconciliation between the POI and Acquirers.") @@ -47,14 +43,14 @@ public enum ReconciliationType { * Reconciliation between the POI and one or several Acquirers only. There is no reconciliation * between the Sale System and the POI System. */ - @XmlEnumValue("AcquirerReconciliation") + @SerializedName("AcquirerReconciliation") @Schema( description = "Reconciliation between the POI and one or several Acquirers only. There is no reconciliation between the Sale System and the POI System.") ACQUIRER_RECONCILIATION("AcquirerReconciliation"), /** Request result of a previous reconciliation. */ - @XmlEnumValue("PreviousReconciliation") + @SerializedName("PreviousReconciliation") @Schema(description = "Request result of a previous reconciliation.") PREVIOUS_RECONCILIATION("PreviousReconciliation"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/RelativeDistinguishedName.java b/src/main/java/com/adyen/model/nexo/RelativeDistinguishedName.java index af82f8b82..ea679116a 100644 --- a/src/main/java/com/adyen/model/nexo/RelativeDistinguishedName.java +++ b/src/main/java/com/adyen/model/nexo/RelativeDistinguishedName.java @@ -1,9 +1,6 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import com.google.gson.annotations.SerializedName; /** * Definition: Certificate distinguished name (DN) -- Reference: RFC 3880: Internet X.509 Public Key @@ -27,18 +24,14 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "RelativeDistinguishedName", - propOrder = {"attribute", "attributeValue"}) public class RelativeDistinguishedName { /** The Attribute. */ - @XmlElement(name = "Attribute", required = true) + @SerializedName("Attribute") protected String attribute; /** The Attribute value. */ - @XmlElement(name = "AttributeValue", required = true) + @SerializedName("AttributeValue") protected String attributeValue; /** diff --git a/src/main/java/com/adyen/model/nexo/RepeatedMessageResponse.java b/src/main/java/com/adyen/model/nexo/RepeatedMessageResponse.java index 335ce3ed4..df74a3997 100644 --- a/src/main/java/com/adyen/model/nexo/RepeatedMessageResponse.java +++ b/src/main/java/com/adyen/model/nexo/RepeatedMessageResponse.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the requested Message Response. -- Usage: Allow the knowledge of the last @@ -34,18 +31,14 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "RepeatedMessageResponse", - propOrder = {"repeatedResponseMessageBody", "messageHeader"}) public class RepeatedMessageResponse { /** The Repeated message response body. */ - @XmlElement(name = "RepeatedResponseMessageBody", required = true) + @SerializedName("RepeatedResponseMessageBody") protected RepeatedResponseMessageBody repeatedResponseMessageBody; /** The Message header. */ - @XmlElement(name = "MessageHeader", required = true) + @SerializedName("MessageHeader") @Schema(description = "Message header of the Sale to POI protocol message.") protected MessageHeader messageHeader; diff --git a/src/main/java/com/adyen/model/nexo/RepeatedMessageResponseBody.java b/src/main/java/com/adyen/model/nexo/RepeatedMessageResponseBody.java index bee01289f..b59fd976d 100644 --- a/src/main/java/com/adyen/model/nexo/RepeatedMessageResponseBody.java +++ b/src/main/java/com/adyen/model/nexo/RepeatedMessageResponseBody.java @@ -21,47 +21,33 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import com.google.gson.annotations.SerializedName; /** The type Repeated message response body. */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "RepeatedMessageResponseBody", - propOrder = { - "loyaltyResponse", - "paymentResponse", - "reversalResponse", - "storedValueResponse", - "cardAcquisitionResponse", - "cardReaderAPDUResponse" - }) public class RepeatedMessageResponseBody { /** The Loyalty response. */ - @XmlElement(name = "LoyaltyResponse") + @SerializedName("LoyaltyResponse") protected LoyaltyResponse loyaltyResponse; /** The Payment response. */ - @XmlElement(name = "PaymentResponse") + @SerializedName("PaymentResponse") protected PaymentResponse paymentResponse; /** The Reversal response. */ - @XmlElement(name = "ReversalResponse") + @SerializedName("ReversalResponse") protected ReversalResponse reversalResponse; /** The Stored value response. */ - @XmlElement(name = "StoredValueResponse") + @SerializedName("StoredValueResponse") protected StoredValueResponse storedValueResponse; /** The Card acquisition response. */ - @XmlElement(name = "CardAcquisitionResponse") + @SerializedName("CardAcquisitionResponse") protected CardAcquisitionResponse cardAcquisitionResponse; /** The Card reader apdu response. */ - @XmlElement(name = "CardReaderAPDUResponse") + @SerializedName("CardReaderAPDUResponse") protected CardReaderAPDUResponse cardReaderAPDUResponse; /** diff --git a/src/main/java/com/adyen/model/nexo/RepeatedResponseMessageBody.java b/src/main/java/com/adyen/model/nexo/RepeatedResponseMessageBody.java index c90ea8b92..e88d16d99 100644 --- a/src/main/java/com/adyen/model/nexo/RepeatedResponseMessageBody.java +++ b/src/main/java/com/adyen/model/nexo/RepeatedResponseMessageBody.java @@ -21,47 +21,33 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import com.google.gson.annotations.SerializedName; /** The type Repeated message response body. */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "RepeatedResponseMessageBody", - propOrder = { - "loyaltyResponse", - "paymentResponse", - "reversalResponse", - "storedValueResponse", - "cardAcquisitionResponse", - "cardReaderAPDUResponse" - }) public class RepeatedResponseMessageBody { /** The Loyalty response. */ - @XmlElement(name = "LoyaltyResponse") + @SerializedName("LoyaltyResponse") protected LoyaltyResponse loyaltyResponse; /** The Payment response. */ - @XmlElement(name = "PaymentResponse") + @SerializedName("PaymentResponse") protected PaymentResponse paymentResponse; /** The Reversal response. */ - @XmlElement(name = "ReversalResponse") + @SerializedName("ReversalResponse") protected ReversalResponse reversalResponse; /** The Stored value response. */ - @XmlElement(name = "StoredValueResponse") + @SerializedName("StoredValueResponse") protected StoredValueResponse storedValueResponse; /** The Card acquisition response. */ - @XmlElement(name = "CardAcquisitionResponse") + @SerializedName("CardAcquisitionResponse") protected CardAcquisitionResponse cardAcquisitionResponse; /** The Card reader apdu response. */ - @XmlElement(name = "CardReaderAPDUResponse") + @SerializedName("CardReaderAPDUResponse") protected CardReaderAPDUResponse cardReaderAPDUResponse; /** diff --git a/src/main/java/com/adyen/model/nexo/Response.java b/src/main/java/com/adyen/model/nexo/Response.java index f4524b88a..14cb5ca77 100644 --- a/src/main/java/com/adyen/model/nexo/Response.java +++ b/src/main/java/com/adyen/model/nexo/Response.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Result of a messageType request processing. -- Usage: If Result is Success, @@ -30,26 +27,22 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "Response", - propOrder = {"additionalResponse"}) public class Response { /** The Additional response. */ - @XmlElement(name = "AdditionalResponse") + @SerializedName("AdditionalResponse") @Schema( description = "Additional information related to processing status of a message request . --Rule: If present, the POI logs it for further examination") protected String additionalResponse; /** The Result. */ - @XmlElement(name = "Result", required = true) + @SerializedName("Result") @Schema(description = "Result of the processing of the message") protected ResultType result; /** The Error condition. */ - @XmlElement(name = "ErrorCondition") + @SerializedName("ErrorCondition") @Schema( description = "Condition that has produced an error on the processing of a message request --Rule: If Result is not Success") diff --git a/src/main/java/com/adyen/model/nexo/ResponseModeType.java b/src/main/java/com/adyen/model/nexo/ResponseModeType.java index 2a015816e..5c0cb882f 100644 --- a/src/main/java/com/adyen/model/nexo/ResponseModeType.java +++ b/src/main/java/com/adyen/model/nexo/ResponseModeType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for ResponseModeType. @@ -22,27 +20,25 @@ * </simpleType> * */ -@XmlType(name = "ResponseModeType") -@XmlEnum public enum ResponseModeType { /** The Message Response is not required, except in case of error. */ - @XmlEnumValue("NotRequired") + @SerializedName("NotRequired") @Schema(description = "The Message Response is not required, except in case of error.") NOT_REQUIRED("NotRequired"), /** The Message Response is immediate, after taking into account the request. */ - @XmlEnumValue("Immediate") + @SerializedName("Immediate") @Schema(description = "The Message Response is immediate, after taking into account the request.") IMMEDIATE("Immediate"), /** The Print Response is required at the end of print. */ - @XmlEnumValue("PrintEnd") + @SerializedName("PrintEnd") @Schema(description = "The Print Response is required at the end of print.") PRINT_END("PrintEnd"), /** The Sound Response is required at the end of play. */ - @XmlEnumValue("SoundEnd") + @SerializedName("SoundEnd") @Schema(description = "The Sound Response is required at the end of play.") SOUND_END("SoundEnd"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/ResultType.java b/src/main/java/com/adyen/model/nexo/ResultType.java index f4a96c08f..158171ac4 100644 --- a/src/main/java/com/adyen/model/nexo/ResultType.java +++ b/src/main/java/com/adyen/model/nexo/ResultType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for ResultType. @@ -21,22 +19,20 @@ * </simpleType> * */ -@XmlType(name = "ResultType") -@XmlEnum public enum ResultType { /** * Processing OK. Information related to the result of the processing is contained in other parts * of the response messageType. */ - @XmlEnumValue("Success") + @SerializedName("Success") @Schema( description = "Processing OK. Information related to the result of the processing is contained in other parts of the response message.") SUCCESS("Success"), /** ErrorCondition */ - @XmlEnumValue("Failure") + @SerializedName("Failure") @Schema(description = "ErrorCondition") FAILURE("Failure"), @@ -44,7 +40,7 @@ public enum ResultType { * The transaction has been processed successfully, but the success is not complete (e.g. only a * partial amount is available for the payment, the format to be */ - @XmlEnumValue("Partial") + @SerializedName("Partial") @Schema( description = "The transaction has been processed successfully, but the success is not complete (e.g. only a partial amount is available for the payment, the format to be") diff --git a/src/main/java/com/adyen/model/nexo/ReversalReasonType.java b/src/main/java/com/adyen/model/nexo/ReversalReasonType.java index b9dd0d8c0..bffe6d9dc 100644 --- a/src/main/java/com/adyen/model/nexo/ReversalReasonType.java +++ b/src/main/java/com/adyen/model/nexo/ReversalReasonType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for ReversalReasonType. @@ -22,27 +20,25 @@ * </simpleType> * */ -@XmlType(name = "ReversalReasonType") -@XmlEnum public enum ReversalReasonType { /** Customer cancellation */ - @XmlEnumValue("CustCancel") + @SerializedName("CustCancel") @Schema(description = "Customer cancellation") CUST_CANCEL("CustCancel"), /** Cashier cancellation */ - @XmlEnumValue("MerchantCancel") + @SerializedName("MerchantCancel") @Schema(description = "Cashier cancellation") MERCHANT_CANCEL("MerchantCancel"), /** Suspected malfunction */ - @XmlEnumValue("Malfunction") + @SerializedName("Malfunction") @Schema(description = "Suspected malfunction") MALFUNCTION("Malfunction"), /** Card acceptor device unable to complete transaction */ - @XmlEnumValue("Unable2Compl") + @SerializedName("Unable2Compl") @Schema(description = "Card acceptor device unable to complete transaction") UNABLE_2_COMPL("Unable2Compl"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/ReversalRequest.java b/src/main/java/com/adyen/model/nexo/ReversalRequest.java index f4dbec0c1..046564455 100644 --- a/src/main/java/com/adyen/model/nexo/ReversalRequest.java +++ b/src/main/java/com/adyen/model/nexo/ReversalRequest.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Reversal Request messageType. -- Usage: It conveys Information related @@ -31,43 +28,39 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "ReversalRequest", - propOrder = {"originalPOITransaction", "customerOrderID"}) public class ReversalRequest { /** The Original poi transaction. */ - @XmlElement(name = "OriginalPOITransaction", required = true) + @SerializedName("OriginalPOITransaction") @Schema(description = "Identification of a previous POI transaction.") protected OriginalPOITransaction originalPOITransaction; /** The Customer order id. */ - @XmlElement(name = "CustomerOrderID") + @SerializedName("CustomerOrderID") @Schema(description = "If the reversal is performed inside a customer order.") protected CustomerOrder customerOrderID; /** The Sale reference id. */ - @XmlElement(name = "SaleReferenceID") + @SerializedName("SaleReferenceID") @Schema( description = "Identification of a Sale global transaction for a sequence of related POI transactions --Rule: If payment reservation reversal") protected String saleReferenceID; /** The Reversal reason. */ - @XmlElement(name = "ReversalReason", required = true) + @SerializedName("ReversalReason") @Schema(description = "Reason of the payment or loyalty reversal..") protected ReversalReasonType reversalReason; /** The Reversed amount. */ - @XmlElement(name = "ReversedAmount") + @SerializedName("ReversedAmount") @Schema( description = "Amount of the payment or loyalty to reverse.. --Rule: ReversedAmount is implicitely the AuthorizedAmount if absent.") protected BigDecimal reversedAmount; /** The Sale data. */ - @XmlElement(name = "SaleData") + @SerializedName("SaleData") protected SaleData saleData; /** diff --git a/src/main/java/com/adyen/model/nexo/ReversalResponse.java b/src/main/java/com/adyen/model/nexo/ReversalResponse.java index cc9b9b6d8..c32842801 100644 --- a/src/main/java/com/adyen/model/nexo/ReversalResponse.java +++ b/src/main/java/com/adyen/model/nexo/ReversalResponse.java @@ -1,13 +1,10 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Reversal Response messageType. -- Usage: It conveys Information @@ -34,43 +31,39 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "ReversalResponse", - propOrder = {"response", "poiData", "originalPOITransaction", "paymentReceipt"}) public class ReversalResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Poi data. */ - @XmlElement(name = "POIData") + @SerializedName("POIData") @Schema(description = "Data related to the POI System. --Rule: If Result is Success") protected POIData poiData; /** The Original poi transaction. */ - @XmlElement(name = "OriginalPOITransaction") + @SerializedName("OriginalPOITransaction") @Schema( description = "Identification of a previous POI transaction. --Rule: Present if POITransactionID absent in the request") protected OriginalPOITransaction originalPOITransaction; /** The Payment receipt. */ - @XmlElement(name = "PaymentReceipt") + @SerializedName("PaymentReceipt") @Schema( description = "Customer or Merchant payment receipt. --Rule: If Basic profile implementation with no printer on the POI.") protected List paymentReceipt; /** The Reversed amount. */ - @XmlElement(name = "ReversedAmount") + @SerializedName("ReversedAmount") @Schema(description = "Amount of the payment or loyalty to reverse.. --Rule: Copy") protected BigDecimal reversedAmount; /** The Customer order id. */ - @XmlElement(name = "CustomerOrderID") + @SerializedName("CustomerOrderID") @Schema( description = "Customer order attached to a card, recorded in the POI system. --Rule: If the reversal is performed inside a customer order.") diff --git a/src/main/java/com/adyen/model/nexo/SaleCapabilitiesType.java b/src/main/java/com/adyen/model/nexo/SaleCapabilitiesType.java index fde51c492..232b15adf 100644 --- a/src/main/java/com/adyen/model/nexo/SaleCapabilitiesType.java +++ b/src/main/java/com/adyen/model/nexo/SaleCapabilitiesType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for SaleCapabilitiesType. @@ -33,35 +31,33 @@ * </simpleType> * */ -@XmlType(name = "SaleCapabilitiesType") -@XmlEnum public enum SaleCapabilitiesType { /** * To display to the Cashier a new state on which the POI is entering. For instance, during a * payment, the POI could display to the Cashier that POI request an */ - @XmlEnumValue("CashierStatus") + @SerializedName("CashierStatus") @Schema( description = "To display to the Cashier a new state on which the POI is entering. For instance, during a payment, the POI could display to the Cashier that POI request an") CASHIER_STATUS("CashierStatus"), /** To display to the Cashier information related to an error situation occurring on the POI. */ - @XmlEnumValue("CashierError") + @SerializedName("CashierError") @Schema( description = "To display to the Cashier information related to an error situation occurring on the POI.") CASHIER_ERROR("CashierError"), /** Standard Cashier display interface (to ask question, or to show information). */ - @XmlEnumValue("CashierDisplay") + @SerializedName("CashierDisplay") @Schema( description = "Standard Cashier display interface (to ask question, or to show information).") CASHIER_DISPLAY("CashierDisplay"), /** Information displayed on the Cardholder POI interface, replicated on the Cashier interface. */ - @XmlEnumValue("POIReplication") + @SerializedName("POIReplication") @Schema( description = "Information displayed on the Cardholder POI interface, replicated on the Cashier interface.") @@ -71,7 +67,7 @@ public enum SaleCapabilitiesType { * Any kind of keyboard allowing all or part of the commands of the Input messageType request from * the Sale System to the POI System (InputCommand data element). The */ - @XmlEnumValue("CashierInput") + @SerializedName("CashierInput") @Schema( description = "Any kind of keyboard allowing all or part of the commands of the Input message request from the Sale System to the POI System (InputCommand data element). The") @@ -81,7 +77,7 @@ public enum SaleCapabilitiesType { * Input of the Cardholder POI interface which can be entered by the Cashier to assist the * Customer. */ - @XmlEnumValue("CustomerAssistance") + @SerializedName("CustomerAssistance") @Schema( description = "Input of the Cardholder POI interface which can be entered by the Cashier to assist the Customer.") @@ -91,7 +87,7 @@ public enum SaleCapabilitiesType { * Standard Customer display interface used by the POI System to ask question, or to show * information to the Customer inside a Service dialogue. */ - @XmlEnumValue("CustomerDisplay") + @SerializedName("CustomerDisplay") @Schema( description = "Standard Customer display interface used by the POI System to ask question, or to show information to the Customer inside a Service dialogue.") @@ -101,7 +97,7 @@ public enum SaleCapabilitiesType { * To display to the Customer information is related to an error situation occurring on the Sale * Terminal during a Sale transaction. */ - @XmlEnumValue("CustomerError") + @SerializedName("CustomerError") @Schema( description = "To display to the Customer information is related to an error situation occurring on the Sale Terminal during a Sale transaction.") @@ -111,34 +107,34 @@ public enum SaleCapabilitiesType { * Any kind of keyboard allowing all or part of the commands of the Input messageType request from * the Sale System to the POI System (InputCommand data element). The */ - @XmlEnumValue("CustomerInput") + @SerializedName("CustomerInput") @Schema( description = "Any kind of keyboard allowing all or part of the commands of the Input message request from the Sale System to the POI System (InputCommand data element). The") CUSTOMER_INPUT("CustomerInput"), /** Printer for the Payment receipt. */ - @XmlEnumValue("PrinterReceipt") + @SerializedName("PrinterReceipt") @Schema(description = "Printer for the Payment receipt.") PRINTER_RECEIPT("PrinterReceipt"), /** * When the POI System wants to print specific document (check, dynamic currency conversion ...). */ - @XmlEnumValue("PrinterDocument") + @SerializedName("PrinterDocument") @Schema( description = "When the POI System wants to print specific document (check, dynamic currency conversion ...). ") PRINTER_DOCUMENT("PrinterDocument"), /** Coupons, voucher or special ticket generated by the POI and to be printed. */ - @XmlEnumValue("PrinterVoucher") + @SerializedName("PrinterVoucher") @Schema( description = "Coupons, voucher or special ticket generated by the POI and to be printed.") PRINTER_VOUCHER("PrinterVoucher"), /** Magnetic stripe card reader */ - @XmlEnumValue("MagStripe") + @SerializedName("MagStripe") @Schema(description = "Magnetic stripe card reader") MAG_STRIPE("MagStripe"), @@ -146,7 +142,7 @@ public enum SaleCapabilitiesType { ICC("ICC"), /** Contactless card reader with EMV applications */ - @XmlEnumValue("EMVContactless") + @SerializedName("EMVContactless") @Schema(description = "Contactless card reader with EMV applications") EMV_CONTACTLESS("EMVContactless"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/SaleData.java b/src/main/java/com/adyen/model/nexo/SaleData.java index cbeaa39b6..0188200be 100644 --- a/src/main/java/com/adyen/model/nexo/SaleData.java +++ b/src/main/java/com/adyen/model/nexo/SaleData.java @@ -3,13 +3,10 @@ import com.adyen.model.terminal.SaleToAcquirerData; import com.adyen.serializer.SaleToAcquirerDataSerializer; import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the Sale System. -- Usage: Data associated to the Sale System, with a @@ -44,46 +41,35 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "SaleData", - propOrder = { - "saleTransactionID", - "saleTerminalData", - "sponsoredMerchant", - "saleToPOIData", - "saleToAcquirerData", - "saleToIssuerData" - }) public class SaleData { /** The Sale transaction id. */ - @XmlElement(name = "SaleTransactionID", required = true) + @SerializedName("SaleTransactionID") @Schema(description = "Unique identification of a Sale transaction") protected TransactionIdentification saleTransactionID; /** The Sale terminal data. */ - @XmlElement(name = "SaleTerminalData") + @SerializedName("SaleTerminalData") @Schema( description = "Information related to the software and hardware feature of the Sale Terminal. --Rule: If content is not empty") protected SaleTerminalData saleTerminalData; /** The Sponsored merchant. */ - @XmlElement(name = "SponsoredMerchant") + @SerializedName("SponsoredMerchant") @Schema( description = "Merchant using the payment services of a payment facilitator, acting as a card acceptor. --Rule: If the merchant is a payment facilitator providing services to sponsored merchants.") protected List sponsoredMerchant; /** The Sale to poi data. */ - @XmlElement(name = "SaleToPOIData") + @SerializedName("SaleToPOIData") @Schema( description = "Sale information intended for the POI. --Rule: Stored with the transaction") protected String saleToPOIData; /** The Sale to acquirer data. */ - @XmlElement(name = "SaleToAcquirerData") + @SerializedName("SaleToAcquirerData") @Schema( description = "Sale information intended for the Acquirer. --Rule: Send to the Acquirer if present") @@ -91,53 +77,53 @@ public class SaleData { protected SaleToAcquirerData saleToAcquirerData; /** The Sale to issuer data. */ - @XmlElement(name = "SaleToIssuerData") + @SerializedName("SaleToIssuerData") @Schema( description = "Sale information intended for the Issuer. --Rule: Send to the Acquirer if present") protected SaleToIssuerData saleToIssuerData; /** The Operator id. */ - @XmlElement(name = "OperatorID") + @SerializedName("OperatorID") @Schema( description = "Identification of the Cashier or Operator. --Rule: if different from the Login and see Login .SaleData") protected String operatorID; /** The Operator language. */ - @XmlElement(name = "OperatorLanguage") + @SerializedName("OperatorLanguage") @Schema(description = "Language of the Cashier or Operator. --Rule: if different from the Login") protected String operatorLanguage; /** The Shift number. */ - @XmlElement(name = "ShiftNumber") + @SerializedName("ShiftNumber") @Schema( description = "Shift number. --Rule: if different from the Login and see Login .SaleData") protected String shiftNumber; /** The Sale reference id. */ - @XmlElement(name = "SaleReferenceID") + @SerializedName("SaleReferenceID") @Schema( description = "Identification of a Sale global transaction for a sequence of related POI transactions --Rule: If payment reservation") protected String saleReferenceID; /** The Token requested. */ - @XmlElement(name = "TokenRequestedType") + @SerializedName("TokenRequestedType") @Schema( description = "Type of token replacing the PAN of a payment card to identify the payment mean of the customer. --Rule: In a Payment or CardAcquisition request, if a token is requested.") protected TokenRequestedType tokenRequestedType; /** The Customer order id. */ - @XmlElement(name = "CustomerOrderID") + @SerializedName("CustomerOrderID") @Schema( description = "Identification of a customer order. --Rule: If the payment is related to an open customer order.") protected String customerOrderID; /** The Customer order req. */ - @XmlElement(name = "CustomerOrderReq") + @SerializedName("CustomerOrderReq") @Schema( description = "List of customer orders must be sent in response message. --Rule: If customer orders must be listed in the response message.") diff --git a/src/main/java/com/adyen/model/nexo/SaleItem.java b/src/main/java/com/adyen/model/nexo/SaleItem.java index bb235ee9e..b675101f3 100644 --- a/src/main/java/com/adyen/model/nexo/SaleItem.java +++ b/src/main/java/com/adyen/model/nexo/SaleItem.java @@ -1,13 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; /** * Definition: Sale items of a transaction. -- Usage: In loyalty or value added payment card @@ -41,83 +37,70 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "SaleItem", - propOrder = { - "unitOfMeasure", - "quantity", - "unitPrice", - "taxCode", - "saleChannel", - "productLabel", - "additionalProductInfo" - }) public class SaleItem { /** The Unit of measure. */ - @XmlElement(name = "UnitOfMeasure") + @SerializedName("UnitOfMeasure") @Schema(description = "Unit of measure of a quantity --Rule: if Quantity present") - @XmlSchemaType(name = "string") protected UnitOfMeasureType unitOfMeasure; /** The Quantity. */ - @XmlElement(name = "Quantity") + @SerializedName("Quantity") @Schema( description = "Product quantity --Rule: If data sent, POI has to store it and send it if the host protocol allows it") protected BigDecimal quantity; /** The Unit price. */ - @XmlElement(name = "UnitPrice") + @SerializedName("UnitPrice") @Schema(description = "Price per unit of product --Rule: if Quantity present") protected BigDecimal unitPrice; /** The Tax code. */ - @XmlElement(name = "TaxCode") + @SerializedName("TaxCode") @Schema( description = "Type of taxes associated to the line item. --Rule: If data sent, POI has to store it and send it if the host protocol allows it") protected String taxCode; /** The Sale channel. */ - @XmlElement(name = "SaleChannel") + @SerializedName("SaleChannel") @Schema( description = "Commercial or distribution channel associated to the line item. --Rule: If data sent, POI has to store it and send it if the host protocol allows it") protected String saleChannel; /** The Product label. */ - @XmlElement(name = "ProductLabel") + @SerializedName("ProductLabel") @Schema(description = "Product name of an item purchased with the transaction.") protected String productLabel; /** The Additional product info. */ - @XmlElement(name = "AdditionalProductInfo") + @SerializedName("AdditionalProductInfo") @Schema( description = "Additionl information related to the line item. --Rule: If data sent, POI has to store it and send it if the host protocol allows it") protected String additionalProductInfo; /** The Item id. */ - @XmlElement(name = "ItemID", required = true) + @SerializedName("ItemID") @Schema(description = "Item identification inside a transaction (0 to n).") protected BigInteger itemID; /** The Product code. */ - @XmlElement(name = "ProductCode", required = true) + @SerializedName("ProductCode") @Schema(description = "Product code of item purchased with the transaction.") protected String productCode; /** The Ean upc. */ - @XmlElement(name = "EanUpc") + @SerializedName("EanUpc") @Schema( description = "Standard product code of item purchased with the transaction. --Rule: If data sent, POI has to store it and send it if the host protocol allows it") protected String eanUpc; /** The Item amount. */ - @XmlElement(name = "ItemAmount", required = true) + @SerializedName("ItemAmount") @Schema(description = "Total amount of the item line.") protected BigDecimal itemAmount; diff --git a/src/main/java/com/adyen/model/nexo/SaleItemRebate.java b/src/main/java/com/adyen/model/nexo/SaleItemRebate.java index cd2faff9d..98a9353a0 100644 --- a/src/main/java/com/adyen/model/nexo/SaleItemRebate.java +++ b/src/main/java/com/adyen/model/nexo/SaleItemRebate.java @@ -1,13 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; /** * Definition: The awarded amount that is attached to an item as a rebate. -- Usage: To be @@ -35,49 +31,44 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "SaleItemRebate", - propOrder = {"unitOfMeasure", "quantity", "rebateLabel"}) public class SaleItemRebate { /** The Unit of measure. */ - @XmlElement(name = "UnitOfMeasure") + @SerializedName("UnitOfMeasure") @Schema(description = "Unit of measure of a quantity --Rule: if Quantity present") - @XmlSchemaType(name = "string") protected UnitOfMeasureType unitOfMeasure; /** The Quantity. */ - @XmlElement(name = "Quantity") + @SerializedName("Quantity") @Schema(description = "Product quantity --Rule: if rebate is additional units") protected BigDecimal quantity; /** The Rebate label. */ - @XmlElement(name = "RebateLabel") + @SerializedName("RebateLabel") @Schema( description = "Short text to qualify a rebate on an line item. --Rule: If provided by the Acquirer") protected String rebateLabel; /** The Item id. */ - @XmlElement(name = "ItemID", required = true) + @SerializedName("ItemID") @Schema(description = "Item identification inside a transaction (0 to n).") protected BigInteger itemID; /** The Product code. */ - @XmlElement(name = "ProductCode", required = true) + @SerializedName("ProductCode") @Schema(description = "Product code of item purchased with the transaction.") protected String productCode; /** The Ean upc. */ - @XmlElement(name = "EanUpc") + @SerializedName("EanUpc") @Schema( description = "Standard product code of item purchased with the transaction. --Rule: if present in the related SaleItem") protected String eanUpc; /** The Item amount. */ - @XmlElement(name = "ItemAmount") + @SerializedName("ItemAmount") @Schema(description = "Total amount of the item line. --Rule: if rebate on the line item amount") protected BigDecimal itemAmount; diff --git a/src/main/java/com/adyen/model/nexo/SaleProfile.java b/src/main/java/com/adyen/model/nexo/SaleProfile.java index cac10dd9d..8cdb1b331 100644 --- a/src/main/java/com/adyen/model/nexo/SaleProfile.java +++ b/src/main/java/com/adyen/model/nexo/SaleProfile.java @@ -1,13 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlList; -import javax.xml.bind.annotation.XmlType; /** * Definition: Functional profile of the Sale Terminal. -- Usage: Sent in the Login Request to @@ -32,22 +28,17 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "SaleProfile", - propOrder = {"serviceProfiles"}) public class SaleProfile { /** The Service profiles. */ - @XmlList - @XmlElement(name = "ServiceProfiles") + @SerializedName("ServiceProfiles") @Schema( description = "Service profiles of the Sale to POI protocol. --Rule: If a service profile could be requested") protected List serviceProfiles; /** The Generic profile. */ - @XmlElement(name = "GenericProfile") + @SerializedName("GenericProfile") @Schema(description = "Functional profile of the Sale to POI protocol.") protected GenericProfileType genericProfile; diff --git a/src/main/java/com/adyen/model/nexo/SaleSoftware.java b/src/main/java/com/adyen/model/nexo/SaleSoftware.java index 60778a3eb..6e7a727bb 100644 --- a/src/main/java/com/adyen/model/nexo/SaleSoftware.java +++ b/src/main/java/com/adyen/model/nexo/SaleSoftware.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Information related to the software of the Sale System which manages the Sale to POI @@ -27,27 +24,25 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SaleSoftware") public class SaleSoftware { /** The Manufacturer id. */ - @XmlElement(name = "ManufacturerID", required = true) + @SerializedName("ManufacturerID") @Schema(description = "Identification of the Manufacturer") protected String manufacturerID; /** The Application name. */ - @XmlElement(name = "ApplicationName", required = true) + @SerializedName("ApplicationName") @Schema(description = "Name of the software product.") protected String applicationName; /** The Software version. */ - @XmlElement(name = "SoftwareVersion", required = true) + @SerializedName("SoftwareVersion") @Schema(description = "Version of the software product") protected String softwareVersion; /** The Certification code. */ - @XmlElement(name = "CertificationCode", required = true) + @SerializedName("CertificationCode") @Schema( description = "Certification code of the software which manages the Sale to POI protocol.") protected String certificationCode; diff --git a/src/main/java/com/adyen/model/nexo/SaleTerminalData.java b/src/main/java/com/adyen/model/nexo/SaleTerminalData.java index 57c182a89..a254e6aa7 100644 --- a/src/main/java/com/adyen/model/nexo/SaleTerminalData.java +++ b/src/main/java/com/adyen/model/nexo/SaleTerminalData.java @@ -1,13 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlList; -import javax.xml.bind.annotation.XmlType; /** * Definition: Information related to the software and hardware feature of the Sale Terminal. -- @@ -34,32 +30,27 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "SaleTerminalData", - propOrder = {"saleCapabilities", "saleProfile"}) public class SaleTerminalData { /** The Sale capabilities. */ - @XmlList - @XmlElement(name = "SaleCapabilities") + @SerializedName("SaleCapabilities") @Schema(description = "Hardware capabilities of the Sale Terminal.") protected List saleCapabilities; /** The Sale profile. */ - @XmlElement(name = "SaleProfile") + @SerializedName("SaleProfile") @Schema( description = "Functional profile of the Sale Terminal. --Rule: If at least one element is present") protected SaleProfile saleProfile; /** The Terminal environment. */ - @XmlElement(name = "TerminalEnvironment") + @SerializedName("TerminalEnvironment") @Schema(description = "Environment of the Terminal.") protected TerminalEnvironmentType terminalEnvironment; /** The Totals group id. */ - @XmlElement(name = "TotalsGroupID") + @SerializedName("TotalsGroupID") @Schema( description = "Identification of a group of transaction on a POI Terminal, having the same Sale features. --Rule: If present, default value for all transaction.") diff --git a/src/main/java/com/adyen/model/nexo/SaleToIssuerData.java b/src/main/java/com/adyen/model/nexo/SaleToIssuerData.java index 23d6598a7..ee41ea23b 100644 --- a/src/main/java/com/adyen/model/nexo/SaleToIssuerData.java +++ b/src/main/java/com/adyen/model/nexo/SaleToIssuerData.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Sale information intended for the Issuer. -- Usage: The POI System receives this @@ -26,14 +23,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "SaleToIssuerData", - propOrder = {"statementReference"}) public class SaleToIssuerData { /** The Statement reference. */ - @XmlElement(name = "StatementReference") + @SerializedName("StatementReference") @Schema( description = "Label to print on the bank statement. --Rule: Information to print on the bank statement") diff --git a/src/main/java/com/adyen/model/nexo/SaleToPOIRequest.java b/src/main/java/com/adyen/model/nexo/SaleToPOIRequest.java index a579d5a7a..94fd61b3c 100644 --- a/src/main/java/com/adyen/model/nexo/SaleToPOIRequest.java +++ b/src/main/java/com/adyen/model/nexo/SaleToPOIRequest.java @@ -1,11 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; /** * Java class for anonymous complex type. @@ -54,184 +50,149 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "", - propOrder = { - "messageHeader", - "abortRequest", - "balanceInquiryRequest", - "batchRequest", - "cardAcquisitionRequest", - "adminRequest", - "diagnosisRequest", - "displayRequest", - "enableServiceRequest", - "eventNotification", - "getTotalsRequest", - "inputRequest", - "inputUpdate", - "loginRequest", - "logoutRequest", - "loyaltyRequest", - "paymentRequest", - "pinRequest", - "printRequest", - "cardReaderInitRequest", - "cardReaderAPDURequest", - "cardReaderPowerOffRequest", - "reconciliationRequest", - "reversalRequest", - "soundRequest", - "storedValueRequest", - "transactionStatusRequest", - "transmitRequest", - "securityTrailer" - }) -@XmlRootElement(name = "SaleToPOIRequest") public class SaleToPOIRequest { /** The Message header. */ - @XmlElement(name = "MessageHeader", required = true) + @SerializedName("MessageHeader") protected MessageHeader messageHeader; /** The Abort request. */ - @XmlElement(name = "AbortRequest") + @SerializedName("AbortRequest") @Schema(description = "Body of the Abort Request message.") protected AbortRequest abortRequest; /** The Balance inquiry request. */ - @XmlElement(name = "BalanceInquiryRequest") + @SerializedName("BalanceInquiryRequest") @Schema(description = "Content of the Balance Inquiry Request message.") protected BalanceInquiryRequest balanceInquiryRequest; /** The Batch request. */ - @XmlElement(name = "BatchRequest") + @SerializedName("BatchRequest") @Schema(description = "Content of the Batch Request message.") protected BatchRequest batchRequest; /** The Card acquisition request. */ - @XmlElement(name = "CardAcquisitionRequest") + @SerializedName("CardAcquisitionRequest") @Schema(description = "Content of the Card Acquisition Request message.") protected CardAcquisitionRequest cardAcquisitionRequest; /** The Admin request. */ - @XmlElement(name = "AdminRequest") + @SerializedName("AdminRequest") @Schema(description = "Content of the Custom Admin Request message.") protected AdminRequest adminRequest; /** The Diagnosis request. */ - @XmlElement(name = "DiagnosisRequest") + @SerializedName("DiagnosisRequest") @Schema(description = "Content of the Diagnosis Request message.") protected DiagnosisRequest diagnosisRequest; /** The Display request. */ - @XmlElement(name = "DisplayRequest") + @SerializedName("DisplayRequest") @Schema(description = "Content of the Display Request message.") protected DisplayRequest displayRequest; /** The Enable service request. */ - @XmlElement(name = "EnableServiceRequest") + @SerializedName("EnableServiceRequest") @Schema(description = "Content of the Enable Service Request message.") protected EnableServiceRequest enableServiceRequest; /** The Event notification. */ - @XmlElement(name = "EventNotification") + @SerializedName("EventNotification") @Schema(description = "Content of the EventNotification message.") protected EventNotification eventNotification; /** The Get totals request. */ - @XmlElement(name = "GetTotalsRequest") + @SerializedName("GetTotalsRequest") @Schema(description = "Content of the Get Totals Request message.") protected GetTotalsRequest getTotalsRequest; /** The Input request. */ - @XmlElement(name = "InputRequest") + @SerializedName("InputRequest") @Schema(description = "Content of the Input Request message.") protected InputRequest inputRequest; /** The Input update. */ - @XmlElement(name = "InputUpdate") + @SerializedName("InputUpdate") @Schema(description = "Content of the Input Update message.") protected InputUpdate inputUpdate; /** The Login request. */ - @XmlElement(name = "LoginRequest") + @SerializedName("LoginRequest") @Schema(description = "Content of the Login Request message.") protected LoginRequest loginRequest; /** The Logout request. */ - @XmlElement(name = "LogoutRequest") + @SerializedName("LogoutRequest") @Schema(description = "Content of the Logout Request message.") protected LogoutRequest logoutRequest; /** The Loyalty request. */ - @XmlElement(name = "LoyaltyRequest") + @SerializedName("LoyaltyRequest") @Schema(description = "Content of the Loyalty Request message.") protected LoyaltyRequest loyaltyRequest; /** The Payment request. */ - @XmlElement(name = "PaymentRequest") + @SerializedName("PaymentRequest") @Schema(description = "Content of the Payment Request message.") protected PaymentRequest paymentRequest; /** The Pin request. */ - @XmlElement(name = "PINRequest") + @SerializedName("PINRequest") @Schema(description = "Content of the PIN Request message.") protected PINRequest pinRequest; /** The Print request. */ - @XmlElement(name = "PrintRequest") + @SerializedName("PrintRequest") @Schema(description = "Content of the Print Request message.") protected PrintRequest printRequest; /** The Card reader init request. */ - @XmlElement(name = "CardReaderInitRequest") + @SerializedName("CardReaderInitRequest") @Schema(description = "Content of the Card Reader Init Request message.") protected CardReaderInitRequest cardReaderInitRequest; /** The Card reader apdu request. */ - @XmlElement(name = "CardReaderAPDURequest") + @SerializedName("CardReaderAPDURequest") @Schema(description = "Content of the Card Reader APDU Request message.") protected CardReaderAPDURequest cardReaderAPDURequest; /** The Card reader power off request. */ - @XmlElement(name = "CardReaderPowerOffRequest") + @SerializedName("CardReaderPowerOffRequest") @Schema(description = "Content of the Card Reader Power-Off Request message.") protected CardReaderPowerOffRequest cardReaderPowerOffRequest; /** The Reconciliation request. */ - @XmlElement(name = "ReconciliationRequest") + @SerializedName("ReconciliationRequest") @Schema(description = "Content of the Reconciliation Request message.") protected ReconciliationRequest reconciliationRequest; /** The Reversal request. */ - @XmlElement(name = "ReversalRequest") + @SerializedName("ReversalRequest") @Schema(description = "Content of the Reversal Request message.") protected ReversalRequest reversalRequest; /** The Sound request. */ - @XmlElement(name = "SoundRequest") + @SerializedName("SoundRequest") @Schema(description = "Content of the Sound Request message.") protected SoundRequest soundRequest; /** The Stored value request. */ - @XmlElement(name = "StoredValueRequest") + @SerializedName("StoredValueRequest") @Schema(description = "Content of the Stored Value Request message.") protected StoredValueRequest storedValueRequest; /** The Transaction status request. */ - @XmlElement(name = "TransactionStatusRequest") + @SerializedName("TransactionStatusRequest") @Schema(description = "Content of the TransactionStatus Request message.") protected TransactionStatusRequest transactionStatusRequest; /** The Transmit request. */ - @XmlElement(name = "TransmitRequest") + @SerializedName("TransmitRequest") @Schema(description = "Content of the Transmit Request message.") protected TransmitRequest transmitRequest; /** The Security trailer. */ - @XmlElement(name = "SecurityTrailer") + @SerializedName("SecurityTrailer") @Schema(description = "Protection of the whole message") protected ContentInformation securityTrailer; diff --git a/src/main/java/com/adyen/model/nexo/SaleToPOIResponse.java b/src/main/java/com/adyen/model/nexo/SaleToPOIResponse.java index a31c6247c..1861001e6 100644 --- a/src/main/java/com/adyen/model/nexo/SaleToPOIResponse.java +++ b/src/main/java/com/adyen/model/nexo/SaleToPOIResponse.java @@ -1,11 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; /** * Java class for anonymous complex type. @@ -51,166 +47,134 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "", - propOrder = { - "messageHeader", - "balanceInquiryResponse", - "batchResponse", - "cardAcquisitionResponse", - "adminResponse", - "diagnosisResponse", - "displayResponse", - "enableServiceResponse", - "getTotalsResponse", - "inputResponse", - "loginResponse", - "logoutResponse", - "loyaltyResponse", - "paymentResponse", - "pinResponse", - "printResponse", - "cardReaderInitResponse", - "cardReaderAPDUResponse", - "cardReaderPowerOffResponse", - "reconciliationResponse", - "reversalResponse", - "soundResponse", - "storedValueResponse", - "transactionStatusResponse", - "transmitResponse", - "securityTrailer" - }) -@XmlRootElement(name = "SaleToPOIResponse") public class SaleToPOIResponse { /** The Message header. */ - @XmlElement(name = "MessageHeader", required = true) + @SerializedName("MessageHeader") protected MessageHeader messageHeader; /** The Balance inquiry response. */ - @XmlElement(name = "BalanceInquiryResponse") + @SerializedName("BalanceInquiryResponse") @Schema(description = "Content of the Balance Inquiry Response message.") protected BalanceInquiryResponse balanceInquiryResponse; /** The Batch response. */ - @XmlElement(name = "BatchResponse") + @SerializedName("BatchResponse") @Schema(description = "Content of the Batch Response message.") protected BatchResponse batchResponse; /** The Card acquisition response. */ - @XmlElement(name = "CardAcquisitionResponse") + @SerializedName("CardAcquisitionResponse") @Schema(description = "Content of the Card Acquisition Response message.") protected CardAcquisitionResponse cardAcquisitionResponse; /** The Admin response. */ - @XmlElement(name = "AdminResponse") + @SerializedName("AdminResponse") @Schema(description = "Content of the Custom Admin Response message.") protected AdminResponse adminResponse; /** The Diagnosis response. */ - @XmlElement(name = "DiagnosisResponse") + @SerializedName("DiagnosisResponse") @Schema(description = "Content of the Diagnosis Response message.") protected DiagnosisResponse diagnosisResponse; /** The Display response. */ - @XmlElement(name = "DisplayResponse") + @SerializedName("DisplayResponse") @Schema(description = "Content of the Display Response message.") protected DisplayResponse displayResponse; /** The Enable service response. */ - @XmlElement(name = "EnableServiceResponse") + @SerializedName("EnableServiceResponse") @Schema(description = "Content of the Enable Service Response message.") protected EnableServiceResponse enableServiceResponse; /** The Get totals response. */ - @XmlElement(name = "GetTotalsResponse") + @SerializedName("GetTotalsResponse") @Schema(description = "Content of the Reconciliation Response message.") protected GetTotalsResponse getTotalsResponse; /** The Input response. */ - @XmlElement(name = "InputResponse") + @SerializedName("InputResponse") @Schema(description = "Content of the Input Response message.") protected InputResponse inputResponse; /** The Login response. */ - @XmlElement(name = "LoginResponse") + @SerializedName("LoginResponse") @Schema(description = "Content of the Login Response message.") protected LoginResponse loginResponse; /** The Logout response. */ - @XmlElement(name = "LogoutResponse") + @SerializedName("LogoutResponse") @Schema(description = "Content of the Logout Response message.") protected LogoutResponse logoutResponse; /** The Loyalty response. */ - @XmlElement(name = "LoyaltyResponse") + @SerializedName("LoyaltyResponse") @Schema(description = "Content of the Loyalty Response message.") protected LoyaltyResponse loyaltyResponse; /** The Payment response. */ - @XmlElement(name = "PaymentResponse") + @SerializedName("PaymentResponse") @Schema(description = "Content of the Payment Response message.") protected PaymentResponse paymentResponse; /** The Pin response. */ - @XmlElement(name = "PINResponse") + @SerializedName("PINResponse") @Schema(description = "Content of the PIN Response message.") protected PINResponse pinResponse; /** The Print response. */ - @XmlElement(name = "PrintResponse") + @SerializedName("PrintResponse") @Schema(description = "Content of the Print Response message.") protected PrintResponse printResponse; /** The Card reader init response. */ - @XmlElement(name = "CardReaderInitResponse") + @SerializedName("CardReaderInitResponse") @Schema(description = "Content of the Card Reader Init Response message.") protected CardReaderInitResponse cardReaderInitResponse; /** The Card reader apdu response. */ - @XmlElement(name = "CardReaderAPDUResponse") + @SerializedName("CardReaderAPDUResponse") @Schema(description = "Content of the Card Reader APDU Response message.") protected CardReaderAPDUResponse cardReaderAPDUResponse; /** The Card reader power off response. */ - @XmlElement(name = "CardReaderPowerOffResponse") + @SerializedName("CardReaderPowerOffResponse") @Schema(description = "Content of the Card Reader Power-Off Response message.") protected CardReaderPowerOffResponse cardReaderPowerOffResponse; /** The Reconciliation response. */ - @XmlElement(name = "ReconciliationResponse") + @SerializedName("ReconciliationResponse") @Schema(description = "Content of the Reconciliation Response message.") protected ReconciliationResponse reconciliationResponse; /** The Reversal response. */ - @XmlElement(name = "ReversalResponse") + @SerializedName("ReversalResponse") @Schema(description = "Content of the Reversal Response message.") protected ReversalResponse reversalResponse; /** The Sound response. */ - @XmlElement(name = "SoundResponse") + @SerializedName("SoundResponse") @Schema(description = "Content of the Sound Response message.") protected SoundResponse soundResponse; /** The Stored value response. */ - @XmlElement(name = "StoredValueResponse") + @SerializedName("StoredValueResponse") @Schema(description = "Content of the Stored Value Response message.") protected StoredValueResponse storedValueResponse; /** The Transaction status response. */ - @XmlElement(name = "TransactionStatusResponse") + @SerializedName("TransactionStatusResponse") @Schema(description = "Content of the TransactionStatus Response message.") protected TransactionStatusResponse transactionStatusResponse; /** The Transmit response. */ - @XmlElement(name = "TransmitResponse") + @SerializedName("TransmitResponse") @Schema(description = "Content of the Transmit Response message.") protected TransmitResponse transmitResponse; /** The Security trailer. */ - @XmlElement(name = "SecurityTrailer") + @SerializedName("SecurityTrailer") @Schema(description = "Protection of the whole message") protected ContentInformation securityTrailer; diff --git a/src/main/java/com/adyen/model/nexo/SensitiveCardData.java b/src/main/java/com/adyen/model/nexo/SensitiveCardData.java index 19a8dff30..f25f85288 100644 --- a/src/main/java/com/adyen/model/nexo/SensitiveCardData.java +++ b/src/main/java/com/adyen/model/nexo/SensitiveCardData.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Sensitive information related to the payment card, entered or read by the Sale @@ -33,26 +30,22 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "SensitiveCardData", - propOrder = {"trackData"}) public class SensitiveCardData { /** The Track data. */ - @XmlElement(name = "TrackData") + @SerializedName("TrackData") @Schema( description = "Magnetic track or magnetic ink characters line. --Rule: if EntryMode is MagStripe or RFID ") protected List trackData; /** The Pan. */ - @XmlElement(name = "PAN") + @SerializedName("PAN") @Schema(description = "Primary Account Number --Rule: ", minLength = 8, maxLength = 28) protected String pan; /** The Card seq numb. */ - @XmlElement(name = "CardSeqNumb") + @SerializedName("CardSeqNumb") @Schema( description = "Card Sequence Number --Rule: if EntryMode is File, Keyed or Manual", minLength = 2, @@ -60,7 +53,7 @@ public class SensitiveCardData { protected String cardSeqNumb; /** The Expiry date. */ - @XmlElement(name = "ExpiryDate") + @SerializedName("ExpiryDate") @Schema( description = "Date after which the card cannot be used. --Rule: if EntryMode is File", minLength = 4, diff --git a/src/main/java/com/adyen/model/nexo/SensitiveMobileData.java b/src/main/java/com/adyen/model/nexo/SensitiveMobileData.java index 6c812e846..4dda9fc7f 100644 --- a/src/main/java/com/adyen/model/nexo/SensitiveMobileData.java +++ b/src/main/java/com/adyen/model/nexo/SensitiveMobileData.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Sensitive information related to the mobile phone. -- Usage: This data structure @@ -28,24 +25,22 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SensitiveMobileData") public class SensitiveMobileData { /** The Msisdn. */ - @XmlElement(name = "MSISDN", required = true) + @SerializedName("MSISDN") @Schema( description = "Mobile Subscriber Integrated Service Digital Network (i.e. mobile phone number of the SIM card).") protected String msisdn; /** The Imsi. */ - @XmlElement(name = "IMSI") + @SerializedName("IMSI") @Schema(description = "International Mobile Subscriber Identity. --Rule: If data available") protected String imsi; /** The Imei. */ - @XmlElement(name = "IMEI") + @SerializedName("IMEI") @Schema(description = "International Mobile Equipement Identity. --Rule: If data available") protected String imei; diff --git a/src/main/java/com/adyen/model/nexo/ServiceProfilesType.java b/src/main/java/com/adyen/model/nexo/ServiceProfilesType.java index 37a23eeb0..e1ac05739 100644 --- a/src/main/java/com/adyen/model/nexo/ServiceProfilesType.java +++ b/src/main/java/com/adyen/model/nexo/ServiceProfilesType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for ServiceProfilesType. @@ -28,12 +26,10 @@ * </simpleType> * */ -@XmlType(name = "ServiceProfilesType") -@XmlEnum public enum ServiceProfilesType { /** CardAcquisition and EnableService could be requested by the Sale System to the POI System. */ - @XmlEnumValue("Synchro") + @SerializedName("Synchro") @Schema( description = "CardAcquisition and EnableService could be requested by the Sale System to the POI System.") @@ -43,31 +39,31 @@ public enum ServiceProfilesType { * When the POI is unable to perform transactions without the Sale system, e.g. payment at * delivery, the POI provides in a Batch the performed transactions, and */ - @XmlEnumValue("Batch") + @SerializedName("Batch") @Schema( description = "When the POI is unable to perform transactions without the Sale system, e.g. payment at delivery, the POI provides in a Batch the performed transactions, and") BATCH("Batch"), /** One Time Reservation service could be requested by the Sale System (as petrol distribution) */ - @XmlEnumValue("OneTimeRes") + @SerializedName("OneTimeRes") @Schema( description = "One Time Reservation service could be requested by the Sale System (as petrol distribution)") ONE_TIME_RES("OneTimeRes"), /** The Reservation services could be requested by the Sale System */ - @XmlEnumValue("Reservation") + @SerializedName("Reservation") @Schema(description = "The Reservation services could be requested by the Sale System") RESERVATION("Reservation"), /** Loyalty services could be requested by the Sale System */ - @XmlEnumValue("Loyalty") + @SerializedName("Loyalty") @Schema(description = "Loyalty services could be requested by the Sale System") LOYALTY("Loyalty"), /** Stored Value service could be requested by the Sale System */ - @XmlEnumValue("StoredValue") + @SerializedName("StoredValue") @Schema(description = "Stored Value service could be requested by the Sale System") STORED_VALUE("StoredValue"), @@ -75,12 +71,12 @@ public enum ServiceProfilesType { PIN("PIN"), /** The Sale System could request Card Reader services. */ - @XmlEnumValue("CardReader") + @SerializedName("CardReader") @Schema(description = "The Sale System could request Card Reader services.") CARD_READER("CardReader"), /** To produce various forms of sounds to a customer or an operator interface. */ - @XmlEnumValue("Sound") + @SerializedName("Sound") @Schema( description = "To produce various forms of sounds to a customer or an operator interface.") SOUND("Sound"), @@ -89,7 +85,7 @@ public enum ServiceProfilesType { * The POI or Sale System could request communication through the Transmit device messages * exchange. */ - @XmlEnumValue("Communication") + @SerializedName("Communication") @Schema( description = "The POI or Sale System could request communication through the Transmit device messages exchange.") diff --git a/src/main/java/com/adyen/model/nexo/ServicesEnabledType.java b/src/main/java/com/adyen/model/nexo/ServicesEnabledType.java index 09d698a82..e5944d01e 100644 --- a/src/main/java/com/adyen/model/nexo/ServicesEnabledType.java +++ b/src/main/java/com/adyen/model/nexo/ServicesEnabledType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for ServicesEnabledType. @@ -21,15 +19,13 @@ * </simpleType> * */ -@XmlType(name = "ServicesEnabledType") -@XmlEnum public enum ServicesEnabledType { /** * Enable the POI to process a card acquisition before the request of the Sale System (e.g. the * same processing than the CardAcquisition command, but no more) */ - @XmlEnumValue("CardAcquisition") + @SerializedName("CardAcquisition") @Schema( description = "Enable the POI to process a card acquisition before the request of the Sale System (e.g. the same processing than the CardAcquisition command, but no more)") @@ -39,7 +35,7 @@ public enum ServicesEnabledType { * Enable the POI to start a payment transaction before the request of the Sale System (e.g. the * same processing than the Payment command) */ - @XmlEnumValue("Payment") + @SerializedName("Payment") @Schema( description = "Enable the POI to start a payment transaction before the request of the Sale System (e.g. the same processing than the Payment command)") @@ -49,7 +45,7 @@ public enum ServicesEnabledType { * Enable the POI to start a loyalty transaction before the request of the Sale System (e.g. the * same processing than the Loyalty command) */ - @XmlEnumValue("Loyalty") + @SerializedName("Loyalty") @Schema( description = "Enable the POI to start a loyalty transaction before the request of the Sale System (e.g. the same processing than the Loyalty command)") diff --git a/src/main/java/com/adyen/model/nexo/SignaturePoint.java b/src/main/java/com/adyen/model/nexo/SignaturePoint.java index c7a74d953..9617b0b31 100644 --- a/src/main/java/com/adyen/model/nexo/SignaturePoint.java +++ b/src/main/java/com/adyen/model/nexo/SignaturePoint.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Coordinates of a point where the pen changes direction or lift. -- Usage: Contain the @@ -26,17 +23,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SignaturePoint") public class SignaturePoint { /** The X. */ - @XmlElement(name = "X", required = true) + @SerializedName("X") @Schema(description = "Abscissa of a point coordinates.") protected String x; /** The Y. */ - @XmlElement(name = "Y", required = true) + @SerializedName("Y") @Schema(description = "Ordinate of a point coordinates.") protected String y; diff --git a/src/main/java/com/adyen/model/nexo/SignedData.java b/src/main/java/com/adyen/model/nexo/SignedData.java index 78dd61774..290f80ac8 100644 --- a/src/main/java/com/adyen/model/nexo/SignedData.java +++ b/src/main/java/com/adyen/model/nexo/SignedData.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Cryptographic Message Syntax (CMS) data structure containing signed data -- @@ -34,30 +31,26 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "SignedData", - propOrder = {"digestAlgorithm", "encapsulatedContent", "certificate", "signer"}) public class SignedData { /** The Digest algorithm. */ - @XmlElement(name = "DigestAlgorithm", required = true) + @SerializedName("DigestAlgorithm") protected List digestAlgorithm; /** The Encapsulated content. */ - @XmlElement(name = "EncapsulatedContent", required = true) + @SerializedName("EncapsulatedContent") protected EncapsulatedContent encapsulatedContent; /** The Certificate. */ - @XmlElement(name = "Certificate") + @SerializedName("Certificate") protected List certificate; /** The Signer. */ - @XmlElement(name = "Signer", required = true) + @SerializedName("Signer") protected List signer; /** The Version. */ - @XmlElement(name = "Version") + @SerializedName("Version") protected VersionType version; /** diff --git a/src/main/java/com/adyen/model/nexo/Signer.java b/src/main/java/com/adyen/model/nexo/Signer.java index 975e0220c..2fce2d69a 100644 --- a/src/main/java/com/adyen/model/nexo/Signer.java +++ b/src/main/java/com/adyen/model/nexo/Signer.java @@ -1,9 +1,6 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import com.google.gson.annotations.SerializedName; /** * Definition: Cryptographic Message Syntax (CMS) data structure containing signer information -- @@ -31,30 +28,26 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "Signer", - propOrder = {"signerIdentifier", "digestAlgorithm", "signatureAlgorithm", "signature"}) public class Signer { /** The Signer identifier. */ - @XmlElement(name = "SignerIdentifier", required = true) + @SerializedName("SignerIdentifier") protected SignerIdentifier signerIdentifier; /** The Digest algorithm. */ - @XmlElement(name = "DigestAlgorithm", required = true) + @SerializedName("DigestAlgorithm") protected AlgorithmIdentifier digestAlgorithm; /** The Signature algorithm. */ - @XmlElement(name = "SignatureAlgorithm", required = true) + @SerializedName("SignatureAlgorithm") protected AlgorithmIdentifier signatureAlgorithm; /** The Signature. */ - @XmlElement(name = "Signature", required = true) + @SerializedName("Signature") protected byte[] signature; /** The Version. */ - @XmlElement(name = "Version") + @SerializedName("Version") protected VersionType version; /** diff --git a/src/main/java/com/adyen/model/nexo/SignerIdentifier.java b/src/main/java/com/adyen/model/nexo/SignerIdentifier.java index ab65fb8bd..977df16ce 100644 --- a/src/main/java/com/adyen/model/nexo/SignerIdentifier.java +++ b/src/main/java/com/adyen/model/nexo/SignerIdentifier.java @@ -1,9 +1,6 @@ package com.adyen.model.nexo; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import com.google.gson.annotations.SerializedName; /** * Definition: Cryptographic Message Syntax (CMS) data structure containing the Signer Identifier -- @@ -26,14 +23,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "SignerIdentifier", - propOrder = {"issuerAndSerialNumber"}) public class SignerIdentifier { /** The Issuer and serial number. */ - @XmlElement(name = "IssuerAndSerialNumber", required = true) + @SerializedName("IssuerAndSerialNumber") protected IssuerAndSerialNumber issuerAndSerialNumber; /** diff --git a/src/main/java/com/adyen/model/nexo/SoundActionType.java b/src/main/java/com/adyen/model/nexo/SoundActionType.java index a1e944b27..c1b716a4d 100644 --- a/src/main/java/com/adyen/model/nexo/SoundActionType.java +++ b/src/main/java/com/adyen/model/nexo/SoundActionType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for SoundActionType. @@ -21,22 +19,20 @@ * </simpleType> * */ -@XmlType(name = "SoundActionType") -@XmlEnum public enum SoundActionType { /** Start the sound as specified in the messageType. */ - @XmlEnumValue("StartSound") + @SerializedName("StartSound") @Schema(description = "Start the sound as specified in the message.") START_SOUND("StartSound"), /** Stop the sound in progress. */ - @XmlEnumValue("StopSound") + @SerializedName("StopSound") @Schema(description = "Stop the sound in progress.") STOP_SOUND("StopSound"), /** Set the default volume of sounds. */ - @XmlEnumValue("SetDefaultVolume") + @SerializedName("SetDefaultVolume") @Schema(description = "Set the default volume of sounds.") SET_DEFAULT_VOLUME("SetDefaultVolume"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/SoundContent.java b/src/main/java/com/adyen/model/nexo/SoundContent.java index fc751e126..577115323 100644 --- a/src/main/java/com/adyen/model/nexo/SoundContent.java +++ b/src/main/java/com/adyen/model/nexo/SoundContent.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Sound to play. @@ -26,25 +23,23 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SoundContent") public class SoundContent { - @XmlElement(name = "SoundFormat") + @SerializedName("SoundFormat") @Schema(description = "Type of sound to play.") protected SoundFormatType soundFormat; - @XmlElement(name = "Language") + @SerializedName("Language") @Schema(description = "Identification of a language.") protected String language; - @XmlElement(name = "ReferenceID") + @SerializedName("ReferenceID") @Schema( description = "Identification of a predefined message to display, print or play. --Rule: Mandatory if SoundFormat is SoundRef or MessageRef.") protected String referenceID; - @XmlElement(name = "Text") + @SerializedName("Text") @Schema(description = "Content of text message to display, print or play.") protected String text; diff --git a/src/main/java/com/adyen/model/nexo/SoundFormatType.java b/src/main/java/com/adyen/model/nexo/SoundFormatType.java index c62995d12..71aad8e44 100644 --- a/src/main/java/com/adyen/model/nexo/SoundFormatType.java +++ b/src/main/java/com/adyen/model/nexo/SoundFormatType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for SoundFormatType. @@ -21,22 +19,20 @@ * </simpleType> * */ -@XmlType(name = "SoundFormatType") -@XmlEnum public enum SoundFormatType { /** Preloaded sound File. */ - @XmlEnumValue("SoundRef") + @SerializedName("SoundRef") @Schema(description = "Preloaded sound File.") SOUND_REF("SoundRef"), /** Reference of a preloaded text to play. */ - @XmlEnumValue("MessageRef") + @SerializedName("MessageRef") @Schema(description = "Reference of a preloaded text to play.") MESSAGE_REF("MessageRef"), /** Text to play. */ - @XmlEnumValue("Text") + @SerializedName("Text") @Schema(description = "Text to play.") TEXT("Text"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/SoundRequest.java b/src/main/java/com/adyen/model/nexo/SoundRequest.java index 07e4de7c0..7314d47d7 100644 --- a/src/main/java/com/adyen/model/nexo/SoundRequest.java +++ b/src/main/java/com/adyen/model/nexo/SoundRequest.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Sound Request messageType. -- Usage: It conveys the data to start a @@ -31,31 +28,27 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "SoundRequest", - propOrder = {"soundContent"}) public class SoundRequest { /** The Sound content. */ - @XmlElement(name = "SoundContent", required = true) + @SerializedName("SoundContent") @Schema( description = "Content of the Sound to play. --Rule: Absent if SoundAction is SetDefaultVolume, otherwise mandatory.") protected SoundContent soundContent; /** The Response mode. */ - @XmlElement(name = "ResponseMode") + @SerializedName("ResponseMode") @Schema(description = "Message response awaited by the initiator of the Request") protected ResponseModeType responseMode; /** The Sound action. */ - @XmlElement(name = "SoundAction", required = true) + @SerializedName("SoundAction") @Schema(description = "Type of action to perform on the sound.") protected SoundActionType soundAction; /** The Sound volume. */ - @XmlElement(name = "SoundVolume") + @SerializedName("SoundVolume") @Schema( description = "Volume of a sound, either in a pourcentage of the maximum volume, or 0 to mute. --Rule: Mandatory if SoundAction is SetDefaultVolume") diff --git a/src/main/java/com/adyen/model/nexo/SoundResponse.java b/src/main/java/com/adyen/model/nexo/SoundResponse.java index fa51bc03d..213fa2b11 100644 --- a/src/main/java/com/adyen/model/nexo/SoundResponse.java +++ b/src/main/java/com/adyen/model/nexo/SoundResponse.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Sound Response messageType. -- Usage: It conveys the result of the @@ -27,14 +24,10 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "SoundResponse", - propOrder = {"response"}) public class SoundResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; diff --git a/src/main/java/com/adyen/model/nexo/SponsoredMerchant.java b/src/main/java/com/adyen/model/nexo/SponsoredMerchant.java index db46e16fb..2f616410a 100644 --- a/src/main/java/com/adyen/model/nexo/SponsoredMerchant.java +++ b/src/main/java/com/adyen/model/nexo/SponsoredMerchant.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Merchant using the payment services of a payment facilitator, acting as a card @@ -29,32 +26,30 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SponsoredMerchant") public class SponsoredMerchant { /** The Merchant name. */ - @XmlElement(name = "MerchantName", required = true) + @SerializedName("MerchantName") @Schema(description = "Unformatted name of the merchant.") protected String merchantName; /** The Merchant address. */ - @XmlElement(name = "MerchantAddress") + @SerializedName("MerchantAddress") @Schema(description = "Unformatted address of the merchant.") protected String merchantAddress; /** The Merchant country. */ - @XmlElement(name = "MerchantCountry", required = true) + @SerializedName("MerchantCountry") @Schema(description = "Country of the merchant.") protected String merchantCountry; /** The Merchant category code. */ - @XmlElement(name = "MerchantCategoryCode", required = true) + @SerializedName("MerchantCategoryCode") @Schema(description = "The code which identifies the category of the transaction (MCC).") protected String merchantCategoryCode; /** The Registration id. */ - @XmlElement(name = "RegistrationID", required = true) + @SerializedName("RegistrationID") @Schema(description = "Identification of a registered entity.") protected String registrationID; diff --git a/src/main/java/com/adyen/model/nexo/StoredValueAccountID.java b/src/main/java/com/adyen/model/nexo/StoredValueAccountID.java index c2bce9dac..60c2874d6 100644 --- a/src/main/java/com/adyen/model/nexo/StoredValueAccountID.java +++ b/src/main/java/com/adyen/model/nexo/StoredValueAccountID.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Identification of the stored value account or the stored value card -- Usage: It @@ -33,39 +30,37 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "StoredValueAccountID") public class StoredValueAccountID { - @XmlElement(name = "StoredValueAccountType", required = true) + @SerializedName("StoredValueAccountType") @Schema(description = "Type of stored value account") protected StoredValueAccountType storedValueAccountType; - @XmlElement(name = "StoredValueProvider") + @SerializedName("StoredValueProvider") @Schema( description = "Identification of the provider of the stored value account load/reload --Rule: If available for the card or account.") protected String storedValueProvider; - @XmlElement(name = "OwnerName") + @SerializedName("OwnerName") @Schema(description = "Owner name of an account --Rule: If available for the card or account.") protected String ownerName; - @XmlElement(name = "ExpiryDate") + @SerializedName("ExpiryDate") @Schema( description = "Date after which the card cannot be used. --Rule: If required for the card or account.") protected String expiryDate; - @XmlElement(name = "EntryMode", required = true) + @SerializedName("EntryMode") @Schema(description = "Entry mode of the payment instrument information") protected List entryMode; - @XmlElement(name = "IdentificationType", required = true) + @SerializedName("IdentificationType") @Schema(description = "Type of account identification") protected IdentificationType identificationType; - @XmlElement(name = "StoredValueID", required = true) + @SerializedName("StoredValueID") @Schema(description = "Stored value account identification") protected String storedValueID; diff --git a/src/main/java/com/adyen/model/nexo/StoredValueAccountStatus.java b/src/main/java/com/adyen/model/nexo/StoredValueAccountStatus.java index d25e4ea26..8ad67401b 100644 --- a/src/main/java/com/adyen/model/nexo/StoredValueAccountStatus.java +++ b/src/main/java/com/adyen/model/nexo/StoredValueAccountStatus.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the result of the stored value card transaction. -- Usage: It @@ -30,19 +27,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "StoredValueAccountStatus", - propOrder = {"storedValueAccountID"}) public class StoredValueAccountStatus { /** The Stored value account id. */ - @XmlElement(name = "StoredValueAccountID", required = true) + @SerializedName("StoredValueAccountID") @Schema(description = "Identification of the stored value account or the stored value card") protected StoredValueAccountID storedValueAccountID; /** The Current balance. */ - @XmlElement(name = "CurrentBalance") + @SerializedName("CurrentBalance") @Schema(description = "Balance of an account. --Rule: if relevant and known") protected BigDecimal currentBalance; diff --git a/src/main/java/com/adyen/model/nexo/StoredValueAccountType.java b/src/main/java/com/adyen/model/nexo/StoredValueAccountType.java index 4f80b204c..3998e89bc 100644 --- a/src/main/java/com/adyen/model/nexo/StoredValueAccountType.java +++ b/src/main/java/com/adyen/model/nexo/StoredValueAccountType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for StoredValueAccountType. @@ -21,26 +19,24 @@ * </simpleType> * */ -@XmlType(name = "StoredValueAccountType") -@XmlEnum public enum StoredValueAccountType { /** Payment mean issued by retailers or banks as a substitute to a non-monetary gift. */ - @XmlEnumValue("GiftCard") + @SerializedName("GiftCard") @Schema( description = "Payment mean issued by retailers or banks as a substitute to a non-monetary gift.") GIFT_CARD("GiftCard"), /** Stored value instrument used to pay telephone services (e.g. card or identifier). */ - @XmlEnumValue("PhoneCard") + @SerializedName("PhoneCard") @Schema( description = "Stored value instrument used to pay telephone services (e.g. card or identifier).") PHONE_CARD("PhoneCard"), /** Other stored value instrument. */ - @XmlEnumValue("Other") + @SerializedName("Other") @Schema(description = "Other stored value instrument.") OTHER("Other"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/StoredValueData.java b/src/main/java/com/adyen/model/nexo/StoredValueData.java index 3ff7b8141..9d5279545 100644 --- a/src/main/java/com/adyen/model/nexo/StoredValueData.java +++ b/src/main/java/com/adyen/model/nexo/StoredValueData.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the stored value card. -- Usage: It contains: - the identification of @@ -35,42 +32,38 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "StoredValueData", - propOrder = {"storedValueAccountID", "originalPOITransaction"}) public class StoredValueData { /** The Stored value account id. */ - @XmlElement(name = "StoredValueAccountID") + @SerializedName("StoredValueAccountID") @Schema( description = "Identification of the stored value account or the stored value card --Rule: If the identification of the Stored Value account or card has been made by the Sale System before the request") protected StoredValueAccountID storedValueAccountID; /** The Original poi transaction. */ - @XmlElement(name = "OriginalPOITransaction") + @SerializedName("OriginalPOITransaction") @Schema( description = "Identification of a previous POI transaction. --Rule: if StoredValueTransactionType is Reverse or Duplicate") protected OriginalPOITransaction originalPOITransaction; /** The Stored value provider. */ - @XmlElement(name = "StoredValueProvider") + @SerializedName("StoredValueProvider") @Schema( description = "Identification of the provider of the stored value account load/reload --Rule: If more than one provider to manage on the POI, and StoredValueAccountID absent.") protected String storedValueProvider; /** The Stored value transaction. */ - @XmlElement(name = "StoredValueTransactionType", required = true) + @SerializedName("StoredValueTransactionType") @Schema( description = "Identification of operation to proceed on the stored value account or the stored value card") protected StoredValueTransactionType storedValueTransactionType; /** The Product code. */ - @XmlElement(name = "ProductCode") + @SerializedName("ProductCode") @Schema( description = "Product code of item purchased with the transaction.", minLength = 1, @@ -78,17 +71,17 @@ public class StoredValueData { protected String productCode; /** The Ean upc. */ - @XmlElement(name = "EanUpc") + @SerializedName("EanUpc") @Schema(description = "Standard product code of item purchased with the transaction.") protected String eanUpc; /** The Item amount. */ - @XmlElement(name = "ItemAmount", required = true) + @SerializedName("ItemAmount") @Schema(description = "Total amount of the item line.") protected BigDecimal itemAmount; /** The Currency. */ - @XmlElement(name = "Currency", required = true) + @SerializedName("Currency") @Schema(description = "Currency of a monetary amount.") protected String currency; diff --git a/src/main/java/com/adyen/model/nexo/StoredValueRequest.java b/src/main/java/com/adyen/model/nexo/StoredValueRequest.java index 998af44cd..f04b15d83 100644 --- a/src/main/java/com/adyen/model/nexo/StoredValueRequest.java +++ b/src/main/java/com/adyen/model/nexo/StoredValueRequest.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Stored Value Request messageType. -- Usage: It conveys Information @@ -30,24 +27,20 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "StoredValueRequest", - propOrder = {"saleData", "storedValueData"}) public class StoredValueRequest { /** The Sale data. */ - @XmlElement(name = "SaleData", required = true) + @SerializedName("SaleData") @Schema(description = "Data related to the Sale System.") protected SaleData saleData; /** The Stored value data. */ - @XmlElement(name = "StoredValueData", required = true) + @SerializedName("StoredValueData") @Schema(description = "Data related to the stored value card.") protected List storedValueData; /** The Customer language. */ - @XmlElement(name = "CustomerLanguage") + @SerializedName("CustomerLanguage") @Schema( description = "Language of the Customer --Rule: If the language is selected by the Sale System before the request to the POI.") diff --git a/src/main/java/com/adyen/model/nexo/StoredValueResponse.java b/src/main/java/com/adyen/model/nexo/StoredValueResponse.java index 076c16c7e..42db88087 100644 --- a/src/main/java/com/adyen/model/nexo/StoredValueResponse.java +++ b/src/main/java/com/adyen/model/nexo/StoredValueResponse.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Stored Value Response messageType. -- Usage: It conveys Information @@ -31,36 +28,32 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "StoredValueResponse", - propOrder = {"response", "saleData", "poiData", "storedValueResult", "paymentReceipt"}) public class StoredValueResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Sale data. */ - @XmlElement(name = "SaleData", required = true) + @SerializedName("SaleData") @Schema(description = "Data related to the Sale System.") protected SaleData saleData; /** The Poi data. */ - @XmlElement(name = "POIData", required = true) + @SerializedName("POIData") @Schema(description = "Data related to the POI System.") protected POIData poiData; /** The Stored value result. */ - @XmlElement(name = "StoredValueResult") + @SerializedName("StoredValueResult") @Schema( description = "Result of loading/reloading a stored value card.. --Rule: If StoredValueResponse.Result is \"Success\" or \"Partial\", one entry per StoredValueRequest.StoredValueData loaded or") protected List storedValueResult; /** The Payment receipt. */ - @XmlElement(name = "PaymentReceipt") + @SerializedName("PaymentReceipt") protected List paymentReceipt; /** diff --git a/src/main/java/com/adyen/model/nexo/StoredValueResult.java b/src/main/java/com/adyen/model/nexo/StoredValueResult.java index e47970301..19365b406 100644 --- a/src/main/java/com/adyen/model/nexo/StoredValueResult.java +++ b/src/main/java/com/adyen/model/nexo/StoredValueResult.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Result of loading/reloading a stored value card.. -- Usage: For each stored value @@ -33,49 +30,45 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "StoredValueResult", - propOrder = {"storedValueAccountStatus", "hostTransactionID"}) public class StoredValueResult { /** The Stored value account status. */ - @XmlElement(name = "StoredValueAccountStatus", required = true) + @SerializedName("StoredValueAccountStatus") @Schema(description = "Data related to the result of the stored value card transaction.") protected StoredValueAccountStatus storedValueAccountStatus; /** The Host transaction id. */ - @XmlElement(name = "HostTransactionID") + @SerializedName("HostTransactionID") @Schema( description = "Identification of the transaction by the host in charge of the stored value transaction --Rule: If provided by the Host") protected TransactionIdentification hostTransactionID; /** The Stored value transaction. */ - @XmlElement(name = "StoredValueTransactionType", required = true) + @SerializedName("StoredValueTransactionType") @Schema( description = "Identification of operation to proceed on the stored value account or the stored value card --Rule: Copy") protected StoredValueTransactionType storedValueTransactionType; /** The Product code. */ - @XmlElement(name = "ProductCode", required = true) + @SerializedName("ProductCode") @Schema(description = "Product code of item purchased with the transaction. --Rule: Copy") protected String productCode; /** The Ean upc. */ - @XmlElement(name = "EanUpc") + @SerializedName("EanUpc") @Schema( description = "Standard product code of item purchased with the transaction. --Rule: Copy") protected String eanUpc; /** The Item amount. */ - @XmlElement(name = "ItemAmount", required = true) + @SerializedName("ItemAmount") @Schema(description = "Total amount of the item line.") protected BigDecimal itemAmount; /** The Currency. */ - @XmlElement(name = "Currency", required = true) + @SerializedName("Currency") @Schema(description = "Currency of a monetary amount. --Rule: Copy") protected String currency; diff --git a/src/main/java/com/adyen/model/nexo/StoredValueTransactionType.java b/src/main/java/com/adyen/model/nexo/StoredValueTransactionType.java index 5bfab0be5..1b0015e44 100644 --- a/src/main/java/com/adyen/model/nexo/StoredValueTransactionType.java +++ b/src/main/java/com/adyen/model/nexo/StoredValueTransactionType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for StoredValueTransactionType. @@ -24,37 +22,35 @@ * </simpleType> * */ -@XmlType(name = "StoredValueTransactionType") -@XmlEnum public enum StoredValueTransactionType { /** Reserve the account (e.g. get an activation code) */ - @XmlEnumValue("Reserve") + @SerializedName("Reserve") @Schema(description = "Reserve the account (e.g. get an activation code)") RESERVE("Reserve"), /** Activate the account or the card */ - @XmlEnumValue("Activate") + @SerializedName("Activate") @Schema(description = "Activate the account or the card") ACTIVATE("Activate"), /** Load the account or the card with money */ - @XmlEnumValue("Load") + @SerializedName("Load") @Schema(description = "Load the account or the card with money") LOAD("Load"), /** Unload the account */ - @XmlEnumValue("Unload") + @SerializedName("Unload") @Schema(description = "Unload the account") UNLOAD("Unload"), /** Reverse an activation or loading. */ - @XmlEnumValue("Reverse") + @SerializedName("Reverse") @Schema(description = "Reverse an activation or loading.") REVERSE("Reverse"), /** Duplicate the code or number provided by the loading or activation */ - @XmlEnumValue("Duplicate") + @SerializedName("Duplicate") @Schema(description = "Duplicate the code or number provided by the loading or activation") DUPLICATE("Duplicate"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/TerminalEnvironmentType.java b/src/main/java/com/adyen/model/nexo/TerminalEnvironmentType.java index 395b0e216..754c97b0b 100644 --- a/src/main/java/com/adyen/model/nexo/TerminalEnvironmentType.java +++ b/src/main/java/com/adyen/model/nexo/TerminalEnvironmentType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for TerminalEnvironmentType. @@ -21,15 +19,13 @@ * </simpleType> * */ -@XmlType(name = "TerminalEnvironmentType") -@XmlEnum public enum TerminalEnvironmentType { /** * The Sale Terminal is managed by a Cashier through the Sale System. A Cashier Interface is * provided by the POI System during the process of a request from the */ - @XmlEnumValue("Attended") + @SerializedName("Attended") @Schema( description = "The Sale Terminal is managed by a Cashier through the Sale System. A Cashier Interface is provided by the POI System during the process of a request from the") @@ -39,7 +35,7 @@ public enum TerminalEnvironmentType { * Without a Cashier Interface. The POI Terminal is managed by the Customer through the Customer * Interface. A Cashier could help the Cardholder during the */ - @XmlEnumValue("SemiAttended") + @SerializedName("SemiAttended") @Schema( description = "Without a Cashier Interface. The POI Terminal is managed by the Customer through the Customer Interface. A Cashier could help the Cardholder during the") @@ -49,7 +45,7 @@ public enum TerminalEnvironmentType { * The Sale Terminal is managed as a logical terminal without any Cashier Interface (typically a * background process). The POI Terminal is managed by the Customer */ - @XmlEnumValue("Unattended") + @SerializedName("Unattended") @Schema( description = "The Sale Terminal is managed as a logical terminal without any Cashier Interface (typically a background process). The POI Terminal is managed by the Customer") diff --git a/src/main/java/com/adyen/model/nexo/TokenRequestedType.java b/src/main/java/com/adyen/model/nexo/TokenRequestedType.java index 9aac729e7..93436cb59 100644 --- a/src/main/java/com/adyen/model/nexo/TokenRequestedType.java +++ b/src/main/java/com/adyen/model/nexo/TokenRequestedType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for TokenRequestedType. @@ -20,19 +18,17 @@ * </simpleType> * */ -@XmlType(name = "TokenRequestedType") -@XmlEnum public enum TokenRequestedType { /** The token is generated to recognise a customer during the time of a transaction. */ - @XmlEnumValue("Transaction") + @SerializedName("Transaction") @Schema( description = "The token is generated to recognise a customer during the time of a transaction.") TRANSACTION("Transaction"), /** The token is generated to recognise a customer for a longer period. */ - @XmlEnumValue("Customer") + @SerializedName("Customer") @Schema(description = "The token is generated to recognise a customer for a longer period.") CUSTOMER("Customer"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/TotalDetailsType.java b/src/main/java/com/adyen/model/nexo/TotalDetailsType.java index ddee1e676..ce3299960 100644 --- a/src/main/java/com/adyen/model/nexo/TotalDetailsType.java +++ b/src/main/java/com/adyen/model/nexo/TotalDetailsType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for TotalDetailsType. @@ -23,30 +21,28 @@ * </simpleType> * */ -@XmlType(name = "TotalDetailsType") -@XmlEnum public enum TotalDetailsType { /** Give the totals result per POIID value. */ POIID("POIID"), /** Give the totals result per SaleID value. */ - @XmlEnumValue("SaleID") + @SerializedName("SaleID") @Schema(description = "Give the totals result per SaleID value.") SALE_ID("SaleID"), /** Give the totals result per OperatorID value. */ - @XmlEnumValue("OperatorID") + @SerializedName("OperatorID") @Schema(description = "Give the totals result per OperatorID value.") OPERATOR_ID("OperatorID"), /** Give the totals result per ShiftNumber value. */ - @XmlEnumValue("ShiftNumber") + @SerializedName("ShiftNumber") @Schema(description = "Give the totals result per ShiftNumber value.") SHIFT_NUMBER("ShiftNumber"), /** Give the totals result per TotalsGroupID value. */ - @XmlEnumValue("TotalsGroupID") + @SerializedName("TotalsGroupID") @Schema(description = "Give the totals result per TotalsGroupID value.") TOTALS_GROUP_ID("TotalsGroupID"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/TotalFilter.java b/src/main/java/com/adyen/model/nexo/TotalFilter.java index 504ba9cdb..c61abb6bf 100644 --- a/src/main/java/com/adyen/model/nexo/TotalFilter.java +++ b/src/main/java/com/adyen/model/nexo/TotalFilter.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Filter to compute the totals. -- Usage: Used for the Get Totals, to request totals @@ -29,40 +26,38 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "TotalFilter") public class TotalFilter { /** The Poiid. */ - @XmlElement(name = "POIID") + @SerializedName("POIID") @Schema( description = "Identification of a POI System or a POI Terminal for the Sale to POI protocol --Rule: If totals in the response have to be computed only for this particular value of POIID") protected String poiid; /** The Sale id. */ - @XmlElement(name = "SaleID") + @SerializedName("SaleID") @Schema( description = "Identification of a Sale System or a Sale Terminal for the Sale to POI protocol --Rule: If totals in the response have to be computed only for this particular value of SaleID") protected String saleID; /** The Operator id. */ - @XmlElement(name = "OperatorID") + @SerializedName("OperatorID") @Schema( description = "Identification of the Cashier or Operator. --Rule: If totals in the response have to be computed only for this particular value of OperatorID") protected String operatorID; /** The Shift number. */ - @XmlElement(name = "ShiftNumber") + @SerializedName("ShiftNumber") @Schema( description = "Shift number. --Rule: If totals in the response have to be computed only for this particular value of ShiftNumber") protected String shiftNumber; /** The Totals group id. */ - @XmlElement(name = "TotalsGroupID") + @SerializedName("TotalsGroupID") @Schema( description = "Identification of a group of transaction on a POI Terminal, having the same Sale features. --Rule: If totals in the response have to be computed only for this particular value of TotalsGroupID", diff --git a/src/main/java/com/adyen/model/nexo/TrackData.java b/src/main/java/com/adyen/model/nexo/TrackData.java index d15b29fc5..9b0ab589e 100644 --- a/src/main/java/com/adyen/model/nexo/TrackData.java +++ b/src/main/java/com/adyen/model/nexo/TrackData.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Magnetic track or magnetic ink characters line. -- Reference: ISO 7813 - ISO 4909 -- @@ -28,19 +25,17 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "TrackData") public class TrackData { - @XmlElement(name = "TrackValue") + @SerializedName("TrackValue") @Schema(description = "Card track content", minLength = 1, maxLength = 104) protected String trackValue; - @XmlElement(name = "TrackNumb") + @SerializedName("TrackNumb") @Schema(description = "Card track number") protected Integer trackNumb; - @XmlElement(name = "TrackFormat") + @SerializedName("TrackFormat") @Schema(description = "Card track format") protected TrackFormatType trackFormat; diff --git a/src/main/java/com/adyen/model/nexo/TrackFormatType.java b/src/main/java/com/adyen/model/nexo/TrackFormatType.java index 5de575b56..abbf523b4 100644 --- a/src/main/java/com/adyen/model/nexo/TrackFormatType.java +++ b/src/main/java/com/adyen/model/nexo/TrackFormatType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for TrackFormatType. @@ -24,20 +22,18 @@ * </simpleType> * */ -@XmlType(name = "TrackFormatType") -@XmlEnum public enum TrackFormatType { /** ISO card track format - ISO 7813 - ISO 4909 */ ISO("ISO"), /** Japenese track format I */ - @XmlEnumValue("JIS-I") + @SerializedName("JIS-I") @Schema(description = "Japenese track format I") JIS_I("JIS-I"), /** Japenese track format II */ - @XmlEnumValue("JIS-II") + @SerializedName("JIS-II") @Schema(description = "Japenese track format II") JIS_II("JIS-II"), @@ -48,7 +44,7 @@ public enum TrackFormatType { * ((Magnetic Ink Character Recognition, using the CMC-7 font - ISO 1004) Line at the bottom of a * check containing the bank account and the check number. */ - @XmlEnumValue("CMC-7") + @SerializedName("CMC-7") @Schema( description = "((Magnetic Ink Character Recognition, using the CMC-7 font - ISO 1004) Line at the bottom of a check containing the bank account and the check number.") @@ -58,7 +54,7 @@ public enum TrackFormatType { * (Magnetic Ink Character Recognition, using the E-13B font) Line at the bottom of a check * containing the bank account and the check number. */ - @XmlEnumValue("E-13B") + @SerializedName("E-13B") @Schema( description = "(Magnetic Ink Character Recognition, using the E-13B font) Line at the bottom of a check containing the bank account and the check number.") diff --git a/src/main/java/com/adyen/model/nexo/TransactionActionType.java b/src/main/java/com/adyen/model/nexo/TransactionActionType.java index 634d6864a..d7417a613 100644 --- a/src/main/java/com/adyen/model/nexo/TransactionActionType.java +++ b/src/main/java/com/adyen/model/nexo/TransactionActionType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for TransactionActionType. @@ -20,12 +18,10 @@ * </simpleType> * */ -@XmlType(name = "TransactionActionType") -@XmlEnum public enum TransactionActionType { /** Start a transaction by a swipe ahead mechanism, with the services which are enabled. */ - @XmlEnumValue("StartTransaction") + @SerializedName("StartTransaction") @Schema( description = "Start a transaction by a swipe ahead mechanism, with the services which are enabled.") @@ -35,7 +31,7 @@ public enum TransactionActionType { * Abort a transaction started either by a CardAcquisition or EnableService with TransactionAction * to "StartTransaction", not followed by a service request from */ - @XmlEnumValue("AbortTransaction") + @SerializedName("AbortTransaction") @Schema( description = "Abort a transaction started either by a CardAcquisition or EnableService with TransactionAction to \"StartTransaction\", not followed by a service request from") diff --git a/src/main/java/com/adyen/model/nexo/TransactionConditions.java b/src/main/java/com/adyen/model/nexo/TransactionConditions.java index d77efa335..81933c603 100644 --- a/src/main/java/com/adyen/model/nexo/TransactionConditions.java +++ b/src/main/java/com/adyen/model/nexo/TransactionConditions.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Conditions on which the transaction must be processed. @@ -35,67 +32,63 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "TransactionConditions", - propOrder = {"allowedPaymentBrand", "acquirerID", "allowedLoyaltyBrand", "forceEntryMode"}) public class TransactionConditions { /** The Allowed payment brand. */ - @XmlElement(name = "AllowedPaymentBrand") + @SerializedName("AllowedPaymentBrand") @Schema( description = "Card payment brands allowed by the Sale System for the payment transaction. --Rule: Restrict brand if data sent") protected List allowedPaymentBrand; /** The Acquirer id. */ - @XmlElement(name = "AcquirerID") + @SerializedName("AcquirerID") @Schema( description = "Identification of the Acquirer --Rule: Restrict to these Acquirer if present") protected List acquirerID; /** The Allowed loyalty brand. */ - @XmlElement(name = "AllowedLoyaltyBrand") + @SerializedName("AllowedLoyaltyBrand") @Schema( description = "Loyalty brands or programs allowed by the Sale System for the loyalty transaction. --Rule: Restrict brand if data sent") protected List allowedLoyaltyBrand; /** The Force entry mode. */ - @XmlElement(name = "ForceEntryMode") + @SerializedName("ForceEntryMode") @Schema( description = "Payment instrument entry mode requested by the Sale System. --Rule: Restrict entry mode if sent") protected List forceEntryMode; /** The Debit preferred flag. */ - @XmlElement(name = "DebitPreferredFlag") + @SerializedName("DebitPreferredFlag") @Schema( description = "The preferred type of payment is a debit transaction rather a credit transaction. --Rule: The preferred type of payment is a debit transaction rather a credit transaction.") protected Boolean debitPreferredFlag; /** The Loyalty handling. */ - @XmlElement(name = "LoyaltyHandling") + @SerializedName("LoyaltyHandling") @Schema(description = "Type of Loyalty processing requested by the Sale System.") protected LoyaltyHandlingType loyaltyHandling; /** The Customer language. */ - @XmlElement(name = "CustomerLanguage") + @SerializedName("CustomerLanguage") @Schema( description = "Language of the Customer --Rule: If the language is selected by the Sale System before the request to the POI.") protected String customerLanguage; /** The Force online flag. */ - @XmlElement(name = "ForceOnlineFlag") + @SerializedName("ForceOnlineFlag") @Schema( description = "Indicates if the Cashier requires POI forces online access to the Acquirer. --Rule: Go online if data sent") protected Boolean forceOnlineFlag; /** The Merchant category code. */ - @XmlElement(name = "MerchantCategoryCode") + @SerializedName("MerchantCategoryCode") @Schema( description = "The code which identifies the category of the transaction (MCC). --Rule: The payment implies a specific MCC.", diff --git a/src/main/java/com/adyen/model/nexo/TransactionIdentification.java b/src/main/java/com/adyen/model/nexo/TransactionIdentification.java index 23b241345..a114046aa 100644 --- a/src/main/java/com/adyen/model/nexo/TransactionIdentification.java +++ b/src/main/java/com/adyen/model/nexo/TransactionIdentification.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** @@ -25,17 +22,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "TransactionIdentification") public class TransactionIdentification { /** The Transaction id. */ - @XmlElement(name = "TransactionID", required = true) + @SerializedName("TransactionID") @Schema(description = "Unique identification of a transaction") protected String transactionID; /** The Time stamp. */ - @XmlElement(name = "TimeStamp", required = true) + @SerializedName("TimeStamp") @Schema( description = "Date and time of a transaction for the Sale System, the POI System or the Acquirer.") diff --git a/src/main/java/com/adyen/model/nexo/TransactionStatusRequest.java b/src/main/java/com/adyen/model/nexo/TransactionStatusRequest.java index b9d73bd5b..37c24a7e5 100644 --- a/src/main/java/com/adyen/model/nexo/TransactionStatusRequest.java +++ b/src/main/java/com/adyen/model/nexo/TransactionStatusRequest.java @@ -1,13 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the TransactionStatus Request messageType. -- Usage: It conveys @@ -31,29 +27,24 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "TransactionStatusRequest", - propOrder = {"messageReference", "documentQualifier"}) public class TransactionStatusRequest { /** The Message reference. */ - @XmlElement(name = "MessageReference") + @SerializedName("MessageReference") @Schema( description = "Identification of a previous POI transaction. --Rule: Present if it contains any data") protected MessageReference messageReference; /** The Document qualifier. */ - @XmlElement(name = "DocumentQualifier") + @SerializedName("DocumentQualifier") @Schema( description = "Qualification of the document to print to the Cashier or the Customer. --Rule: CustomerReceipt or CashierReceipt. Mandatory if ReceiptReprintFlag is True, otherwise absent.") - @XmlSchemaType(name = "string") protected List documentQualifier; /** The Receipt reprint flag. */ - @XmlElement(name = "ReceiptReprintFlag") + @SerializedName("ReceiptReprintFlag") @Schema(description = "Request to reprint the POI receipt(s).") protected Boolean receiptReprintFlag; diff --git a/src/main/java/com/adyen/model/nexo/TransactionStatusResponse.java b/src/main/java/com/adyen/model/nexo/TransactionStatusResponse.java index b17ccbf53..1c8812298 100644 --- a/src/main/java/com/adyen/model/nexo/TransactionStatusResponse.java +++ b/src/main/java/com/adyen/model/nexo/TransactionStatusResponse.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the TransactionStatus Response messageType. -- Usage: It conveys @@ -29,26 +26,22 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "TransactionStatusResponse", - propOrder = {"response", "messageReference", "repeatedMessageResponse"}) public class TransactionStatusResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Message reference. */ - @XmlElement(name = "MessageReference") + @SerializedName("MessageReference") @Schema( description = "Identification of a previous POI transaction. --Rule: if Response.Result is Success") protected MessageReference messageReference; /** The Repeated message response. */ - @XmlElement(name = "RepeatedMessageResponse") + @SerializedName("RepeatedMessageResponse") @Schema( description = "Content of the requested Message Response. --Rule: If Result is Success (process completed)") diff --git a/src/main/java/com/adyen/model/nexo/TransactionToPerform.java b/src/main/java/com/adyen/model/nexo/TransactionToPerform.java index d09a1699b..e20a68a19 100644 --- a/src/main/java/com/adyen/model/nexo/TransactionToPerform.java +++ b/src/main/java/com/adyen/model/nexo/TransactionToPerform.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Data related to the batch of transactions to perform. @@ -27,24 +24,20 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "TransactionToPerform", - propOrder = {"paymentRequest", "loyaltyRequest", "reversalRequest"}) public class TransactionToPerform { /** The Payment request. */ - @XmlElement(name = "PaymentRequest") + @SerializedName("PaymentRequest") @Schema(description = "Data related to the Payment transaction request.") protected PaymentRequest paymentRequest; /** The Loyalty request. */ - @XmlElement(name = "LoyaltyRequest") + @SerializedName("LoyaltyRequest") @Schema(description = "Data related to the Loyalty transaction request.") protected LoyaltyRequest loyaltyRequest; /** The Reversal request. */ - @XmlElement(name = "ReversalRequest") + @SerializedName("ReversalRequest") @Schema(description = "Data related to the Reveraal transaction request.") protected ReversalRequest reversalRequest; diff --git a/src/main/java/com/adyen/model/nexo/TransactionTotals.java b/src/main/java/com/adyen/model/nexo/TransactionTotals.java index bd7881691..956080043 100644 --- a/src/main/java/com/adyen/model/nexo/TransactionTotals.java +++ b/src/main/java/com/adyen/model/nexo/TransactionTotals.java @@ -1,12 +1,9 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Result of the Sale to POI Reconciliation processing. -- Usage: If Result is Success, @@ -43,102 +40,98 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "TransactionTotals", - propOrder = {"paymentTotals", "loyaltyTotals"}) public class TransactionTotals { /** The Payment totals. */ - @XmlElement(name = "PaymentTotals") + @SerializedName("PaymentTotals") @Schema( description = "Totals of the payment transaction during the reconciliation period. --Rule: If both TransactionCount and TransactionAmount are not equal to zero") protected List paymentTotals; /** The Loyalty totals. */ - @XmlElement(name = "LoyaltyTotals") + @SerializedName("LoyaltyTotals") @Schema( description = "Totals of the loyalty transaction during the reconciliation period. --Rule: If both TransactionCount and TransactionAmount are not equal to zero") protected List loyaltyTotals; /** The Payment instrument. */ - @XmlElement(name = "PaymentInstrumentType", required = true) + @SerializedName("PaymentInstrumentType") @Schema(description = "Type of payment instrument.") protected PaymentInstrumentType paymentInstrumentType; /** The Acquirer id. */ - @XmlElement(name = "AcquirerID") + @SerializedName("AcquirerID") @Schema(description = "Identification of the Acquirer --Rule: If available") protected String acquirerID; /** The Error condition. */ - @XmlElement(name = "ErrorCondition") + @SerializedName("ErrorCondition") @Schema( description = "Condition that has produced an error on the processing of a message request --Rule: if Response.Result is Partial, and the reconciliation with this Acquirer failed.") protected ErrorConditionType errorCondition; /** The Host reconciliation id. */ - @XmlElement(name = "HostReconciliationID") + @SerializedName("HostReconciliationID") @Schema( description = "Identifier of a reconciliation period with a payment or loyalty host. --Rule: If available") protected String hostReconciliationID; /** The Card brand. */ - @XmlElement(name = "CardBrand") + @SerializedName("CardBrand") @Schema( description = "Type of payment or loyalty card --Rule: If configured to present totals per card brand, and Response.Result is Success") protected String cardBrand; /** The Poiid. */ - @XmlElement(name = "POIID") + @SerializedName("POIID") @Schema( description = "Identification of a POI System or a POI Terminal for the Sale to POI protocol --Rule: If requested in the message request") protected String poiid; /** The Sale id. */ - @XmlElement(name = "SaleID") + @SerializedName("SaleID") @Schema( description = "Identification of a Sale System or a Sale Terminal for the Sale to POI protocol --Rule: If requested in the message request") protected String saleID; /** The Operator id. */ - @XmlElement(name = "OperatorID") + @SerializedName("OperatorID") @Schema( description = "Identification of the Cashier or Operator. --Rule: If requested in the message request") protected String operatorID; /** The Shift number. */ - @XmlElement(name = "ShiftNumber") + @SerializedName("ShiftNumber") @Schema(description = "Shift number. --Rule: If requested in the message request") protected String shiftNumber; /** The Totals group id. */ - @XmlElement(name = "TotalsGroupID") + @SerializedName("TotalsGroupID") @Schema( description = "Identification of a group of transaction on a POI Terminal, having the same Sale features. --Rule: If requested in the message request") protected String totalsGroupID; /** The Payment currency. */ - @XmlElement(name = "PaymentCurrency") + @SerializedName("PaymentCurrency") @Schema(description = "Currency of a monetary amount.") protected String paymentCurrency; /** The Loyalty unit. */ - @XmlElement(name = "LoyaltyUnit") + @SerializedName("LoyaltyUnit") @Schema(description = "Unit of a loyalty amount.") protected LoyaltyUnitType loyaltyUnit; /** The Loyalty currency. */ - @XmlElement(name = "LoyaltyCurrency") + @SerializedName("LoyaltyCurrency") @Schema(description = "Currency of a monetary amount. --Rule: If LoyaltyUnit is Monetary") protected String loyaltyCurrency; diff --git a/src/main/java/com/adyen/model/nexo/TransactionType.java b/src/main/java/com/adyen/model/nexo/TransactionType.java index af98ad51b..b83bb0045 100644 --- a/src/main/java/com/adyen/model/nexo/TransactionType.java +++ b/src/main/java/com/adyen/model/nexo/TransactionType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for TransactionType. @@ -37,39 +35,37 @@ * </simpleType> * */ -@XmlType(name = "TransactionType") -@XmlEnum public enum TransactionType { /** Payment Debit transactions (e.g. if PaymentType is "Normal") */ - @XmlEnumValue("Debit") + @SerializedName("Debit") @Schema(description = "Payment Debit transactions (e.g. if PaymentType is \"Normal\")") DEBIT("Debit"), /** Payment Credit transactions (e.g. if PaymentType is "Refund") */ - @XmlEnumValue("Credit") + @SerializedName("Credit") @Schema(description = "Payment Credit transactions (e.g. if PaymentType is \"Refund\")") CREDIT("Credit"), /** Payment Reversal Debit transactions */ - @XmlEnumValue("ReverseDebit") + @SerializedName("ReverseDebit") @Schema(description = "Payment Reversal Debit transactions") REVERSE_DEBIT("ReverseDebit"), /** Payment Reversal Credit transactions */ - @XmlEnumValue("ReverseCredit") + @SerializedName("ReverseCredit") @Schema(description = "Payment Reversal Credit transactions") REVERSE_CREDIT("ReverseCredit"), /** Outstanding OneTimeReservation transactions, i.e. between OneTimeReservation and Completion */ - @XmlEnumValue("OneTimeReservation") + @SerializedName("OneTimeReservation") @Schema( description = "Outstanding OneTimeReservation transactions, i.e. between OneTimeReservation and Completion") ONE_TIME_RESERVATION("OneTimeReservation"), /** OneTimeReservation transactions which have been completed by the Completion. */ - @XmlEnumValue("CompletedDeffered") + @SerializedName("CompletedDeffered") @Schema( description = "OneTimeReservation transactions which have been completed by the Completion.") COMPLETED_DEFFERED("CompletedDeffered"), @@ -78,7 +74,7 @@ public enum TransactionType { * Outstanding FirstReservation transactions, i.e. between FirstReservation and UpdateReservation * or Completion */ - @XmlEnumValue("FirstReservation") + @SerializedName("FirstReservation") @Schema( description = "Outstanding FirstReservation transactions, i.e. between FirstReservation and UpdateReservation or Completion") @@ -88,64 +84,64 @@ public enum TransactionType { * Outstanding UpdateReservation transactions, i.e. between UpdateReservation and * UpdateReservation or Completion */ - @XmlEnumValue("UpdateReservation") + @SerializedName("UpdateReservation") @Schema( description = "Outstanding UpdateReservation transactions, i.e. between UpdateReservation and UpdateReservation or Completion") UPDATE_RESERVATION("UpdateReservation"), /** Reservation transactions which have been completed by the Completion. */ - @XmlEnumValue("CompletedReservation") + @SerializedName("CompletedReservation") @Schema(description = "Reservation transactions which have been completed by the Completion.") COMPLETED_RESERVATION("CompletedReservation"), /** Cash Advance transactions. */ - @XmlEnumValue("CashAdvance") + @SerializedName("CashAdvance") @Schema(description = "Cash Advance transactions.") CASH_ADVANCE("CashAdvance"), /** Issuer instalment transactions. */ - @XmlEnumValue("IssuerInstalment") + @SerializedName("IssuerInstalment") @Schema(description = "Issuer instalment transactions.") ISSUER_INSTALMENT("IssuerInstalment"), /** ResultErrorCondition */ - @XmlEnumValue("Declined") + @SerializedName("Declined") @Schema(description = "ResultErrorCondition") DECLINED("Declined"), /** ResultErrorCondition */ - @XmlEnumValue("Failed") + @SerializedName("Failed") @Schema(description = "ResultErrorCondition") FAILED("Failed"), /** Loyalty Award Transaction */ - @XmlEnumValue("Award") + @SerializedName("Award") @Schema(description = "Loyalty Award Transaction") AWARD("Award"), /** Loyalty Reversal Award Transaction */ - @XmlEnumValue("ReverseAward") + @SerializedName("ReverseAward") @Schema(description = "Loyalty Reversal Award Transaction") REVERSE_AWARD("ReverseAward"), /** Loyalty Redemption Transaction */ - @XmlEnumValue("Redemption") + @SerializedName("Redemption") @Schema(description = "Loyalty Redemption Transaction") REDEMPTION("Redemption"), /** Loyalty Reversal Redemption Transaction */ - @XmlEnumValue("ReverseRedemption") + @SerializedName("ReverseRedemption") @Schema(description = "Loyalty Reversal Redemption Transaction") REVERSE_REDEMPTION("ReverseRedemption"), /** Loyalty Rebate Transaction */ - @XmlEnumValue("Rebate") + @SerializedName("Rebate") @Schema(description = "Loyalty Rebate Transaction") REBATE("Rebate"), /** Loyalty Reversal Rebate Transaction */ - @XmlEnumValue("ReverseRebate") + @SerializedName("ReverseRebate") @Schema(description = "Loyalty Reversal Rebate Transaction") REVERSE_REBATE("ReverseRebate"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/TransmitRequest.java b/src/main/java/com/adyen/model/nexo/TransmitRequest.java index 5ef5e2c6e..f2edd88a4 100644 --- a/src/main/java/com/adyen/model/nexo/TransmitRequest.java +++ b/src/main/java/com/adyen/model/nexo/TransmitRequest.java @@ -1,11 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Transmit Request messageType. -- Usage: It contains a messageType to @@ -30,29 +27,25 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "TransmitRequest", - propOrder = {"message"}) public class TransmitRequest { /** The Message. */ - @XmlElement(name = "Message", required = true) + @SerializedName("Message") @Schema(description = "Content of a transmitted message.") protected byte[] message; /** The Wait response flag. */ - @XmlElement(name = "WaitResponseFlag") + @SerializedName("WaitResponseFlag") @Schema(description = "Indicates that a response message has to be received.") protected Boolean waitResponseFlag; /** The Maximum transmit time. */ - @XmlElement(name = "MaximumTransmitTime", required = true) + @SerializedName("MaximumTransmitTime") @Schema(description = "Maximum time in seconds of transmission.") protected BigInteger maximumTransmitTime; /** The Destination address. */ - @XmlElement(name = "DestinationAddress", required = true) + @SerializedName("DestinationAddress") @Schema( description = "Transport address containing the IP address or the DNS (Domain Name Server) address, followed by the character ':' and") diff --git a/src/main/java/com/adyen/model/nexo/TransmitResponse.java b/src/main/java/com/adyen/model/nexo/TransmitResponse.java index bef971c79..13cfa5a5f 100644 --- a/src/main/java/com/adyen/model/nexo/TransmitResponse.java +++ b/src/main/java/com/adyen/model/nexo/TransmitResponse.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Content of the Transmit Response messageType. -- Usage: It conveys the response of @@ -27,19 +24,15 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "TransmitResponse", - propOrder = {"response", "message"}) public class TransmitResponse { /** The Response. */ - @XmlElement(name = "Response", required = true) + @SerializedName("Response") @Schema(description = "Result of a message request processing.") protected Response response; /** The Message. */ - @XmlElement(name = "Message") + @SerializedName("Message") @Schema(description = "Content of a transmitted message.") protected byte[] message; diff --git a/src/main/java/com/adyen/model/nexo/UTMCoordinates.java b/src/main/java/com/adyen/model/nexo/UTMCoordinates.java index da758c6e6..e1dab0d4c 100644 --- a/src/main/java/com/adyen/model/nexo/UTMCoordinates.java +++ b/src/main/java/com/adyen/model/nexo/UTMCoordinates.java @@ -1,10 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; /** * Definition: Location on the Earth specified by the Universal Transverse Mercator coordinate @@ -29,26 +26,22 @@ * </complexType> * */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType( - name = "UTMCoordinates", - propOrder = {"utmZone", "utmEastward", "utmNorthward"}) public class UTMCoordinates { /** The Utm zone. */ - @XmlElement(name = "UTMZone", required = true) + @SerializedName("UTMZone") @Schema( description = "UTM grid zone combination of the longitude zone (1 to 60) and the latitude band (C to X, excluding I and O).") protected String utmZone; /** The Utm eastward. */ - @XmlElement(name = "UTMEastward", required = true) + @SerializedName("UTMEastward") @Schema(description = "X-coordinate of the Universal Transverse Mercator coordinate system.") protected String utmEastward; /** The Utm northward. */ - @XmlElement(name = "UTMNorthward", required = true) + @SerializedName("UTMNorthward") @Schema(description = "Y-coordinate of the Universal Transverse Mercator coordinate system.") protected String utmNorthward; diff --git a/src/main/java/com/adyen/model/nexo/UnitOfMeasureType.java b/src/main/java/com/adyen/model/nexo/UnitOfMeasureType.java index 952bc34a2..f4e08b60c 100644 --- a/src/main/java/com/adyen/model/nexo/UnitOfMeasureType.java +++ b/src/main/java/com/adyen/model/nexo/UnitOfMeasureType.java @@ -1,10 +1,8 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for UnitOfMeasureType. @@ -37,102 +35,100 @@ * </simpleType> * */ -@XmlType(name = "UnitOfMeasureType") -@XmlEnum public enum UnitOfMeasureType { /** Case or Carton */ - @XmlEnumValue("Case") + @SerializedName("Case") @Schema(description = "Case or Carton") CASE("Case"), /** Foot */ - @XmlEnumValue("Foot") + @SerializedName("Foot") @Schema(description = "Foot") FOOT("Foot"), /** Gallon (UK) */ - @XmlEnumValue("UKGallon") + @SerializedName("UKGallon") @Schema(description = "Gallon (UK)") UK_GALLON("UKGallon"), /** Gallon (US) */ - @XmlEnumValue("USGallon") + @SerializedName("USGallon") @Schema(description = "Gallon (US)") US_GALLON("USGallon"), /** Gram */ - @XmlEnumValue("Gram") + @SerializedName("Gram") @Schema(description = "Gram") GRAM("Gram"), /** Inch */ - @XmlEnumValue("Inch") + @SerializedName("Inch") @Schema(description = "Inch") INCH("Inch"), /** Kilogram */ - @XmlEnumValue("Kilogram") + @SerializedName("Kilogram") @Schema(description = "Kilogram") KILOGRAM("Kilogram"), /** Pound */ - @XmlEnumValue("Pound") + @SerializedName("Pound") @Schema(description = "Pound") POUND("Pound"), /** Meter */ - @XmlEnumValue("Meter") + @SerializedName("Meter") @Schema(description = "Meter") METER("Meter"), /** Centimetre */ - @XmlEnumValue("Centimetre") + @SerializedName("Centimetre") @Schema(description = "Centimetre") CENTIMETRE("Centimetre"), /** Litre */ - @XmlEnumValue("Litre") + @SerializedName("Litre") @Schema(description = "Litre") LITRE("Litre"), /** Centilitre */ - @XmlEnumValue("Centilitre") + @SerializedName("Centilitre") @Schema(description = "Centilitre") CENTILITRE("Centilitre"), /** Ounce */ - @XmlEnumValue("Ounce") + @SerializedName("Ounce") @Schema(description = "Ounce") OUNCE("Ounce"), /** Quart */ - @XmlEnumValue("Quart") + @SerializedName("Quart") @Schema(description = "Quart") QUART("Quart"), /** Pint */ - @XmlEnumValue("Pint") + @SerializedName("Pint") @Schema(description = "Pint") PINT("Pint"), /** Mile */ - @XmlEnumValue("Mile") + @SerializedName("Mile") @Schema(description = "Mile") MILE("Mile"), /** Kilometre */ - @XmlEnumValue("Kilometre") + @SerializedName("Kilometre") @Schema(description = "Kilometre") KILOMETRE("Kilometre"), /** Yard */ - @XmlEnumValue("Yard") + @SerializedName("Yard") @Schema(description = "Yard") YARD("Yard"), /** Other unit than the previous one */ - @XmlEnumValue("Other") + @SerializedName("Other") @Schema(description = "Other unit than the previous one") OTHER("Other"); private final String value; diff --git a/src/main/java/com/adyen/model/nexo/VersionType.java b/src/main/java/com/adyen/model/nexo/VersionType.java index 65e92aac9..694d85354 100644 --- a/src/main/java/com/adyen/model/nexo/VersionType.java +++ b/src/main/java/com/adyen/model/nexo/VersionType.java @@ -1,9 +1,7 @@ package com.adyen.model.nexo; +import com.google.gson.annotations.SerializedName; import java.util.Arrays; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; /** * Java class for VersionType. @@ -23,32 +21,30 @@ * </simpleType> * */ -@XmlType(name = "VersionType") -@XmlEnum public enum VersionType { /** Version 0 */ - @XmlEnumValue("v0") + @SerializedName("v0") V_0("v0"), /** Version 1 */ - @XmlEnumValue("v1") + @SerializedName("v1") V_1("v1"), /** Version 2 */ - @XmlEnumValue("v2") + @SerializedName("v2") V_2("v2"), /** Version 3 */ - @XmlEnumValue("v3") + @SerializedName("v3") V_3("v3"), /** Version 4 */ - @XmlEnumValue("v4") + @SerializedName("v4") V_4("v4"), /** Version 5 */ - @XmlEnumValue("v5") + @SerializedName("v5") V_5("v5"); private final String value; diff --git a/src/main/java/com/adyen/terminal/serialization/AuthenticatedDataTypeAdapterFactory.java b/src/main/java/com/adyen/terminal/serialization/AuthenticatedDataTypeAdapterFactory.java new file mode 100644 index 000000000..99fe8a97f --- /dev/null +++ b/src/main/java/com/adyen/terminal/serialization/AuthenticatedDataTypeAdapterFactory.java @@ -0,0 +1,91 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2026 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +package com.adyen.terminal.serialization; + +import com.adyen.model.nexo.AuthenticatedData; +import com.adyen.model.nexo.KEK; +import com.adyen.model.nexo.KeyTransport; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +import java.io.IOException; + +/** + * Gson {@link TypeAdapterFactory} for {@link com.adyen.model.nexo.AuthenticatedData}. + * + *

Handles polymorphic deserialization of the {@code keyTransportOrKEK} list by inspecting each + * element's fields: items containing {@code KEKIdentifier} are deserialized as {@link + * com.adyen.model.nexo.KEK}, all others as {@link com.adyen.model.nexo.KeyTransport}. Serialization + * is delegated to Gson's default behavior. + */ +public class AuthenticatedDataTypeAdapterFactory implements TypeAdapterFactory { + + @Override + @SuppressWarnings("unchecked") + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthenticatedData.class.isAssignableFrom(type.getRawType())) { + return null; + } + + TypeAdapter delegate = + gson.getDelegateAdapter(this, TypeToken.get(AuthenticatedData.class)); + TypeAdapter jsonObjectAdapter = gson.getAdapter(JsonObject.class); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthenticatedData value) throws IOException { + delegate.write(out, value); + } + + @Override + public AuthenticatedData read(JsonReader in) throws IOException { + JsonObject jsonObject = jsonObjectAdapter.read(in); + + JsonArray keyTransportOrKEKArray = null; + if (jsonObject.has("keyTransportOrKEK")) { + keyTransportOrKEKArray = jsonObject.getAsJsonArray("keyTransportOrKEK"); + jsonObject.remove("keyTransportOrKEK"); + } + AuthenticatedData result = delegate.fromJsonTree(jsonObject); + if (keyTransportOrKEKArray != null) { + for (JsonElement element : keyTransportOrKEKArray) { + JsonObject item = element.getAsJsonObject(); + if (item.has("KEKIdentifier")) { + result.getKeyTransportOrKEK().add(gson.fromJson(item, KEK.class)); + } else { + result.getKeyTransportOrKEK().add(gson.fromJson(item, KeyTransport.class)); + } + } + } + return result; + } + }; + } +} diff --git a/src/main/java/com/adyen/terminal/serialization/TerminalAPIGsonBuilder.java b/src/main/java/com/adyen/terminal/serialization/TerminalAPIGsonBuilder.java index d09e77bcf..e460558b4 100644 --- a/src/main/java/com/adyen/terminal/serialization/TerminalAPIGsonBuilder.java +++ b/src/main/java/com/adyen/terminal/serialization/TerminalAPIGsonBuilder.java @@ -21,41 +21,26 @@ package com.adyen.terminal.serialization; -import com.google.gson.FieldNamingStrategy; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; + import javax.xml.datatype.XMLGregorianCalendar; public final class TerminalAPIGsonBuilder { - private TerminalAPIGsonBuilder() {} + private TerminalAPIGsonBuilder() { + // not meant to be initialized + } - public static Gson create() { - GsonBuilder gsonBuilder = new GsonBuilder(); - FieldNamingStrategy fieldNamingStrategy = - field -> { - if (field.getAnnotation(XmlElement.class) != null) { - XmlElement xmlElement = field.getAnnotation(XmlElement.class); - return xmlElement.name(); - } else if (field.getAnnotation(XmlAttribute.class) != null) { - XmlAttribute xmlAttribute = field.getAnnotation(XmlAttribute.class); - return xmlAttribute.name(); - } else if (field.getAnnotation(XmlRootElement.class) != null) { - XmlRootElement xmlRootElement = field.getAnnotation(XmlRootElement.class); - return xmlRootElement.name(); - } - return field.getName(); - }; - gsonBuilder.setFieldNamingStrategy(fieldNamingStrategy); - gsonBuilder.registerTypeHierarchyAdapter(byte[].class, new ByteArrayToBase64TypeAdapter()); - gsonBuilder.registerTypeHierarchyAdapter( - XMLGregorianCalendar.class, new XMLGregorianCalendarTypeAdapter()); - gsonBuilder.registerTypeAdapterFactory(new XMLEnumAdapterFactory()); - gsonBuilder.disableHtmlEscaping(); + public static Gson create() { + GsonBuilder gsonBuilder = new GsonBuilder(); + gsonBuilder.registerTypeHierarchyAdapter(byte[].class, new ByteArrayToBase64TypeAdapter()); + gsonBuilder.registerTypeHierarchyAdapter( + XMLGregorianCalendar.class, new XMLGregorianCalendarTypeAdapter()); + gsonBuilder.registerTypeAdapterFactory(new XMLEnumAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new AuthenticatedDataTypeAdapterFactory()); + gsonBuilder.disableHtmlEscaping(); - return gsonBuilder.create(); - } + return gsonBuilder.create(); + } } diff --git a/src/main/java/com/adyen/terminal/serialization/XMLEnumTypeAdapter.java b/src/main/java/com/adyen/terminal/serialization/XMLEnumTypeAdapter.java index 5645a6ace..ce11f0a21 100644 --- a/src/main/java/com/adyen/terminal/serialization/XMLEnumTypeAdapter.java +++ b/src/main/java/com/adyen/terminal/serialization/XMLEnumTypeAdapter.java @@ -22,15 +22,15 @@ package com.adyen.terminal.serialization; import com.google.gson.TypeAdapter; +import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonToken; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.lang.reflect.Method; -import javax.xml.bind.annotation.XmlEnumValue; /** - * Serializes and deserializes enums that use {@link XmlEnumValue} annotations for GSON. + * Serializes and deserializes enums that use annotations for GSON. * * @param The enum type. */ @@ -48,7 +48,7 @@ public XMLEnumTypeAdapter(Class clazz) { } /** - * Writes the enum value to JSON, using the {@link XmlEnumValue} if present. + * Writes the enum value to JSON, using the {@link SerializedName} if present. * * @param out the GSON {@link JsonWriter} to write to. * @param value the enum constant to write to JSON. @@ -62,11 +62,11 @@ public void write(JsonWriter out, T value) throws IOException { Enum enumValue = (Enum) value; try { - if (enumValue.getClass().getField(enumValue.name()).getAnnotation(XmlEnumValue.class) + if (enumValue.getClass().getField(enumValue.name()).getAnnotation(SerializedName.class) != null) { - XmlEnumValue xmlEnumValue = - enumValue.getClass().getField(enumValue.name()).getAnnotation(XmlEnumValue.class); - out.value(xmlEnumValue.value()); + SerializedName serializedName = + enumValue.getClass().getField(enumValue.name()).getAnnotation(SerializedName.class); + out.value(serializedName.value()); } else { out.value(enumValue.name()); } diff --git a/src/test/java/com/adyen/model/nexo/AbortRequestTest.java b/src/test/java/com/adyen/model/nexo/AbortRequestTest.java index 6e4323997..db1074b67 100644 --- a/src/test/java/com/adyen/model/nexo/AbortRequestTest.java +++ b/src/test/java/com/adyen/model/nexo/AbortRequestTest.java @@ -1,6 +1,8 @@ package com.adyen.model.nexo; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; import com.adyen.terminal.serialization.TerminalAPIGsonBuilder; import com.google.gson.Gson; @@ -66,4 +68,48 @@ public void testShouldSerializeAndDeserializeFromMockFile() throws IOException { deserializedAbortRequest.getDisplayOutput().getInfoQualify(), roundTripAbortRequest.getDisplayOutput().getInfoQualify()); } + + @Test + public void testDeserializationWithMissingRequiredFields() throws IOException { + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + // JSON missing MessageReference (required field) + String jsonMissingMessageReference = + NexoTestUtils.readResource( + "mocks/terminal-api/abort-request-missing-message-reference.json"); + + AbortRequest result1 = + terminalApiGson.fromJson(jsonMissingMessageReference, AbortRequest.class); + assertNotNull(result1, "Deserialization should succeed even with missing required field"); + assertNull( + result1.getMessageReference(), "MessageReference should be null when missing from JSON"); + assertNotNull(result1.getAbortReason(), "AbortReason should be present"); + + // JSON missing AbortReason (required field) + String jsonMissingAbortReason = + NexoTestUtils.readResource("mocks/terminal-api/abort-request-missing-abort-reason.json"); + + AbortRequest result2 = terminalApiGson.fromJson(jsonMissingAbortReason, AbortRequest.class); + assertNotNull(result2, "Deserialization should succeed even with missing required field"); + assertNotNull(result2.getMessageReference(), "MessageReference should be present"); + assertNull(result2.getAbortReason(), "AbortReason should be null when missing from JSON"); + } + + @Test + public void testSerializationWithNullRequiredFields() { + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + AbortRequest request = new AbortRequest(); + request.setAbortReason("cancelled-by-shopper"); + // Not setting MessageReference (required field) + + String serialized = terminalApiGson.toJson(request); + assertNotNull(serialized, "Serialization should succeed even with null required field"); + + // Verify it can be deserialized back + AbortRequest deserialized = terminalApiGson.fromJson(serialized, AbortRequest.class); + assertNotNull(deserialized); + assertNull( + deserialized.getMessageReference(), "MessageReference should remain null after round-trip"); + } } diff --git a/src/test/java/com/adyen/model/nexo/AuthenticatedDataTest.java b/src/test/java/com/adyen/model/nexo/AuthenticatedDataTest.java new file mode 100644 index 000000000..85c3f15a1 --- /dev/null +++ b/src/test/java/com/adyen/model/nexo/AuthenticatedDataTest.java @@ -0,0 +1,158 @@ +package com.adyen.model.nexo; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import com.adyen.terminal.serialization.TerminalAPIGsonBuilder; +import com.google.gson.Gson; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import java.io.IOException; +import org.junit.jupiter.api.Test; + +public class AuthenticatedDataTest { + + @Test + public void testShouldSerializeAndDeserializeKeyTransportFromMockFile() throws IOException { + String mockJson = + NexoTestUtils.readResource("mocks/terminal-api/authenticated-data-key-transport.json"); + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + AuthenticatedData deserializedAuthenticatedData = + terminalApiGson.fromJson(mockJson, AuthenticatedData.class); + assertEquals(1, deserializedAuthenticatedData.getKeyTransportOrKEK().size()); + assertInstanceOf( + KeyTransport.class, + deserializedAuthenticatedData.getKeyTransportOrKEK().get(0), + "Should deserialize as KeyTransport"); + + KeyTransport keyTransport = + (KeyTransport) deserializedAuthenticatedData.getKeyTransportOrKEK().get(0); + assertNotNull(keyTransport.getRecipientIdentifier()); + assertEquals(AlgorithmType.RSA_ENCRYPTION, keyTransport.getKeyEncryptionAlgorithm().getAlgorithm()); + + String serializedJson = terminalApiGson.toJson(deserializedAuthenticatedData); + JsonObject expectedJsonObject = JsonParser.parseString(mockJson).getAsJsonObject(); + JsonObject serializedJsonObject = JsonParser.parseString(serializedJson).getAsJsonObject(); + assertEquals(expectedJsonObject, serializedJsonObject); + } + + @Test + public void testShouldSerializeAndDeserializeKekFromMockFile() throws IOException { + String mockJson = NexoTestUtils.readResource("mocks/terminal-api/authenticated-data-kek.json"); + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + AuthenticatedData deserializedAuthenticatedData = + terminalApiGson.fromJson(mockJson, AuthenticatedData.class); + assertEquals(1, deserializedAuthenticatedData.getKeyTransportOrKEK().size()); + assertInstanceOf( + KEK.class, + deserializedAuthenticatedData.getKeyTransportOrKEK().get(0), + "Should deserialize as KEK"); + + KEK kek = (KEK) deserializedAuthenticatedData.getKeyTransportOrKEK().get(0); + assertNotNull(kek.getKEKIdentifier()); + assertEquals("kid-1", kek.getKEKIdentifier().getKeyIdentifier()); + assertEquals(AlgorithmType.DES_EDE_3_CBC, kek.getKeyEncryptionAlgorithm().getAlgorithm()); + + String serializedJson = terminalApiGson.toJson(deserializedAuthenticatedData); + JsonObject expectedJsonObject = JsonParser.parseString(mockJson).getAsJsonObject(); + JsonObject serializedJsonObject = JsonParser.parseString(serializedJson).getAsJsonObject(); + assertEquals(expectedJsonObject, serializedJsonObject); + } + + @Test + public void testDeserializationWithMissingRequiredFields() throws IOException { + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + // JSON missing MACAlgorithm (required field) + String jsonMissingMacAlgorithm = + NexoTestUtils.readResource( + "mocks/terminal-api/authenticated-data-missing-mac-algorithm.json"); + AuthenticatedData result1 = + terminalApiGson.fromJson(jsonMissingMacAlgorithm, AuthenticatedData.class); + assertNotNull(result1, "Deserialization should succeed even with missing required field"); + assertNull(result1.getMACAlgorithm(), "MACAlgorithm should be null when missing from JSON"); + assertNotNull(result1.getEncapsulatedContent(), "EncapsulatedContent should be present"); + assertNotNull(result1.getMAC(), "MAC should be present"); + + // JSON missing EncapsulatedContent (required field) + String jsonMissingEncapsulatedContent = + NexoTestUtils.readResource( + "mocks/terminal-api/authenticated-data-missing-encapsulated-content.json"); + AuthenticatedData result2 = + terminalApiGson.fromJson(jsonMissingEncapsulatedContent, AuthenticatedData.class); + assertNotNull(result2, "Deserialization should succeed even with missing required field"); + assertNotNull(result2.getMACAlgorithm(), "MACAlgorithm should be present"); + assertNull( + result2.getEncapsulatedContent(), + "EncapsulatedContent should be null when missing from JSON"); + assertNotNull(result2.getMAC(), "MAC should be present"); + + // JSON missing MAC (required field) + String jsonMissingMac = + NexoTestUtils.readResource("mocks/terminal-api/authenticated-data-missing-mac.json"); + AuthenticatedData result3 = terminalApiGson.fromJson(jsonMissingMac, AuthenticatedData.class); + assertNotNull(result3, "Deserialization should succeed even with missing required field"); + assertNotNull(result3.getMACAlgorithm(), "MACAlgorithm should be present"); + assertNotNull(result3.getEncapsulatedContent(), "EncapsulatedContent should be present"); + assertNull(result3.getMAC(), "MAC should be null when missing from JSON"); + } + + @Test + public void testSerializationWithNullRequiredFields() { + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + AuthenticatedData authenticatedData = new AuthenticatedData(); + authenticatedData.setVersion(VersionType.V_0); + // Not setting MACAlgorithm, EncapsulatedContent, MAC (required fields) + + String serialized = terminalApiGson.toJson(authenticatedData); + assertNotNull(serialized, "Serialization should succeed even with null required fields"); + + AuthenticatedData deserialized = terminalApiGson.fromJson(serialized, AuthenticatedData.class); + assertNotNull(deserialized); + assertNull(deserialized.getMACAlgorithm(), "MACAlgorithm should remain null after round-trip"); + assertNull( + deserialized.getEncapsulatedContent(), + "EncapsulatedContent should remain null after round-trip"); + assertNull(deserialized.getMAC(), "MAC should remain null after round-trip"); + } + + @Test + public void testDeserializationIsCaseSensitive() throws IOException { + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + String wrongCaseJson = + NexoTestUtils.readResource("mocks/terminal-api/authenticated-data-wrong-case.json"); + + AuthenticatedData result = terminalApiGson.fromJson(wrongCaseJson, AuthenticatedData.class); + assertNotNull(result, "Deserialization should succeed but fields with wrong casing should not be mapped"); + assertNull(result.getMACAlgorithm(), "MACAlgorithm should be null when JSON key has wrong casing"); + assertNull(result.getEncapsulatedContent(), "EncapsulatedContent should be null when JSON key has wrong casing"); + assertNull(result.getMAC(), "MAC should be null when JSON key has wrong casing"); + assertTrue(result.getKeyTransportOrKEK().isEmpty(), "KeyTransportOrKEK should be null when JSON key has wrong casing"); + assertEquals(VersionType.V_0, result.getVersion(), "Version should fall back to default v0 when JSON key has wrong casing"); + } + + @Test + public void testDeserializationWithMissingNonRequiredField() throws IOException { + String mockJson = + NexoTestUtils.readResource("mocks/terminal-api/authenticated-data-missing-version.json"); + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + AuthenticatedData deserializedAuthenticatedData = + terminalApiGson.fromJson(mockJson, AuthenticatedData.class); + assertNotNull(deserializedAuthenticatedData); + assertEquals(VersionType.V_0, deserializedAuthenticatedData.getVersion()); + assertEquals(1, deserializedAuthenticatedData.getKeyTransportOrKEK().size()); + + String serializedJson = terminalApiGson.toJson(deserializedAuthenticatedData); + JsonObject expectedJsonObject = JsonParser.parseString(mockJson).getAsJsonObject(); + JsonObject serializedJsonObject = JsonParser.parseString(serializedJson).getAsJsonObject(); + assertEquals(expectedJsonObject, serializedJsonObject); + } +} diff --git a/src/test/java/com/adyen/model/nexo/EventNotificationTest.java b/src/test/java/com/adyen/model/nexo/EventNotificationTest.java new file mode 100644 index 000000000..bc39ff4ff --- /dev/null +++ b/src/test/java/com/adyen/model/nexo/EventNotificationTest.java @@ -0,0 +1,110 @@ +package com.adyen.model.nexo; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import com.adyen.terminal.serialization.TerminalAPIGsonBuilder; +import com.google.gson.Gson; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import java.io.IOException; +import org.junit.jupiter.api.Test; + +public class EventNotificationTest { + + @Test + public void testShouldSerializeAndDeserializeFromMockFile() throws IOException { + String mockJson = NexoTestUtils.readResource("mocks/terminal-api/event-notification.json"); + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + EventNotification deserializedEventNotification = + terminalApiGson.fromJson(mockJson, EventNotification.class); + assertEquals("2026-03-27T10:30:00Z", deserializedEventNotification.getTimeStamp().toString()); + assertEquals( + EventToNotifyType.BEGIN_MAINTENANCE, deserializedEventNotification.getEventToNotify()); + assertEquals("Maintenance window started", deserializedEventNotification.getEventDetails()); + assertTrue(deserializedEventNotification.isMaintenanceRequiredFlag()); + assertEquals("en", deserializedEventNotification.getCustomerLanguage()); + assertNotNull(deserializedEventNotification.getDisplayOutput()); + assertEquals( + DeviceType.CUSTOMER_DISPLAY, deserializedEventNotification.getDisplayOutput().getDevice()); + assertEquals( + InfoQualifyType.DISPLAY, deserializedEventNotification.getDisplayOutput().getInfoQualify()); + assertEquals( + "System maintenance in progress", + deserializedEventNotification + .getDisplayOutput() + .getOutputContent() + .getOutputText() + .get(0) + .getText()); + + String serializedJson = terminalApiGson.toJson(deserializedEventNotification); + + JsonObject expectedJsonObject = JsonParser.parseString(mockJson).getAsJsonObject(); + JsonObject serializedJsonObject = JsonParser.parseString(serializedJson).getAsJsonObject(); + assertEquals(expectedJsonObject, serializedJsonObject); + + EventNotification roundTripEventNotification = + terminalApiGson.fromJson(serializedJson, EventNotification.class); + assertEquals( + deserializedEventNotification.getTimeStamp().toString(), + roundTripEventNotification.getTimeStamp().toString()); + assertEquals( + deserializedEventNotification.getEventToNotify(), + roundTripEventNotification.getEventToNotify()); + assertEquals( + deserializedEventNotification.getEventDetails(), + roundTripEventNotification.getEventDetails()); + assertEquals( + deserializedEventNotification.isMaintenanceRequiredFlag(), + roundTripEventNotification.isMaintenanceRequiredFlag()); + } + + @Test + public void testDeserializationWithMissingRequiredFields() throws IOException { + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + // JSON missing TimeStamp (required field) + String jsonMissingTimeStamp = + NexoTestUtils.readResource("mocks/terminal-api/event-notification-missing-timestamp.json"); + + EventNotification result1 = + terminalApiGson.fromJson(jsonMissingTimeStamp, EventNotification.class); + assertNotNull(result1, "Deserialization should succeed even with missing required field"); + assertNull(result1.getTimeStamp(), "TimeStamp should be null when missing from JSON"); + assertNotNull(result1.getEventToNotify(), "EventToNotify should be present"); + + // JSON missing EventToNotify (required field) + String jsonMissingEventToNotify = + NexoTestUtils.readResource( + "mocks/terminal-api/event-notification-missing-event-to-notify.json"); + + EventNotification result2 = + terminalApiGson.fromJson(jsonMissingEventToNotify, EventNotification.class); + assertNotNull(result2, "Deserialization should succeed even with missing required field"); + assertNotNull(result2.getTimeStamp(), "TimeStamp should be present"); + assertNull(result2.getEventToNotify(), "EventToNotify should be null when missing from JSON"); + } + + @Test + public void testSerializationWithNullRequiredFields() { + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + EventNotification notification = new EventNotification(); + notification.setEventDetails("Test event"); + // Not setting TimeStamp and EventToNotify (required fields) + + String serialized = terminalApiGson.toJson(notification); + assertNotNull(serialized, "Serialization should succeed even with null required fields"); + + // Verify it can be deserialized back + EventNotification deserialized = terminalApiGson.fromJson(serialized, EventNotification.class); + assertNotNull(deserialized); + assertNull(deserialized.getTimeStamp(), "TimeStamp should remain null after round-trip"); + assertNull( + deserialized.getEventToNotify(), "EventToNotify should remain null after round-trip"); + } +} diff --git a/src/test/java/com/adyen/model/nexo/SaleTerminalDataTest.java b/src/test/java/com/adyen/model/nexo/SaleTerminalDataTest.java new file mode 100644 index 000000000..c22338cef --- /dev/null +++ b/src/test/java/com/adyen/model/nexo/SaleTerminalDataTest.java @@ -0,0 +1,55 @@ +package com.adyen.model.nexo; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; + +import com.adyen.terminal.serialization.TerminalAPIGsonBuilder; +import com.google.gson.Gson; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import java.io.IOException; +import org.junit.jupiter.api.Test; + +public class SaleTerminalDataTest { + + @Test + public void testShouldSerializeAndDeserializeListField() throws IOException { + String mockJson = NexoTestUtils.readResource("mocks/terminal-api/sale-terminal-data.json"); + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + SaleTerminalData deserialized = terminalApiGson.fromJson(mockJson, SaleTerminalData.class); + assertNotNull(deserialized.getSaleCapabilities()); + assertEquals(3, deserialized.getSaleCapabilities().size()); + assertEquals(SaleCapabilitiesType.CASHIER_STATUS, deserialized.getSaleCapabilities().get(0)); + assertEquals(SaleCapabilitiesType.CASHIER_DISPLAY, deserialized.getSaleCapabilities().get(1)); + assertEquals(SaleCapabilitiesType.CUSTOMER_DISPLAY, deserialized.getSaleCapabilities().get(2)); + assertNotNull(deserialized.getSaleProfile()); + assertEquals(TerminalEnvironmentType.ATTENDED, deserialized.getTerminalEnvironment()); + assertEquals("group-1", deserialized.getTotalsGroupID()); + + String serializedJson = terminalApiGson.toJson(deserialized); + JsonObject expectedJsonObject = JsonParser.parseString(mockJson).getAsJsonObject(); + JsonObject serializedJsonObject = JsonParser.parseString(serializedJson).getAsJsonObject(); + assertEquals(expectedJsonObject, serializedJsonObject); + } + + @Test + public void testShouldSerializeAndDeserializeEmptyList() throws IOException { + String mockJson = + NexoTestUtils.readResource("mocks/terminal-api/sale-terminal-data-empty-capabilities.json"); + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + SaleTerminalData deserialized = terminalApiGson.fromJson(mockJson, SaleTerminalData.class); + assertNotNull(deserialized.getSaleCapabilities()); + assertEquals(0, deserialized.getSaleCapabilities().size()); + assertEquals(TerminalEnvironmentType.ATTENDED, deserialized.getTerminalEnvironment()); + assertNull(deserialized.getSaleProfile()); + assertNull(deserialized.getTotalsGroupID()); + + String serializedJson = terminalApiGson.toJson(deserialized); + JsonObject expectedJsonObject = JsonParser.parseString(mockJson).getAsJsonObject(); + JsonObject serializedJsonObject = JsonParser.parseString(serializedJson).getAsJsonObject(); + assertEquals(expectedJsonObject, serializedJsonObject); + } +} diff --git a/src/test/java/com/adyen/model/nexo/SaleToPOIResponseTest.java b/src/test/java/com/adyen/model/nexo/SaleToPOIResponseTest.java new file mode 100644 index 000000000..33dd0849d --- /dev/null +++ b/src/test/java/com/adyen/model/nexo/SaleToPOIResponseTest.java @@ -0,0 +1,130 @@ +package com.adyen.model.nexo; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; + +import com.adyen.terminal.serialization.TerminalAPIGsonBuilder; +import com.google.gson.Gson; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import java.io.IOException; +import org.junit.jupiter.api.Test; + +public class SaleToPOIResponseTest { + + @Test + public void testShouldDeserializeWithDiagnosisResponse() throws IOException { + String mockJson = + NexoTestUtils.readResource("mocks/terminal-api/sale-to-poi-response-diagnosis.json"); + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + SaleToPOIResponse deserialized = terminalApiGson.fromJson(mockJson, SaleToPOIResponse.class); + assertNotNull(deserialized.getMessageHeader()); + assertEquals("POSSystemID12345", deserialized.getMessageHeader().getSaleID()); + assertEquals( + MessageCategoryType.DIAGNOSIS, deserialized.getMessageHeader().getMessageCategory()); + assertEquals(MessageType.RESPONSE, deserialized.getMessageHeader().getMessageType()); + assertNotNull(deserialized.getDiagnosisResponse()); + assertEquals(ResultType.SUCCESS, deserialized.getDiagnosisResponse().getResponse().getResult()); + assertEquals(2, deserialized.getDiagnosisResponse().getLoggedSaleID().size()); + assertEquals("sale-1", deserialized.getDiagnosisResponse().getLoggedSaleID().get(0)); + assertNotNull(deserialized.getDiagnosisResponse().getPOIStatus()); + assertNull(deserialized.getPaymentResponse()); + assertNull(deserialized.getDisplayResponse()); + assertNull(deserialized.getSecurityTrailer()); + + String serializedJson = terminalApiGson.toJson(deserialized); + JsonObject expectedJsonObject = JsonParser.parseString(mockJson).getAsJsonObject(); + JsonObject serializedJsonObject = JsonParser.parseString(serializedJson).getAsJsonObject(); + assertEquals(expectedJsonObject, serializedJsonObject); + } + + @Test + public void testShouldDeserializeWithDisplayResponse() throws IOException { + String mockJson = + NexoTestUtils.readResource("mocks/terminal-api/sale-to-poi-response-display.json"); + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + SaleToPOIResponse deserialized = terminalApiGson.fromJson(mockJson, SaleToPOIResponse.class); + assertNotNull(deserialized.getMessageHeader()); + assertEquals(MessageCategoryType.DISPLAY, deserialized.getMessageHeader().getMessageCategory()); + assertNotNull(deserialized.getDisplayResponse()); + assertEquals(1, deserialized.getDisplayResponse().getOutputResult().size()); + assertEquals( + DeviceType.CASHIER_DISPLAY, + deserialized.getDisplayResponse().getOutputResult().get(0).getDevice()); + assertEquals( + ResultType.SUCCESS, + deserialized.getDisplayResponse().getOutputResult().get(0).getResponse().getResult()); + assertNull(deserialized.getDiagnosisResponse()); + assertNull(deserialized.getPaymentResponse()); + + String serializedJson = terminalApiGson.toJson(deserialized); + JsonObject expectedJsonObject = JsonParser.parseString(mockJson).getAsJsonObject(); + JsonObject serializedJsonObject = JsonParser.parseString(serializedJson).getAsJsonObject(); + assertEquals(expectedJsonObject, serializedJsonObject); + } + + @Test + public void testShouldDeserializeWithTransactionStatusResponse() throws IOException { + String mockJson = + NexoTestUtils.readResource( + "mocks/terminal-api/sale-to-poi-response-transaction-status.json"); + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + SaleToPOIResponse deserialized = terminalApiGson.fromJson(mockJson, SaleToPOIResponse.class); + assertNotNull(deserialized.getMessageHeader()); + assertEquals( + MessageCategoryType.TRANSACTION_STATUS, + deserialized.getMessageHeader().getMessageCategory()); + assertNotNull(deserialized.getTransactionStatusResponse()); + assertEquals( + ResultType.SUCCESS, deserialized.getTransactionStatusResponse().getResponse().getResult()); + assertNotNull(deserialized.getTransactionStatusResponse().getMessageReference()); + assertEquals( + MessageCategoryType.PAYMENT, + deserialized.getTransactionStatusResponse().getMessageReference().getMessageCategory()); + assertNull(deserialized.getDiagnosisResponse()); + assertNull(deserialized.getPaymentResponse()); + + String serializedJson = terminalApiGson.toJson(deserialized); + JsonObject expectedJsonObject = JsonParser.parseString(mockJson).getAsJsonObject(); + JsonObject serializedJsonObject = JsonParser.parseString(serializedJson).getAsJsonObject(); + assertEquals(expectedJsonObject, serializedJsonObject); + } + + @Test + public void testDeserializationWithMissingRequiredField() throws IOException { + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + // JSON missing MessageHeader (required field) + String jsonMissingHeader = + NexoTestUtils.readResource( + "mocks/terminal-api/sale-to-poi-response-missing-message-header.json"); + SaleToPOIResponse result = terminalApiGson.fromJson(jsonMissingHeader, SaleToPOIResponse.class); + assertNotNull(result, "Deserialization should succeed even with missing required field"); + assertNull(result.getMessageHeader(), "MessageHeader should be null when missing from JSON"); + assertNotNull(result.getDiagnosisResponse(), "DiagnosisResponse should be present"); + } + + @Test + public void testSerializationWithNullRequiredField() { + Gson terminalApiGson = TerminalAPIGsonBuilder.create(); + + SaleToPOIResponse response = new SaleToPOIResponse(); + response.setDiagnosisResponse(new DiagnosisResponse()); + // Not setting MessageHeader (required field) + + String serialized = terminalApiGson.toJson(response); + assertNotNull(serialized, "Serialization should succeed even with null required field"); + + SaleToPOIResponse deserialized = terminalApiGson.fromJson(serialized, SaleToPOIResponse.class); + assertNotNull(deserialized); + assertNull( + deserialized.getMessageHeader(), "MessageHeader should remain null after round-trip"); + assertNotNull( + deserialized.getDiagnosisResponse(), + "DiagnosisResponse should remain present after round-trip"); + } +} diff --git a/src/test/resources/mocks/terminal-api/abort-request-missing-abort-reason.json b/src/test/resources/mocks/terminal-api/abort-request-missing-abort-reason.json new file mode 100644 index 000000000..8a8181e84 --- /dev/null +++ b/src/test/resources/mocks/terminal-api/abort-request-missing-abort-reason.json @@ -0,0 +1,8 @@ +{ + "MessageReference": { + "MessageCategory": "Payment", + "ServiceID": "service-id", + "SaleID": "sale-id", + "POIID": "poi-id" + } +} diff --git a/src/test/resources/mocks/terminal-api/abort-request-missing-message-reference.json b/src/test/resources/mocks/terminal-api/abort-request-missing-message-reference.json new file mode 100644 index 000000000..18c0f170c --- /dev/null +++ b/src/test/resources/mocks/terminal-api/abort-request-missing-message-reference.json @@ -0,0 +1,7 @@ +{ + "AbortReason": "cancelled-by-shopper", + "DisplayOutput": { + "Device": "CustomerDisplay", + "InfoQualify": "Error" + } +} diff --git a/src/test/resources/mocks/terminal-api/authenticated-data-kek.json b/src/test/resources/mocks/terminal-api/authenticated-data-kek.json new file mode 100644 index 000000000..fe75fb71a --- /dev/null +++ b/src/test/resources/mocks/terminal-api/authenticated-data-kek.json @@ -0,0 +1,25 @@ +{ + "keyTransportOrKEK": [ + { + "KEKIdentifier": { + "KeyIdentifier": "kid-1", + "KeyVersion": "kv1", + "DerivationIdentifier": "ZGVyaXZhdGlvbg==" + }, + "KeyEncryptionAlgorithm": { + "Algorithm": "des-ede3-cbc" + }, + "EncryptedKey": "ZW5jcnlwdGVkLWtleQ==", + "Version": "v4" + } + ], + "MACAlgorithm": { + "Algorithm": "id-sha256" + }, + "EncapsulatedContent": { + "Content": "cGF5bG9hZA==", + "ContentType": "id-data" + }, + "Version": "v0", + "MAC": "bWFjLXZhbHVl" +} diff --git a/src/test/resources/mocks/terminal-api/authenticated-data-key-transport.json b/src/test/resources/mocks/terminal-api/authenticated-data-key-transport.json new file mode 100644 index 000000000..8ab201a66 --- /dev/null +++ b/src/test/resources/mocks/terminal-api/authenticated-data-key-transport.json @@ -0,0 +1,28 @@ +{ + "keyTransportOrKEK": [ + { + "RecipientIdentifier": { + "IssuerAndSerialNumber": { + "Issuer": { + "RelativeDistinguishedName": [] + }, + "SerialNumber": 123 + } + }, + "KeyEncryptionAlgorithm": { + "Algorithm": "rsaEncryption" + }, + "EncryptedKey": "ZW5jcnlwdGVkLWtleQ==", + "Version": "v0" + } + ], + "MACAlgorithm": { + "Algorithm": "id-sha256" + }, + "EncapsulatedContent": { + "Content": "cGF5bG9hZA==", + "ContentType": "id-data" + }, + "Version": "v0", + "MAC": "bWFjLXZhbHVl" +} diff --git a/src/test/resources/mocks/terminal-api/authenticated-data-missing-encapsulated-content.json b/src/test/resources/mocks/terminal-api/authenticated-data-missing-encapsulated-content.json new file mode 100644 index 000000000..2cb488d2b --- /dev/null +++ b/src/test/resources/mocks/terminal-api/authenticated-data-missing-encapsulated-content.json @@ -0,0 +1,18 @@ +{ + "keyTransportOrKEK": [ + { + "KEKIdentifier": { + "KeyIdentifier": "kid-1", + "KeyVersion": "kv1" + }, + "KeyEncryptionAlgorithm": { + "Algorithm": "des-ede3-cbc" + }, + "EncryptedKey": "ZW5jcnlwdGVkLWtleQ==" + } + ], + "MACAlgorithm": { + "Algorithm": "id-sha256" + }, + "MAC": "bWFjLXZhbHVl" +} diff --git a/src/test/resources/mocks/terminal-api/authenticated-data-missing-mac-algorithm.json b/src/test/resources/mocks/terminal-api/authenticated-data-missing-mac-algorithm.json new file mode 100644 index 000000000..059de2589 --- /dev/null +++ b/src/test/resources/mocks/terminal-api/authenticated-data-missing-mac-algorithm.json @@ -0,0 +1,19 @@ +{ + "keyTransportOrKEK": [ + { + "KEKIdentifier": { + "KeyIdentifier": "kid-1", + "KeyVersion": "kv1" + }, + "KeyEncryptionAlgorithm": { + "Algorithm": "des-ede3-cbc" + }, + "EncryptedKey": "ZW5jcnlwdGVkLWtleQ==" + } + ], + "EncapsulatedContent": { + "Content": "cGF5bG9hZA==", + "ContentType": "id-data" + }, + "MAC": "bWFjLXZhbHVl" +} diff --git a/src/test/resources/mocks/terminal-api/authenticated-data-missing-mac.json b/src/test/resources/mocks/terminal-api/authenticated-data-missing-mac.json new file mode 100644 index 000000000..90dfad397 --- /dev/null +++ b/src/test/resources/mocks/terminal-api/authenticated-data-missing-mac.json @@ -0,0 +1,21 @@ +{ + "keyTransportOrKEK": [ + { + "KEKIdentifier": { + "KeyIdentifier": "kid-1", + "KeyVersion": "kv1" + }, + "KeyEncryptionAlgorithm": { + "Algorithm": "des-ede3-cbc" + }, + "EncryptedKey": "ZW5jcnlwdGVkLWtleQ==" + } + ], + "MACAlgorithm": { + "Algorithm": "id-sha256" + }, + "EncapsulatedContent": { + "Content": "cGF5bG9hZA==", + "ContentType": "id-data" + } +} diff --git a/src/test/resources/mocks/terminal-api/authenticated-data-missing-version.json b/src/test/resources/mocks/terminal-api/authenticated-data-missing-version.json new file mode 100644 index 000000000..eaba242f4 --- /dev/null +++ b/src/test/resources/mocks/terminal-api/authenticated-data-missing-version.json @@ -0,0 +1,22 @@ +{ + "keyTransportOrKEK": [ + { + "KEKIdentifier": { + "KeyIdentifier": "kid-1", + "KeyVersion": "kv1" + }, + "KeyEncryptionAlgorithm": { + "Algorithm": "des-ede3-cbc" + }, + "EncryptedKey": "ZW5jcnlwdGVkLWtleQ==" + } + ], + "MACAlgorithm": { + "Algorithm": "id-sha256" + }, + "EncapsulatedContent": { + "Content": "cGF5bG9hZA==", + "ContentType": "id-data" + }, + "MAC": "bWFjLXZhbHVl" +} diff --git a/src/test/resources/mocks/terminal-api/authenticated-data-wrong-case.json b/src/test/resources/mocks/terminal-api/authenticated-data-wrong-case.json new file mode 100644 index 000000000..ec5a55e67 --- /dev/null +++ b/src/test/resources/mocks/terminal-api/authenticated-data-wrong-case.json @@ -0,0 +1,7 @@ +{ + "macalgorithm": {"Algorithm": "id-sha256"}, + "encapsulatedcontent": {"Content": "cGF5bG9hZA==", "ContentType": "id-data"}, + "version": "v0", + "mac": "bWFjLXZhbHVl", + "KeyTransportOrKEK": [] +} diff --git a/src/test/resources/mocks/terminal-api/event-notification-missing-event-to-notify.json b/src/test/resources/mocks/terminal-api/event-notification-missing-event-to-notify.json new file mode 100644 index 000000000..a8aa44f6b --- /dev/null +++ b/src/test/resources/mocks/terminal-api/event-notification-missing-event-to-notify.json @@ -0,0 +1,4 @@ +{ + "TimeStamp": "2026-03-27T10:30:00Z", + "EventDetails": "Maintenance window started" +} diff --git a/src/test/resources/mocks/terminal-api/event-notification-missing-timestamp.json b/src/test/resources/mocks/terminal-api/event-notification-missing-timestamp.json new file mode 100644 index 000000000..34495b91b --- /dev/null +++ b/src/test/resources/mocks/terminal-api/event-notification-missing-timestamp.json @@ -0,0 +1,4 @@ +{ + "EventToNotify": "BeginMaintenance", + "EventDetails": "Maintenance window started" +} diff --git a/src/test/resources/mocks/terminal-api/event-notification.json b/src/test/resources/mocks/terminal-api/event-notification.json new file mode 100644 index 000000000..ceb244307 --- /dev/null +++ b/src/test/resources/mocks/terminal-api/event-notification.json @@ -0,0 +1,19 @@ +{ + "TimeStamp": "2026-03-27T10:30:00Z", + "EventToNotify": "BeginMaintenance", + "EventDetails": "Maintenance window started", + "MaintenanceRequiredFlag": true, + "CustomerLanguage": "en", + "DisplayOutput": { + "Device": "CustomerDisplay", + "InfoQualify": "Display", + "OutputContent": { + "OutputFormat": "Text", + "OutputText": [ + { + "Text": "System maintenance in progress" + } + ] + } + } +} diff --git a/src/test/resources/mocks/terminal-api/sale-terminal-data-empty-capabilities.json b/src/test/resources/mocks/terminal-api/sale-terminal-data-empty-capabilities.json new file mode 100644 index 000000000..6fdd25ba5 --- /dev/null +++ b/src/test/resources/mocks/terminal-api/sale-terminal-data-empty-capabilities.json @@ -0,0 +1,4 @@ +{ + "SaleCapabilities": [], + "TerminalEnvironment": "Attended" +} diff --git a/src/test/resources/mocks/terminal-api/sale-terminal-data.json b/src/test/resources/mocks/terminal-api/sale-terminal-data.json new file mode 100644 index 000000000..dbf710c2a --- /dev/null +++ b/src/test/resources/mocks/terminal-api/sale-terminal-data.json @@ -0,0 +1,8 @@ +{ + "SaleCapabilities": ["CashierStatus", "CashierDisplay", "CustomerDisplay"], + "SaleProfile": { + "GenericProfile": "Extended" + }, + "TerminalEnvironment": "Attended", + "TotalsGroupID": "group-1" +} diff --git a/src/test/resources/mocks/terminal-api/sale-to-poi-response-diagnosis.json b/src/test/resources/mocks/terminal-api/sale-to-poi-response-diagnosis.json new file mode 100644 index 000000000..13b1cf0a2 --- /dev/null +++ b/src/test/resources/mocks/terminal-api/sale-to-poi-response-diagnosis.json @@ -0,0 +1,20 @@ +{ + "MessageHeader": { + "ProtocolVersion": "3.0", + "SaleID": "POSSystemID12345", + "MessageClass": "Service", + "MessageCategory": "Diagnosis", + "ServiceID": "0207111617", + "POIID": "V400m-324688179", + "MessageType": "Response" + }, + "DiagnosisResponse": { + "Response": { + "Result": "Success" + }, + "LoggedSaleID": ["sale-1", "sale-2"], + "POIStatus": { + "GlobalStatus": "OK" + } + } +} diff --git a/src/test/resources/mocks/terminal-api/sale-to-poi-response-display.json b/src/test/resources/mocks/terminal-api/sale-to-poi-response-display.json new file mode 100644 index 000000000..d743ee12b --- /dev/null +++ b/src/test/resources/mocks/terminal-api/sale-to-poi-response-display.json @@ -0,0 +1,22 @@ +{ + "MessageHeader": { + "ProtocolVersion": "3.0", + "SaleID": "POSSystemID12345", + "MessageClass": "Device", + "MessageCategory": "Display", + "ServiceID": "0207111617", + "POIID": "V400m-324688179", + "MessageType": "Response" + }, + "DisplayResponse": { + "OutputResult": [ + { + "Device": "CashierDisplay", + "InfoQualify": "Status", + "Response": { + "Result": "Success" + } + } + ] + } +} diff --git a/src/test/resources/mocks/terminal-api/sale-to-poi-response-missing-message-header.json b/src/test/resources/mocks/terminal-api/sale-to-poi-response-missing-message-header.json new file mode 100644 index 000000000..964d9d9fa --- /dev/null +++ b/src/test/resources/mocks/terminal-api/sale-to-poi-response-missing-message-header.json @@ -0,0 +1,7 @@ +{ + "DiagnosisResponse": { + "Response": { + "Result": "Success" + } + } +} diff --git a/src/test/resources/mocks/terminal-api/sale-to-poi-response-transaction-status.json b/src/test/resources/mocks/terminal-api/sale-to-poi-response-transaction-status.json new file mode 100644 index 000000000..e2211f9eb --- /dev/null +++ b/src/test/resources/mocks/terminal-api/sale-to-poi-response-transaction-status.json @@ -0,0 +1,22 @@ +{ + "MessageHeader": { + "ProtocolVersion": "3.0", + "SaleID": "POSSystemID12345", + "MessageClass": "Service", + "MessageCategory": "TransactionStatus", + "ServiceID": "0207111617", + "POIID": "V400m-324688179", + "MessageType": "Response" + }, + "TransactionStatusResponse": { + "Response": { + "Result": "Success" + }, + "MessageReference": { + "MessageCategory": "Payment", + "ServiceID": "service-id", + "SaleID": "sale-id", + "POIID": "poi-id" + } + } +}