From 6851a00730664a132307732663964d89d10f41c3 Mon Sep 17 00:00:00 2001 From: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> Date: Wed, 31 Jan 2024 09:02:16 +0100 Subject: [PATCH] Revert "Generated tapi" (#1230) --- Makefile | 4 +- README.md | 52 +- .../terminal/TerminalAPIRequestBuilder.java | 402 +++++ src/main/java/com/adyen/model/ApiError.java | 20 +- .../java/com/adyen/model/InvalidField.java | 12 +- .../com/adyen/model/nexo/AbortRequest.java | 113 ++ .../com/adyen/model/nexo/AccountType.java | 119 ++ .../com/adyen/model/nexo/AdminRequest.java | 61 + .../com/adyen/model/nexo/AdminResponse.java | 61 + .../adyen/model/nexo/AlgorithmIdentifier.java | 82 + .../com/adyen/model/nexo/AlgorithmType.java | 115 ++ .../com/adyen/model/nexo/AlignmentType.java | 76 + .../com/adyen/model/nexo/AllowedProduct.java | 137 ++ .../java/com/adyen/model/nexo/Amount.java | 81 + .../java/com/adyen/model/nexo/AmountsReq.java | 233 +++ .../com/adyen/model/nexo/AmountsResp.java | 183 +++ .../java/com/adyen/model/nexo/AreaSize.java | 82 + .../com/adyen/model/nexo/AttributeType.java | 87 + .../adyen/model/nexo/AuthenticatedData.java | 181 ++ .../model/nexo/AuthenticationMethodType.java | 143 ++ .../model/nexo/BalanceInquiryRequest.java | 87 + .../model/nexo/BalanceInquiryResponse.java | 113 ++ .../com/adyen/model/nexo/BarcodeType.java | 93 ++ .../com/adyen/model/nexo/BatchRequest.java | 99 ++ .../com/adyen/model/nexo/BatchResponse.java | 100 ++ .../adyen/model/nexo/CapturedSignature.java | 100 ++ .../model/nexo/CardAcquisitionRequest.java | 87 + .../model/nexo/CardAcquisitionResponse.java | 252 +++ .../nexo/CardAcquisitionTransaction.java | 307 ++++ .../java/com/adyen/model/nexo/CardData.java | 361 ++++ .../model/nexo/CardReaderAPDURequest.java | 186 +++ .../model/nexo/CardReaderAPDUResponse.java | 112 ++ .../model/nexo/CardReaderInitRequest.java | 180 ++ .../model/nexo/CardReaderInitResponse.java | 169 ++ .../model/nexo/CardReaderPowerOffRequest.java | 87 + .../nexo/CardReaderPowerOffResponse.java | 61 + .../com/adyen/model/nexo/CardholderPIN.java | 111 ++ .../adyen/model/nexo/CashHandlingDevice.java | 124 ++ .../adyen/model/nexo/CharacterHeightType.java | 70 + .../adyen/model/nexo/CharacterStyleType.java | 76 + .../adyen/model/nexo/CharacterWidthType.java | 64 + .../java/com/adyen/model/nexo/CheckData.java | 219 +++ .../adyen/model/nexo/CheckTypeCodeType.java | 64 + .../com/adyen/model/nexo/CoinsOrBills.java | 84 + .../java/com/adyen/model/nexo/ColorType.java | 100 ++ .../adyen/model/nexo/ContentInformation.java | 184 +++ .../com/adyen/model/nexo/ContentType.java | 94 ++ .../adyen/model/nexo/CurrencyConversion.java | 193 +++ .../com/adyen/model/nexo/CustomerOrder.java | 267 +++ .../model/nexo/CustomerOrderReqType.java | 78 + .../java/com/adyen/model/nexo/DeviceType.java | 86 + .../adyen/model/nexo/DiagnosisRequest.java | 128 ++ .../adyen/model/nexo/DiagnosisResponse.java | 163 ++ .../com/adyen/model/nexo/DigestedData.java | 132 ++ .../com/adyen/model/nexo/DisplayOutput.java | 234 +++ .../com/adyen/model/nexo/DisplayRequest.java | 74 + .../com/adyen/model/nexo/DisplayResponse.java | 74 + .../model/nexo/DocumentQualifierType.java | 102 ++ .../model/nexo/EnableServiceRequest.java | 134 ++ .../model/nexo/EnableServiceResponse.java | 61 + .../adyen/model/nexo/EncapsulatedContent.java | 82 + .../adyen/model/nexo/EncryptedContent.java | 107 ++ .../com/adyen/model/nexo/EntryModeType.java | 138 ++ .../com/adyen/model/nexo/EnvelopedData.java | 132 ++ .../adyen/model/nexo/ErrorConditionType.java | 190 +++ .../adyen/model/nexo/EventNotification.java | 218 +++ .../adyen/model/nexo/EventToNotifyType.java | 182 +++ .../adyen/model/nexo/ForceEntryModeType.java | 138 ++ .../adyen/model/nexo/GenericProfileType.java | 78 + .../model/nexo/GeographicCoordinates.java | 87 + .../com/adyen/model/nexo/Geolocation.java | 87 + .../adyen/model/nexo/GetTotalsRequest.java | 102 ++ .../adyen/model/nexo/GetTotalsResponse.java | 125 ++ .../adyen/model/nexo/GlobalStatusType.java | 84 + .../java/com/adyen/model/nexo/HostStatus.java | 86 + .../com/adyen/model/nexo/ICCResetData.java | 82 + .../model/nexo/IdentificationSupportType.java | 86 + .../adyen/model/nexo/IdentificationType.java | 92 ++ .../com/adyen/model/nexo/InfoQualifyType.java | 134 ++ src/main/java/com/adyen/model/nexo/Input.java | 216 +++ .../adyen/model/nexo/InputCommandType.java | 126 ++ .../java/com/adyen/model/nexo/InputData.java | 582 +++++++ .../com/adyen/model/nexo/InputRequest.java | 87 + .../com/adyen/model/nexo/InputResponse.java | 87 + .../com/adyen/model/nexo/InputResult.java | 137 ++ .../com/adyen/model/nexo/InputUpdate.java | 228 +++ .../java/com/adyen/model/nexo/Instalment.java | 283 ++++ .../com/adyen/model/nexo/InstalmentType.java | 78 + .../java/com/adyen/model/nexo/Issuer.java | 71 + .../model/nexo/IssuerAndSerialNumber.java | 84 + src/main/java/com/adyen/model/nexo/KEK.java | 135 ++ .../com/adyen/model/nexo/KEKIdentifier.java | 102 ++ .../com/adyen/model/nexo/KeyTransport.java | 135 ++ .../com/adyen/model/nexo/LoginRequest.java | 308 ++++ .../com/adyen/model/nexo/LoginResponse.java | 87 + .../com/adyen/model/nexo/LogoutRequest.java | 61 + .../com/adyen/model/nexo/LogoutResponse.java | 61 + .../com/adyen/model/nexo/LoyaltyAccount.java | 86 + .../adyen/model/nexo/LoyaltyAccountID.java | 138 ++ .../adyen/model/nexo/LoyaltyAccountReq.java | 87 + .../model/nexo/LoyaltyAccountStatus.java | 141 ++ .../adyen/model/nexo/LoyaltyAcquirerData.java | 137 ++ .../com/adyen/model/nexo/LoyaltyAmount.java | 112 ++ .../com/adyen/model/nexo/LoyaltyData.java | 113 ++ .../adyen/model/nexo/LoyaltyHandlingType.java | 94 ++ .../com/adyen/model/nexo/LoyaltyRequest.java | 126 ++ .../com/adyen/model/nexo/LoyaltyResponse.java | 189 +++ .../com/adyen/model/nexo/LoyaltyResult.java | 165 ++ .../com/adyen/model/nexo/LoyaltyTotals.java | 109 ++ .../adyen/model/nexo/LoyaltyTransaction.java | 202 +++ .../model/nexo/LoyaltyTransactionType.java | 102 ++ .../com/adyen/model/nexo/LoyaltyUnitType.java | 70 + .../java/com/adyen/model/nexo/MenuEntry.java | 209 +++ .../adyen/model/nexo/MenuEntryTagType.java | 86 + .../adyen/model/nexo/MessageCategoryType.java | 268 +++ .../adyen/model/nexo/MessageClassType.java | 78 + .../com/adyen/model/nexo/MessageHeader.java | 232 +++ .../adyen/model/nexo/MessageReference.java | 157 ++ .../com/adyen/model/nexo/MessageType.java | 78 + .../java/com/adyen/model/nexo/MobileData.java | 189 +++ .../model/nexo/NamedKeyEncryptedData.java | 111 ++ .../com/adyen/model/nexo/ObjectFactory.java | 1449 +++++++++++++++++ .../model/nexo/OriginalPOITransaction.java | 242 +++ .../com/adyen/model/nexo/OutputBarcode.java | 85 + .../com/adyen/model/nexo/OutputContent.java | 177 ++ .../adyen/model/nexo/OutputFormatType.java | 86 + .../com/adyen/model/nexo/OutputResult.java | 111 ++ .../java/com/adyen/model/nexo/OutputText.java | 306 ++++ .../com/adyen/model/nexo/PINFormatType.java | 86 + .../java/com/adyen/model/nexo/PINRequest.java | 237 +++ .../com/adyen/model/nexo/PINRequestType.java | 78 + .../com/adyen/model/nexo/PINResponse.java | 87 + .../adyen/model/nexo/POICapabilitiesType.java | 156 ++ .../java/com/adyen/model/nexo/POIData.java | 86 + .../java/com/adyen/model/nexo/POIProfile.java | 105 ++ .../com/adyen/model/nexo/POISoftware.java | 132 ++ .../java/com/adyen/model/nexo/POIStatus.java | 249 +++ .../com/adyen/model/nexo/POISystemData.java | 142 ++ .../com/adyen/model/nexo/POITerminalData.java | 159 ++ .../java/com/adyen/model/nexo/Parameter.java | 54 + .../adyen/model/nexo/PaymentAccountReq.java | 116 ++ .../model/nexo/PaymentAccountStatus.java | 164 ++ .../adyen/model/nexo/PaymentAcquirerData.java | 162 ++ .../com/adyen/model/nexo/PaymentData.java | 223 +++ .../model/nexo/PaymentInstrumentData.java | 183 +++ .../model/nexo/PaymentInstrumentType.java | 94 ++ .../com/adyen/model/nexo/PaymentReceipt.java | 144 ++ .../com/adyen/model/nexo/PaymentRequest.java | 152 ++ .../com/adyen/model/nexo/PaymentResponse.java | 252 +++ .../com/adyen/model/nexo/PaymentResult.java | 403 +++++ .../com/adyen/model/nexo/PaymentToken.java | 108 ++ .../com/adyen/model/nexo/PaymentTotals.java | 109 ++ .../adyen/model/nexo/PaymentTransaction.java | 152 ++ .../com/adyen/model/nexo/PaymentType.java | 150 ++ .../model/nexo/PerformedTransaction.java | 204 +++ .../com/adyen/model/nexo/PeriodUnitType.java | 86 + .../adyen/model/nexo/PredefinedContent.java | 82 + .../com/adyen/model/nexo/PrintOutput.java | 195 +++ .../com/adyen/model/nexo/PrintRequest.java | 61 + .../com/adyen/model/nexo/PrintResponse.java | 86 + .../adyen/model/nexo/PrinterStatusType.java | 92 ++ .../java/com/adyen/model/nexo/Rebates.java | 127 ++ .../adyen/model/nexo/RecipientIdentifier.java | 58 + .../model/nexo/ReconciliationRequest.java | 124 ++ .../model/nexo/ReconciliationResponse.java | 150 ++ .../adyen/model/nexo/ReconciliationType.java | 86 + .../model/nexo/RelativeDistinguishedName.java | 83 + .../model/nexo/RepeatedMessageResponse.java | 91 ++ .../nexo/RepeatedMessageResponseBody.java | 183 +++ .../nexo/RepeatedResponseMessageBody.java | 183 +++ .../java/com/adyen/model/nexo/Response.java | 111 ++ .../adyen/model/nexo/ResponseModeType.java | 86 + .../java/com/adyen/model/nexo/ResultType.java | 78 + .../adyen/model/nexo/ReversalReasonType.java | 86 + .../com/adyen/model/nexo/ReversalRequest.java | 185 +++ .../adyen/model/nexo/ReversalResponse.java | 203 +++ .../model/nexo/SaleCapabilitiesType.java | 172 ++ .../java/com/adyen/model/nexo/SaleData.java | 398 +++++ .../java/com/adyen/model/nexo/SaleItem.java | 321 ++++ .../com/adyen/model/nexo/SaleItemRebate.java | 217 +++ .../com/adyen/model/nexo/SaleProfile.java | 105 ++ .../com/adyen/model/nexo/SaleSoftware.java | 132 ++ .../adyen/model/nexo/SaleTerminalData.java | 152 ++ .../adyen/model/nexo/SaleToIssuerData.java | 61 + .../nexo}/SaleToPOIRequest.java | 518 +++--- .../adyen/model/nexo/SaleToPOIResponse.java | 712 ++++++++ .../adyen/model/nexo/SensitiveCardData.java | 156 ++ .../adyen/model/nexo/SensitiveMobileData.java | 107 ++ .../adyen/model/nexo/ServiceProfilesType.java | 132 ++ .../adyen/model/nexo/ServicesEnabledType.java | 78 + .../com/adyen/model/nexo/SignaturePoint.java | 82 + .../java/com/adyen/model/nexo/SignedData.java | 196 +++ .../java/com/adyen/model/nexo/Signer.java | 161 ++ .../adyen/model/nexo/SignerIdentifier.java | 58 + .../com/adyen/model/nexo/SoundActionType.java | 78 + .../com/adyen/model/nexo/SoundContent.java | 129 ++ .../com/adyen/model/nexo/SoundFormatType.java | 78 + .../com/adyen/model/nexo/SoundRequest.java | 141 ++ .../com/adyen/model/nexo/SoundResponse.java | 61 + .../adyen/model/nexo/SponsoredMerchant.java | 157 ++ .../model/nexo/StoredValueAccountID.java | 212 +++ .../model/nexo/StoredValueAccountStatus.java | 87 + .../model/nexo/StoredValueAccountType.java | 78 + .../com/adyen/model/nexo/StoredValueData.java | 238 +++ .../adyen/model/nexo/StoredValueRequest.java | 132 ++ .../adyen/model/nexo/StoredValueResponse.java | 167 ++ .../adyen/model/nexo/StoredValueResult.java | 213 +++ .../nexo/StoredValueTransactionType.java | 102 ++ .../model/nexo/TerminalEnvironmentType.java | 78 + .../adyen/model/nexo/TokenRequestedType.java | 70 + .../adyen/model/nexo/TotalDetailsType.java | 92 ++ .../com/adyen/model/nexo/TotalFilter.java | 157 ++ .../java/com/adyen/model/nexo/TrackData.java | 112 ++ .../com/adyen/model/nexo/TrackFormatType.java | 98 ++ .../model/nexo/TransactionActionType.java | 70 + .../model/nexo/TransactionConditions.java | 322 ++++ .../model/nexo/TransactionIdentification.java | 83 + .../model/nexo/TransactionStatusRequest.java | 131 ++ .../model/nexo/TransactionStatusResponse.java | 113 ++ .../model/nexo/TransactionToPerform.java | 113 ++ .../adyen/model/nexo/TransactionTotals.java | 440 +++++ .../com/adyen/model/nexo/TransactionType.java | 206 +++ .../com/adyen/model/nexo/TransmitRequest.java | 141 ++ .../adyen/model/nexo/TransmitResponse.java | 87 + .../com/adyen/model/nexo/UTMCoordinates.java | 113 ++ .../adyen/model/nexo/UnitOfMeasureType.java | 206 +++ .../com/adyen/model/nexo/VersionType.java | 94 ++ .../adyen/model/terminal/AbortRequest.java | 208 --- .../model/terminal/AbstractOpenApiSchema.java | 147 -- .../com/adyen/model/terminal/AccountType.java | 73 - .../adyen/model/terminal/AdminRequest.java | 134 -- .../adyen/model/terminal/AdminResponse.java | 135 -- .../com/adyen/model/terminal/Alignment.java | 65 - .../adyen/model/terminal/AllowedProduct.java | 244 --- .../com/adyen/model/terminal/AmountsReq.java | 401 ----- .../com/adyen/model/terminal/AmountsResp.java | 324 ---- .../com/adyen/model/terminal/AreaSize.java | 169 -- .../model/terminal/BalanceInquiryRequest.java | 172 -- .../terminal/BalanceInquiryResponse.java | 256 --- .../com/adyen/model/terminal/BarcodeType.java | 71 - .../model/terminal/CapturedSignature.java | 181 -- .../terminal/CardAcquisitionRequest.java | 172 -- .../terminal/CardAcquisitionResponse.java | 373 ----- .../terminal/CardAcquisitionTransaction.java | 505 ------ .../com/adyen/model/terminal/CardData.java | 587 ------- .../adyen/model/terminal/CardHolderPIN.java | 206 --- .../model/terminal/CardReaderAPDURequest.java | 314 ---- .../terminal/CardReaderAPDUResponse.java | 207 --- .../model/terminal/CashHandlingDevice.java | 214 --- .../adyen/model/terminal/CharacterHeight.java | 63 - .../adyen/model/terminal/CharacterStyle.java | 65 - .../adyen/model/terminal/CharacterWidth.java | 61 - .../com/adyen/model/terminal/CheckData.java | 352 ---- .../adyen/model/terminal/CoinsOrBills.java | 173 -- .../java/com/adyen/model/terminal/Color.java | 73 - .../terminal/ConnectedTerminalsRequest.java | 50 +- .../terminal/ConnectedTerminalsResponse.java | 67 + .../adyen/model/terminal/ConvertedAmount.java | 172 -- .../model/terminal/CurrencyConversion.java | 318 ---- .../adyen/model/terminal/CustomerOrder.java | 464 ------ .../java/com/adyen/model/terminal/Device.java | 65 - .../model/terminal/DiagnosisRequest.java | 216 --- .../model/terminal/DiagnosisResponse.java | 263 --- .../adyen/model/terminal/DisplayOutput.java | 366 ----- .../adyen/model/terminal/DisplayRequest.java | 142 -- .../adyen/model/terminal/DisplayResponse.java | 142 -- .../model/terminal/DocumentQualifier.java | 69 - .../model/terminal/EnableServiceRequest.java | 255 --- .../model/terminal/EnableServiceResponse.java | 135 -- .../adyen/model/terminal/ErrorCondition.java | 91 -- .../model/terminal/EventNotification.java | 363 ----- .../adyen/model/terminal/EventToNotify.java | 90 - .../adyen/model/terminal/GenericProfile.java | 63 - .../model/terminal/GeographicCoordinates.java | 169 -- .../com/adyen/model/terminal/Geolocation.java | 171 -- .../model/terminal/GetTotalsRequest.java | 222 --- .../model/terminal/GetTotalsResponse.java | 218 --- .../adyen/model/terminal/GlobalStatus.java | 65 - .../com/adyen/model/terminal/HostStatus.java | 170 -- .../adyen/model/terminal/ICCResetData.java | 169 -- .../model/terminal/IdentificationSupport.java | 65 - .../model/terminal/IdentificationType.java | 67 - .../com/adyen/model/terminal/InfoQualify.java | 77 - .../java/com/adyen/model/terminal/Input.java | 360 ---- .../adyen/model/terminal/InputCommand.java | 75 - .../com/adyen/model/terminal/InputData.java | 856 ---------- .../adyen/model/terminal/InputRequest.java | 172 -- .../adyen/model/terminal/InputResponse.java | 172 -- .../com/adyen/model/terminal/InputResult.java | 245 --- .../com/adyen/model/terminal/InputUpdate.java | 363 ----- .../com/adyen/model/terminal/Instalment.java | 467 ------ .../adyen/model/terminal/InstalmentType.java | 63 - .../java/com/adyen/model/terminal/JSON.java | 253 --- .../adyen/model/terminal/LoginRequest.java | 509 ------ .../adyen/model/terminal/LoginResponse.java | 244 --- .../adyen/model/terminal/LogoutRequest.java | 134 -- .../adyen/model/terminal/LogoutResponse.java | 135 -- .../adyen/model/terminal/LoyaltyAccount.java | 171 -- .../model/terminal/LoyaltyAccountID.java | 304 ---- .../model/terminal/LoyaltyAccountReq.java | 171 -- .../model/terminal/LoyaltyAccountStatus.java | 246 --- .../model/terminal/LoyaltyAcquirerData.java | 242 --- .../adyen/model/terminal/LoyaltyAmount.java | 210 --- .../com/adyen/model/terminal/LoyaltyData.java | 209 --- .../adyen/model/terminal/LoyaltyHandling.java | 67 - .../adyen/model/terminal/LoyaltyRequest.java | 209 --- .../adyen/model/terminal/LoyaltyResponse.java | 301 ---- .../adyen/model/terminal/LoyaltyResult.java | 285 ---- .../adyen/model/terminal/LoyaltyTotals.java | 210 --- .../model/terminal/LoyaltyTransaction.java | 330 ---- .../terminal/LoyaltyTransactionType.java | 69 - .../com/adyen/model/terminal/LoyaltyUnit.java | 61 - .../com/adyen/model/terminal/MenuEntry.java | 328 ---- .../adyen/model/terminal/MenuEntryTag.java | 66 - .../adyen/model/terminal/MessageCategory.java | 99 -- .../adyen/model/terminal/MessageClass.java | 63 - .../adyen/model/terminal/MessageHeader.java | 389 ----- .../model/terminal/MessageReference.java | 279 ---- .../com/adyen/model/terminal/MessageType.java | 63 - .../com/adyen/model/terminal/MobileData.java | 320 ---- .../terminal/OriginalPOITransaction.java | 426 ----- .../adyen/model/terminal/OutputBarcode.java | 170 -- .../adyen/model/terminal/OutputContent.java | 292 ---- .../adyen/model/terminal/OutputFormat.java | 65 - .../adyen/model/terminal/OutputResult.java | 209 --- .../com/adyen/model/terminal/OutputText.java | 503 ------ .../com/adyen/model/terminal/PINFormat.java | 65 - .../adyen/model/terminal/PINRequestType.java | 64 - .../com/adyen/model/terminal/POIData.java | 171 -- .../com/adyen/model/terminal/POIProfile.java | 231 --- .../com/adyen/model/terminal/POISoftware.java | 241 --- .../com/adyen/model/terminal/POIStatus.java | 399 ----- .../adyen/model/terminal/POISystemData.java | 245 --- .../adyen/model/terminal/POITerminalData.java | 307 ---- .../model/terminal/PaymentAccountReq.java | 208 --- .../model/terminal/PaymentAccountStatus.java | 246 --- .../model/terminal/PaymentAcquirerData.java | 315 ---- .../com/adyen/model/terminal/PaymentData.java | 355 ---- .../model/terminal/PaymentInstrumentData.java | 319 ---- .../model/terminal/PaymentInstrumentType.java | 67 - .../adyen/model/terminal/PaymentReceipt.java | 244 --- .../adyen/model/terminal/PaymentRequest.java | 256 --- .../adyen/model/terminal/PaymentResponse.java | 383 ----- .../adyen/model/terminal/PaymentResult.java | 644 -------- .../adyen/model/terminal/PaymentToken.java | 208 --- .../adyen/model/terminal/PaymentTotals.java | 210 --- .../model/terminal/PaymentTransaction.java | 255 --- .../com/adyen/model/terminal/PaymentType.java | 81 - .../model/terminal/PerformedTransaction.java | 331 ---- .../com/adyen/model/terminal/PeriodUnit.java | 65 - .../java/com/adyen/model/terminal/Point.java | 169 -- .../model/terminal/PredefinedContent.java | 170 -- .../com/adyen/model/terminal/PrintOutput.java | 280 ---- .../adyen/model/terminal/PrintRequest.java | 135 -- .../adyen/model/terminal/PrintResponse.java | 172 -- .../adyen/model/terminal/PrinterStatus.java | 67 - .../com/adyen/model/terminal/Rebates.java | 219 --- .../model/terminal/ReconciliationRequest.java | 217 --- .../terminal/ReconciliationResponse.java | 255 --- .../model/terminal/ReconciliationType.java | 65 - .../terminal/RepeatedMessageResponse.java | 171 -- .../terminal/RepeatedResponseMessageBody.java | 319 ---- .../com/adyen/model/terminal/Response.java | 208 --- .../adyen/model/terminal/ResponseMode.java | 65 - .../java/com/adyen/model/terminal/Result.java | 63 - .../adyen/model/terminal/ReversalReason.java | 66 - .../adyen/model/terminal/ReversalRequest.java | 285 ---- .../model/terminal/ReversalResponse.java | 340 ---- .../com/adyen/model/terminal/SaleData.java | 581 ------- .../com/adyen/model/terminal/SaleItem.java | 502 ------ .../adyen/model/terminal/SaleItemRebate.java | 356 ---- .../adyen/model/terminal/SaleSoftware.java | 242 --- .../model/terminal/SaleTerminalData.java | 134 -- .../terminal/SaleToAcquirerData.java | 48 +- .../model/terminal/SaleToIssuerData.java | 134 -- .../adyen/model/terminal/SecurityTrailer.java | 278 ---- .../model/terminal/SensitiveCardData.java | 259 --- .../model/terminal/SensitiveMobileData.java | 205 --- .../com/adyen/model/terminal/SoundAction.java | 63 - .../adyen/model/terminal/SoundContent.java | 242 --- .../com/adyen/model/terminal/SoundFormat.java | 63 - .../model/terminal/StoredValueAccountID.java | 414 ----- .../terminal/StoredValueAccountStatus.java | 173 -- .../terminal/StoredValueAccountType.java | 63 - .../adyen/model/terminal/StoredValueData.java | 394 ----- .../model/terminal/StoredValueRequest.java | 215 --- .../model/terminal/StoredValueResponse.java | 301 ---- .../model/terminal/StoredValueResult.java | 358 ---- .../terminal/StoredValueTransactionType.java | 69 - .../model/terminal/TerminalAPIRequest.java | 77 + .../model/terminal/TerminalAPIResponse.java | 101 ++ .../terminal/TerminalAPISecuredRequest.java | 78 + .../terminal/TerminalAPISecuredResponse.java | 77 + .../model/terminal/TerminalEnvironment.java | 63 - .../model/terminal/TokenRequestedType.java | 61 - .../com/adyen/model/terminal/TotalFilter.java | 277 ---- .../com/adyen/model/terminal/TrackData.java | 209 --- .../com/adyen/model/terminal/TrackFormat.java | 61 - .../model/terminal/TransactionAction.java | 62 - .../model/terminal/TransactionConditions.java | 510 ------ .../model/terminal/TransactionIDType.java | 171 -- .../terminal/TransactionStatusRequest.java | 218 --- .../terminal/TransactionStatusResponse.java | 209 --- .../model/terminal/TransactionTotals.java | 624 ------- .../adyen/model/terminal/TransactionType.java | 95 -- .../com/adyen/model/terminal/TypeCode.java | 61 - .../adyen/model/terminal/UTMCoordinates.java | 205 --- .../adyen/model/terminal/UnitOfMeasure.java | 95 -- .../terminal/security/NexoDerivedKey.java | 23 +- .../security/SaleToPOISecuredMessage.java | 91 ++ .../terminal/security/SecurityKey.java | 23 +- .../terminal/security/SecurityTrailer.java | 120 ++ .../adyen/notification/WebhookHandler.java | 37 +- .../serializer/ByteArrayDeserializer.java | 3 +- .../serializer/ByteArrayToStringAdapter.java | 21 + .../com/adyen/serializer/DateSerializer.java | 20 + .../serializer/DateTimeGMTSerializer.java | 20 + .../serializer/DateTimeISO8601Serializer.java | 20 + .../SaleToAcquirerDataSerializer.java | 29 + .../TerminalByteArrayDeserializer.java | 20 - .../TerminalByteArraySerializer.java | 20 - ...minalConnectedApi.java => PosPayment.java} | 17 +- .../com/adyen/service/TerminalCloudAPI.java | 41 +- .../com/adyen/service/TerminalLocalAPI.java | 26 +- .../service/TerminalLocalAPIUnencrypted.java | 16 +- .../terminal/cloud/ConnectedTerminals.java | 3 +- .../terminal/ConnectedTerminalsResponse.java | 67 - .../com/adyen/terminal/SaleToPOIResponse.java | 698 -------- .../adyen/terminal/TerminalAPIRequest.java | 102 -- .../adyen/terminal/TerminalAPIResponse.java | 131 -- .../adyen/terminal/security/NexoCrypto.java | 32 +- .../security/NexoDerivedKeyGenerator.java | 29 +- .../security/SaleToPOISecuredMessage.java | 117 -- .../security/TerminalAPISecuredRequest.java | 97 -- .../security/TerminalAPISecuredResponse.java | 97 -- .../security/TerminalCommonNameValidator.java | 21 + .../ByteArrayToBase64TypeAdapter.java | 42 + .../serialization/TerminalAPIGsonBuilder.java | 61 + .../serialization/XMLEnumAdapterFactory.java | 38 + .../serialization/XMLEnumTypeAdapter.java | 87 + .../XMLGregorianCalendarTypeAdapter.java | 52 + src/test/java/com/adyen/BaseTest.java | 42 +- src/test/java/com/adyen/NexoCryptoTest.java | 14 +- ...nectedApiTest.java => PosPaymentTest.java} | 40 +- .../java/com/adyen/TerminalCloudAPITest.java | 139 +- .../java/com/adyen/TerminalLocalAPITest.java | 191 ++- src/test/java/com/adyen/UtilTest.java | 2 +- src/test/java/com/adyen/WebhookTest.java | 21 +- .../TerminalAPIRequestBuilderTest.java | 106 ++ .../SaleToAcquirerDataSerializerTest.java | 116 ++ .../serializer/XMLEnumSerializerTest.java | 56 + .../com/adyen/util/HMACValidatorTest.java | 2 +- 452 files changed, 34927 insertions(+), 39988 deletions(-) create mode 100644 src/main/java/com/adyen/builders/terminal/TerminalAPIRequestBuilder.java create mode 100644 src/main/java/com/adyen/model/nexo/AbortRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/AccountType.java create mode 100644 src/main/java/com/adyen/model/nexo/AdminRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/AdminResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/AlgorithmIdentifier.java create mode 100644 src/main/java/com/adyen/model/nexo/AlgorithmType.java create mode 100644 src/main/java/com/adyen/model/nexo/AlignmentType.java create mode 100644 src/main/java/com/adyen/model/nexo/AllowedProduct.java create mode 100644 src/main/java/com/adyen/model/nexo/Amount.java create mode 100644 src/main/java/com/adyen/model/nexo/AmountsReq.java create mode 100644 src/main/java/com/adyen/model/nexo/AmountsResp.java create mode 100644 src/main/java/com/adyen/model/nexo/AreaSize.java create mode 100644 src/main/java/com/adyen/model/nexo/AttributeType.java create mode 100644 src/main/java/com/adyen/model/nexo/AuthenticatedData.java create mode 100644 src/main/java/com/adyen/model/nexo/AuthenticationMethodType.java create mode 100644 src/main/java/com/adyen/model/nexo/BalanceInquiryRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/BalanceInquiryResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/BarcodeType.java create mode 100644 src/main/java/com/adyen/model/nexo/BatchRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/BatchResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/CapturedSignature.java create mode 100644 src/main/java/com/adyen/model/nexo/CardAcquisitionRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/CardAcquisitionResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/CardAcquisitionTransaction.java create mode 100644 src/main/java/com/adyen/model/nexo/CardData.java create mode 100644 src/main/java/com/adyen/model/nexo/CardReaderAPDURequest.java create mode 100644 src/main/java/com/adyen/model/nexo/CardReaderAPDUResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/CardReaderInitRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/CardReaderInitResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/CardReaderPowerOffRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/CardReaderPowerOffResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/CardholderPIN.java create mode 100644 src/main/java/com/adyen/model/nexo/CashHandlingDevice.java create mode 100644 src/main/java/com/adyen/model/nexo/CharacterHeightType.java create mode 100644 src/main/java/com/adyen/model/nexo/CharacterStyleType.java create mode 100644 src/main/java/com/adyen/model/nexo/CharacterWidthType.java create mode 100644 src/main/java/com/adyen/model/nexo/CheckData.java create mode 100644 src/main/java/com/adyen/model/nexo/CheckTypeCodeType.java create mode 100644 src/main/java/com/adyen/model/nexo/CoinsOrBills.java create mode 100644 src/main/java/com/adyen/model/nexo/ColorType.java create mode 100644 src/main/java/com/adyen/model/nexo/ContentInformation.java create mode 100644 src/main/java/com/adyen/model/nexo/ContentType.java create mode 100644 src/main/java/com/adyen/model/nexo/CurrencyConversion.java create mode 100644 src/main/java/com/adyen/model/nexo/CustomerOrder.java create mode 100644 src/main/java/com/adyen/model/nexo/CustomerOrderReqType.java create mode 100644 src/main/java/com/adyen/model/nexo/DeviceType.java create mode 100644 src/main/java/com/adyen/model/nexo/DiagnosisRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/DiagnosisResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/DigestedData.java create mode 100644 src/main/java/com/adyen/model/nexo/DisplayOutput.java create mode 100644 src/main/java/com/adyen/model/nexo/DisplayRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/DisplayResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/DocumentQualifierType.java create mode 100644 src/main/java/com/adyen/model/nexo/EnableServiceRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/EnableServiceResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/EncapsulatedContent.java create mode 100644 src/main/java/com/adyen/model/nexo/EncryptedContent.java create mode 100644 src/main/java/com/adyen/model/nexo/EntryModeType.java create mode 100644 src/main/java/com/adyen/model/nexo/EnvelopedData.java create mode 100644 src/main/java/com/adyen/model/nexo/ErrorConditionType.java create mode 100644 src/main/java/com/adyen/model/nexo/EventNotification.java create mode 100644 src/main/java/com/adyen/model/nexo/EventToNotifyType.java create mode 100644 src/main/java/com/adyen/model/nexo/ForceEntryModeType.java create mode 100644 src/main/java/com/adyen/model/nexo/GenericProfileType.java create mode 100644 src/main/java/com/adyen/model/nexo/GeographicCoordinates.java create mode 100644 src/main/java/com/adyen/model/nexo/Geolocation.java create mode 100644 src/main/java/com/adyen/model/nexo/GetTotalsRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/GetTotalsResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/GlobalStatusType.java create mode 100644 src/main/java/com/adyen/model/nexo/HostStatus.java create mode 100644 src/main/java/com/adyen/model/nexo/ICCResetData.java create mode 100644 src/main/java/com/adyen/model/nexo/IdentificationSupportType.java create mode 100644 src/main/java/com/adyen/model/nexo/IdentificationType.java create mode 100644 src/main/java/com/adyen/model/nexo/InfoQualifyType.java create mode 100644 src/main/java/com/adyen/model/nexo/Input.java create mode 100644 src/main/java/com/adyen/model/nexo/InputCommandType.java create mode 100644 src/main/java/com/adyen/model/nexo/InputData.java create mode 100644 src/main/java/com/adyen/model/nexo/InputRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/InputResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/InputResult.java create mode 100644 src/main/java/com/adyen/model/nexo/InputUpdate.java create mode 100644 src/main/java/com/adyen/model/nexo/Instalment.java create mode 100644 src/main/java/com/adyen/model/nexo/InstalmentType.java create mode 100644 src/main/java/com/adyen/model/nexo/Issuer.java create mode 100644 src/main/java/com/adyen/model/nexo/IssuerAndSerialNumber.java create mode 100644 src/main/java/com/adyen/model/nexo/KEK.java create mode 100644 src/main/java/com/adyen/model/nexo/KEKIdentifier.java create mode 100644 src/main/java/com/adyen/model/nexo/KeyTransport.java create mode 100644 src/main/java/com/adyen/model/nexo/LoginRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/LoginResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/LogoutRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/LogoutResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/LoyaltyAccount.java create mode 100644 src/main/java/com/adyen/model/nexo/LoyaltyAccountID.java create mode 100644 src/main/java/com/adyen/model/nexo/LoyaltyAccountReq.java create mode 100644 src/main/java/com/adyen/model/nexo/LoyaltyAccountStatus.java create mode 100644 src/main/java/com/adyen/model/nexo/LoyaltyAcquirerData.java create mode 100644 src/main/java/com/adyen/model/nexo/LoyaltyAmount.java create mode 100644 src/main/java/com/adyen/model/nexo/LoyaltyData.java create mode 100644 src/main/java/com/adyen/model/nexo/LoyaltyHandlingType.java create mode 100644 src/main/java/com/adyen/model/nexo/LoyaltyRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/LoyaltyResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/LoyaltyResult.java create mode 100644 src/main/java/com/adyen/model/nexo/LoyaltyTotals.java create mode 100644 src/main/java/com/adyen/model/nexo/LoyaltyTransaction.java create mode 100644 src/main/java/com/adyen/model/nexo/LoyaltyTransactionType.java create mode 100644 src/main/java/com/adyen/model/nexo/LoyaltyUnitType.java create mode 100644 src/main/java/com/adyen/model/nexo/MenuEntry.java create mode 100644 src/main/java/com/adyen/model/nexo/MenuEntryTagType.java create mode 100644 src/main/java/com/adyen/model/nexo/MessageCategoryType.java create mode 100644 src/main/java/com/adyen/model/nexo/MessageClassType.java create mode 100644 src/main/java/com/adyen/model/nexo/MessageHeader.java create mode 100644 src/main/java/com/adyen/model/nexo/MessageReference.java create mode 100644 src/main/java/com/adyen/model/nexo/MessageType.java create mode 100644 src/main/java/com/adyen/model/nexo/MobileData.java create mode 100644 src/main/java/com/adyen/model/nexo/NamedKeyEncryptedData.java create mode 100644 src/main/java/com/adyen/model/nexo/ObjectFactory.java create mode 100644 src/main/java/com/adyen/model/nexo/OriginalPOITransaction.java create mode 100644 src/main/java/com/adyen/model/nexo/OutputBarcode.java create mode 100644 src/main/java/com/adyen/model/nexo/OutputContent.java create mode 100644 src/main/java/com/adyen/model/nexo/OutputFormatType.java create mode 100644 src/main/java/com/adyen/model/nexo/OutputResult.java create mode 100644 src/main/java/com/adyen/model/nexo/OutputText.java create mode 100644 src/main/java/com/adyen/model/nexo/PINFormatType.java create mode 100644 src/main/java/com/adyen/model/nexo/PINRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/PINRequestType.java create mode 100644 src/main/java/com/adyen/model/nexo/PINResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/POICapabilitiesType.java create mode 100644 src/main/java/com/adyen/model/nexo/POIData.java create mode 100644 src/main/java/com/adyen/model/nexo/POIProfile.java create mode 100644 src/main/java/com/adyen/model/nexo/POISoftware.java create mode 100644 src/main/java/com/adyen/model/nexo/POIStatus.java create mode 100644 src/main/java/com/adyen/model/nexo/POISystemData.java create mode 100644 src/main/java/com/adyen/model/nexo/POITerminalData.java create mode 100644 src/main/java/com/adyen/model/nexo/Parameter.java create mode 100644 src/main/java/com/adyen/model/nexo/PaymentAccountReq.java create mode 100644 src/main/java/com/adyen/model/nexo/PaymentAccountStatus.java create mode 100644 src/main/java/com/adyen/model/nexo/PaymentAcquirerData.java create mode 100644 src/main/java/com/adyen/model/nexo/PaymentData.java create mode 100644 src/main/java/com/adyen/model/nexo/PaymentInstrumentData.java create mode 100644 src/main/java/com/adyen/model/nexo/PaymentInstrumentType.java create mode 100644 src/main/java/com/adyen/model/nexo/PaymentReceipt.java create mode 100644 src/main/java/com/adyen/model/nexo/PaymentRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/PaymentResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/PaymentResult.java create mode 100644 src/main/java/com/adyen/model/nexo/PaymentToken.java create mode 100644 src/main/java/com/adyen/model/nexo/PaymentTotals.java create mode 100644 src/main/java/com/adyen/model/nexo/PaymentTransaction.java create mode 100644 src/main/java/com/adyen/model/nexo/PaymentType.java create mode 100644 src/main/java/com/adyen/model/nexo/PerformedTransaction.java create mode 100644 src/main/java/com/adyen/model/nexo/PeriodUnitType.java create mode 100644 src/main/java/com/adyen/model/nexo/PredefinedContent.java create mode 100644 src/main/java/com/adyen/model/nexo/PrintOutput.java create mode 100644 src/main/java/com/adyen/model/nexo/PrintRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/PrintResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/PrinterStatusType.java create mode 100644 src/main/java/com/adyen/model/nexo/Rebates.java create mode 100644 src/main/java/com/adyen/model/nexo/RecipientIdentifier.java create mode 100644 src/main/java/com/adyen/model/nexo/ReconciliationRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/ReconciliationResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/ReconciliationType.java create mode 100644 src/main/java/com/adyen/model/nexo/RelativeDistinguishedName.java create mode 100644 src/main/java/com/adyen/model/nexo/RepeatedMessageResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/RepeatedMessageResponseBody.java create mode 100644 src/main/java/com/adyen/model/nexo/RepeatedResponseMessageBody.java create mode 100644 src/main/java/com/adyen/model/nexo/Response.java create mode 100644 src/main/java/com/adyen/model/nexo/ResponseModeType.java create mode 100644 src/main/java/com/adyen/model/nexo/ResultType.java create mode 100644 src/main/java/com/adyen/model/nexo/ReversalReasonType.java create mode 100644 src/main/java/com/adyen/model/nexo/ReversalRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/ReversalResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/SaleCapabilitiesType.java create mode 100644 src/main/java/com/adyen/model/nexo/SaleData.java create mode 100644 src/main/java/com/adyen/model/nexo/SaleItem.java create mode 100644 src/main/java/com/adyen/model/nexo/SaleItemRebate.java create mode 100644 src/main/java/com/adyen/model/nexo/SaleProfile.java create mode 100644 src/main/java/com/adyen/model/nexo/SaleSoftware.java create mode 100644 src/main/java/com/adyen/model/nexo/SaleTerminalData.java create mode 100644 src/main/java/com/adyen/model/nexo/SaleToIssuerData.java rename src/main/java/com/adyen/{terminal => model/nexo}/SaleToPOIRequest.java (51%) create mode 100644 src/main/java/com/adyen/model/nexo/SaleToPOIResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/SensitiveCardData.java create mode 100644 src/main/java/com/adyen/model/nexo/SensitiveMobileData.java create mode 100644 src/main/java/com/adyen/model/nexo/ServiceProfilesType.java create mode 100644 src/main/java/com/adyen/model/nexo/ServicesEnabledType.java create mode 100644 src/main/java/com/adyen/model/nexo/SignaturePoint.java create mode 100644 src/main/java/com/adyen/model/nexo/SignedData.java create mode 100644 src/main/java/com/adyen/model/nexo/Signer.java create mode 100644 src/main/java/com/adyen/model/nexo/SignerIdentifier.java create mode 100644 src/main/java/com/adyen/model/nexo/SoundActionType.java create mode 100644 src/main/java/com/adyen/model/nexo/SoundContent.java create mode 100644 src/main/java/com/adyen/model/nexo/SoundFormatType.java create mode 100644 src/main/java/com/adyen/model/nexo/SoundRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/SoundResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/SponsoredMerchant.java create mode 100644 src/main/java/com/adyen/model/nexo/StoredValueAccountID.java create mode 100644 src/main/java/com/adyen/model/nexo/StoredValueAccountStatus.java create mode 100644 src/main/java/com/adyen/model/nexo/StoredValueAccountType.java create mode 100644 src/main/java/com/adyen/model/nexo/StoredValueData.java create mode 100644 src/main/java/com/adyen/model/nexo/StoredValueRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/StoredValueResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/StoredValueResult.java create mode 100644 src/main/java/com/adyen/model/nexo/StoredValueTransactionType.java create mode 100644 src/main/java/com/adyen/model/nexo/TerminalEnvironmentType.java create mode 100644 src/main/java/com/adyen/model/nexo/TokenRequestedType.java create mode 100644 src/main/java/com/adyen/model/nexo/TotalDetailsType.java create mode 100644 src/main/java/com/adyen/model/nexo/TotalFilter.java create mode 100644 src/main/java/com/adyen/model/nexo/TrackData.java create mode 100644 src/main/java/com/adyen/model/nexo/TrackFormatType.java create mode 100644 src/main/java/com/adyen/model/nexo/TransactionActionType.java create mode 100644 src/main/java/com/adyen/model/nexo/TransactionConditions.java create mode 100644 src/main/java/com/adyen/model/nexo/TransactionIdentification.java create mode 100644 src/main/java/com/adyen/model/nexo/TransactionStatusRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/TransactionStatusResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/TransactionToPerform.java create mode 100644 src/main/java/com/adyen/model/nexo/TransactionTotals.java create mode 100644 src/main/java/com/adyen/model/nexo/TransactionType.java create mode 100644 src/main/java/com/adyen/model/nexo/TransmitRequest.java create mode 100644 src/main/java/com/adyen/model/nexo/TransmitResponse.java create mode 100644 src/main/java/com/adyen/model/nexo/UTMCoordinates.java create mode 100644 src/main/java/com/adyen/model/nexo/UnitOfMeasureType.java create mode 100644 src/main/java/com/adyen/model/nexo/VersionType.java delete mode 100644 src/main/java/com/adyen/model/terminal/AbortRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/AbstractOpenApiSchema.java delete mode 100644 src/main/java/com/adyen/model/terminal/AccountType.java delete mode 100644 src/main/java/com/adyen/model/terminal/AdminRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/AdminResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/Alignment.java delete mode 100644 src/main/java/com/adyen/model/terminal/AllowedProduct.java delete mode 100644 src/main/java/com/adyen/model/terminal/AmountsReq.java delete mode 100644 src/main/java/com/adyen/model/terminal/AmountsResp.java delete mode 100644 src/main/java/com/adyen/model/terminal/AreaSize.java delete mode 100644 src/main/java/com/adyen/model/terminal/BalanceInquiryRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/BalanceInquiryResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/BarcodeType.java delete mode 100644 src/main/java/com/adyen/model/terminal/CapturedSignature.java delete mode 100644 src/main/java/com/adyen/model/terminal/CardAcquisitionRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/CardAcquisitionResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/CardAcquisitionTransaction.java delete mode 100644 src/main/java/com/adyen/model/terminal/CardData.java delete mode 100644 src/main/java/com/adyen/model/terminal/CardHolderPIN.java delete mode 100644 src/main/java/com/adyen/model/terminal/CardReaderAPDURequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/CardReaderAPDUResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/CashHandlingDevice.java delete mode 100644 src/main/java/com/adyen/model/terminal/CharacterHeight.java delete mode 100644 src/main/java/com/adyen/model/terminal/CharacterStyle.java delete mode 100644 src/main/java/com/adyen/model/terminal/CharacterWidth.java delete mode 100644 src/main/java/com/adyen/model/terminal/CheckData.java delete mode 100644 src/main/java/com/adyen/model/terminal/CoinsOrBills.java delete mode 100644 src/main/java/com/adyen/model/terminal/Color.java rename src/main/java/com/adyen/{ => model}/terminal/ConnectedTerminalsRequest.java (59%) create mode 100644 src/main/java/com/adyen/model/terminal/ConnectedTerminalsResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/ConvertedAmount.java delete mode 100644 src/main/java/com/adyen/model/terminal/CurrencyConversion.java delete mode 100644 src/main/java/com/adyen/model/terminal/CustomerOrder.java delete mode 100644 src/main/java/com/adyen/model/terminal/Device.java delete mode 100644 src/main/java/com/adyen/model/terminal/DiagnosisRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/DiagnosisResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/DisplayOutput.java delete mode 100644 src/main/java/com/adyen/model/terminal/DisplayRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/DisplayResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/DocumentQualifier.java delete mode 100644 src/main/java/com/adyen/model/terminal/EnableServiceRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/EnableServiceResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/ErrorCondition.java delete mode 100644 src/main/java/com/adyen/model/terminal/EventNotification.java delete mode 100644 src/main/java/com/adyen/model/terminal/EventToNotify.java delete mode 100644 src/main/java/com/adyen/model/terminal/GenericProfile.java delete mode 100644 src/main/java/com/adyen/model/terminal/GeographicCoordinates.java delete mode 100644 src/main/java/com/adyen/model/terminal/Geolocation.java delete mode 100644 src/main/java/com/adyen/model/terminal/GetTotalsRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/GetTotalsResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/GlobalStatus.java delete mode 100644 src/main/java/com/adyen/model/terminal/HostStatus.java delete mode 100644 src/main/java/com/adyen/model/terminal/ICCResetData.java delete mode 100644 src/main/java/com/adyen/model/terminal/IdentificationSupport.java delete mode 100644 src/main/java/com/adyen/model/terminal/IdentificationType.java delete mode 100644 src/main/java/com/adyen/model/terminal/InfoQualify.java delete mode 100644 src/main/java/com/adyen/model/terminal/Input.java delete mode 100644 src/main/java/com/adyen/model/terminal/InputCommand.java delete mode 100644 src/main/java/com/adyen/model/terminal/InputData.java delete mode 100644 src/main/java/com/adyen/model/terminal/InputRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/InputResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/InputResult.java delete mode 100644 src/main/java/com/adyen/model/terminal/InputUpdate.java delete mode 100644 src/main/java/com/adyen/model/terminal/Instalment.java delete mode 100644 src/main/java/com/adyen/model/terminal/InstalmentType.java delete mode 100644 src/main/java/com/adyen/model/terminal/JSON.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoginRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoginResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/LogoutRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/LogoutResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoyaltyAccount.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoyaltyAccountID.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoyaltyAccountReq.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoyaltyAccountStatus.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoyaltyAcquirerData.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoyaltyAmount.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoyaltyData.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoyaltyHandling.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoyaltyRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoyaltyResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoyaltyResult.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoyaltyTotals.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoyaltyTransaction.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoyaltyTransactionType.java delete mode 100644 src/main/java/com/adyen/model/terminal/LoyaltyUnit.java delete mode 100644 src/main/java/com/adyen/model/terminal/MenuEntry.java delete mode 100644 src/main/java/com/adyen/model/terminal/MenuEntryTag.java delete mode 100644 src/main/java/com/adyen/model/terminal/MessageCategory.java delete mode 100644 src/main/java/com/adyen/model/terminal/MessageClass.java delete mode 100644 src/main/java/com/adyen/model/terminal/MessageHeader.java delete mode 100644 src/main/java/com/adyen/model/terminal/MessageReference.java delete mode 100644 src/main/java/com/adyen/model/terminal/MessageType.java delete mode 100644 src/main/java/com/adyen/model/terminal/MobileData.java delete mode 100644 src/main/java/com/adyen/model/terminal/OriginalPOITransaction.java delete mode 100644 src/main/java/com/adyen/model/terminal/OutputBarcode.java delete mode 100644 src/main/java/com/adyen/model/terminal/OutputContent.java delete mode 100644 src/main/java/com/adyen/model/terminal/OutputFormat.java delete mode 100644 src/main/java/com/adyen/model/terminal/OutputResult.java delete mode 100644 src/main/java/com/adyen/model/terminal/OutputText.java delete mode 100644 src/main/java/com/adyen/model/terminal/PINFormat.java delete mode 100644 src/main/java/com/adyen/model/terminal/PINRequestType.java delete mode 100644 src/main/java/com/adyen/model/terminal/POIData.java delete mode 100644 src/main/java/com/adyen/model/terminal/POIProfile.java delete mode 100644 src/main/java/com/adyen/model/terminal/POISoftware.java delete mode 100644 src/main/java/com/adyen/model/terminal/POIStatus.java delete mode 100644 src/main/java/com/adyen/model/terminal/POISystemData.java delete mode 100644 src/main/java/com/adyen/model/terminal/POITerminalData.java delete mode 100644 src/main/java/com/adyen/model/terminal/PaymentAccountReq.java delete mode 100644 src/main/java/com/adyen/model/terminal/PaymentAccountStatus.java delete mode 100644 src/main/java/com/adyen/model/terminal/PaymentAcquirerData.java delete mode 100644 src/main/java/com/adyen/model/terminal/PaymentData.java delete mode 100644 src/main/java/com/adyen/model/terminal/PaymentInstrumentData.java delete mode 100644 src/main/java/com/adyen/model/terminal/PaymentInstrumentType.java delete mode 100644 src/main/java/com/adyen/model/terminal/PaymentReceipt.java delete mode 100644 src/main/java/com/adyen/model/terminal/PaymentRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/PaymentResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/PaymentResult.java delete mode 100644 src/main/java/com/adyen/model/terminal/PaymentToken.java delete mode 100644 src/main/java/com/adyen/model/terminal/PaymentTotals.java delete mode 100644 src/main/java/com/adyen/model/terminal/PaymentTransaction.java delete mode 100644 src/main/java/com/adyen/model/terminal/PaymentType.java delete mode 100644 src/main/java/com/adyen/model/terminal/PerformedTransaction.java delete mode 100644 src/main/java/com/adyen/model/terminal/PeriodUnit.java delete mode 100644 src/main/java/com/adyen/model/terminal/Point.java delete mode 100644 src/main/java/com/adyen/model/terminal/PredefinedContent.java delete mode 100644 src/main/java/com/adyen/model/terminal/PrintOutput.java delete mode 100644 src/main/java/com/adyen/model/terminal/PrintRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/PrintResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/PrinterStatus.java delete mode 100644 src/main/java/com/adyen/model/terminal/Rebates.java delete mode 100644 src/main/java/com/adyen/model/terminal/ReconciliationRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/ReconciliationResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/ReconciliationType.java delete mode 100644 src/main/java/com/adyen/model/terminal/RepeatedMessageResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/RepeatedResponseMessageBody.java delete mode 100644 src/main/java/com/adyen/model/terminal/Response.java delete mode 100644 src/main/java/com/adyen/model/terminal/ResponseMode.java delete mode 100644 src/main/java/com/adyen/model/terminal/Result.java delete mode 100644 src/main/java/com/adyen/model/terminal/ReversalReason.java delete mode 100644 src/main/java/com/adyen/model/terminal/ReversalRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/ReversalResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/SaleData.java delete mode 100644 src/main/java/com/adyen/model/terminal/SaleItem.java delete mode 100644 src/main/java/com/adyen/model/terminal/SaleItemRebate.java delete mode 100644 src/main/java/com/adyen/model/terminal/SaleSoftware.java delete mode 100644 src/main/java/com/adyen/model/terminal/SaleTerminalData.java rename src/main/java/com/adyen/{ => model}/terminal/SaleToAcquirerData.java (89%) delete mode 100644 src/main/java/com/adyen/model/terminal/SaleToIssuerData.java delete mode 100644 src/main/java/com/adyen/model/terminal/SecurityTrailer.java delete mode 100644 src/main/java/com/adyen/model/terminal/SensitiveCardData.java delete mode 100644 src/main/java/com/adyen/model/terminal/SensitiveMobileData.java delete mode 100644 src/main/java/com/adyen/model/terminal/SoundAction.java delete mode 100644 src/main/java/com/adyen/model/terminal/SoundContent.java delete mode 100644 src/main/java/com/adyen/model/terminal/SoundFormat.java delete mode 100644 src/main/java/com/adyen/model/terminal/StoredValueAccountID.java delete mode 100644 src/main/java/com/adyen/model/terminal/StoredValueAccountStatus.java delete mode 100644 src/main/java/com/adyen/model/terminal/StoredValueAccountType.java delete mode 100644 src/main/java/com/adyen/model/terminal/StoredValueData.java delete mode 100644 src/main/java/com/adyen/model/terminal/StoredValueRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/StoredValueResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/StoredValueResult.java delete mode 100644 src/main/java/com/adyen/model/terminal/StoredValueTransactionType.java create mode 100644 src/main/java/com/adyen/model/terminal/TerminalAPIRequest.java create mode 100644 src/main/java/com/adyen/model/terminal/TerminalAPIResponse.java create mode 100644 src/main/java/com/adyen/model/terminal/TerminalAPISecuredRequest.java create mode 100644 src/main/java/com/adyen/model/terminal/TerminalAPISecuredResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/TerminalEnvironment.java delete mode 100644 src/main/java/com/adyen/model/terminal/TokenRequestedType.java delete mode 100644 src/main/java/com/adyen/model/terminal/TotalFilter.java delete mode 100644 src/main/java/com/adyen/model/terminal/TrackData.java delete mode 100644 src/main/java/com/adyen/model/terminal/TrackFormat.java delete mode 100644 src/main/java/com/adyen/model/terminal/TransactionAction.java delete mode 100644 src/main/java/com/adyen/model/terminal/TransactionConditions.java delete mode 100644 src/main/java/com/adyen/model/terminal/TransactionIDType.java delete mode 100644 src/main/java/com/adyen/model/terminal/TransactionStatusRequest.java delete mode 100644 src/main/java/com/adyen/model/terminal/TransactionStatusResponse.java delete mode 100644 src/main/java/com/adyen/model/terminal/TransactionTotals.java delete mode 100644 src/main/java/com/adyen/model/terminal/TransactionType.java delete mode 100644 src/main/java/com/adyen/model/terminal/TypeCode.java delete mode 100644 src/main/java/com/adyen/model/terminal/UTMCoordinates.java delete mode 100644 src/main/java/com/adyen/model/terminal/UnitOfMeasure.java rename src/main/java/com/adyen/{ => model}/terminal/security/NexoDerivedKey.java (53%) create mode 100644 src/main/java/com/adyen/model/terminal/security/SaleToPOISecuredMessage.java rename src/main/java/com/adyen/{ => model}/terminal/security/SecurityKey.java (68%) create mode 100644 src/main/java/com/adyen/model/terminal/security/SecurityTrailer.java create mode 100644 src/main/java/com/adyen/serializer/SaleToAcquirerDataSerializer.java delete mode 100644 src/main/java/com/adyen/serializer/TerminalByteArrayDeserializer.java delete mode 100644 src/main/java/com/adyen/serializer/TerminalByteArraySerializer.java rename src/main/java/com/adyen/service/{TerminalConnectedApi.java => PosPayment.java} (75%) delete mode 100644 src/main/java/com/adyen/terminal/ConnectedTerminalsResponse.java delete mode 100644 src/main/java/com/adyen/terminal/SaleToPOIResponse.java delete mode 100644 src/main/java/com/adyen/terminal/TerminalAPIRequest.java delete mode 100644 src/main/java/com/adyen/terminal/TerminalAPIResponse.java delete mode 100644 src/main/java/com/adyen/terminal/security/SaleToPOISecuredMessage.java delete mode 100644 src/main/java/com/adyen/terminal/security/TerminalAPISecuredRequest.java delete mode 100644 src/main/java/com/adyen/terminal/security/TerminalAPISecuredResponse.java create mode 100644 src/main/java/com/adyen/terminal/serialization/ByteArrayToBase64TypeAdapter.java create mode 100644 src/main/java/com/adyen/terminal/serialization/TerminalAPIGsonBuilder.java create mode 100644 src/main/java/com/adyen/terminal/serialization/XMLEnumAdapterFactory.java create mode 100644 src/main/java/com/adyen/terminal/serialization/XMLEnumTypeAdapter.java create mode 100644 src/main/java/com/adyen/terminal/serialization/XMLGregorianCalendarTypeAdapter.java rename src/test/java/com/adyen/{TerminalConnectedApiTest.java => PosPaymentTest.java} (52%) create mode 100644 src/test/java/com/adyen/builders/terminal/TerminalAPIRequestBuilderTest.java create mode 100644 src/test/java/com/adyen/serializer/SaleToAcquirerDataSerializerTest.java create mode 100644 src/test/java/com/adyen/serializer/XMLEnumSerializerTest.java diff --git a/Makefile b/Makefile index 396537ec7..8b48f824b 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ openapi-generator-cli:=java -jar $(openapi-generator-jar) generator:=java library:=jersey3 -modelGen:=terminal acswebhooks balancecontrol balanceplatform binlookup checkout dataprotection legalentitymanagement management payment payout posterminalmanagement recurring transfers storedvalue configurationwebhooks reportwebhooks transferwebhooks managementwebhooks disputes transactionwebhooks +modelGen:=acswebhooks balancecontrol balanceplatform binlookup checkout dataprotection legalentitymanagement management payment payout posterminalmanagement recurring transfers storedvalue configurationwebhooks reportwebhooks transferwebhooks managementwebhooks disputes transactionwebhooks models:=src/main/java/com/adyen/model output:=target/out @@ -53,8 +53,6 @@ managementwebhooks: spec=ManagementNotificationService-v3 # Disputes disputes: spec=DisputeService-v30 disputes: smallServiceName=DisputesApi -# Terminal API -terminal: spec=TerminalAPI-v1 $(modelGen): target/spec $(openapi-generator-jar) rm -rf $(models)/$@ $(output) diff --git a/README.md b/README.md index 515711ad5..739b87f32 100644 --- a/README.md +++ b/README.md @@ -292,18 +292,10 @@ In order to submit In-Person requests with [Terminal API over Cloud](https://doc // Step 1: Import the required classes import com.adyen.Client; import com.adyen.enums.Environment; -import com.adyen.model.applicationinfo.ApplicationInfo; -import com.adyen.model.applicationinfo.CommonField; import com.adyen.service.TerminalCloudAPI; -import com.adyen.terminal.SaleToAcquirerData; -import com.adyen.terminal.SaleToPOIRequest; -import com.adyen.terminal.TerminalAPIRequest; -import com.adyen.terminal.TerminalAPIResponse; +import com.adyen.model.nexo.*; import com.adyen.model.terminal.*; -import java.math.BigDecimal; -import java.time.OffsetDateTime; - // Step 2: Initialize the client object Client client = new Client("Your YOUR_API_KEY", Environment.TEST); @@ -321,21 +313,21 @@ TerminalAPIRequest terminalAPIRequest = new TerminalAPIRequest(); SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest(); MessageHeader messageHeader = new MessageHeader(); -messageHeader.setMessageClass(MessageClass.SERVICE); -messageHeader.setMessageCategory(MessageCategory.PAYMENT); +messageHeader.setMessageClass(MessageClassType.SERVICE); +messageHeader.setMessageCategory(MessageCategoryType.PAYMENT); messageHeader.setMessageType(MessageType.REQUEST); messageHeader.setProtocolVersion("3.0"); messageHeader.setServiceID(serviceID); -messageHeader.setSaleID(saleID); -messageHeader.setPOIID(POIID); +messageHeader.setSaleID(saleID); +messageHeader.setPOIID(POIID); saleToPOIRequest.setMessageHeader(messageHeader); -com.adyen.model.terminal.PaymentRequest paymentRequest = new com.adyen.model.terminal.PaymentRequest(); +com.adyen.model.nexo.PaymentRequest paymentRequest = new com.adyen.model.nexo.PaymentRequest(); SaleData saleData = new SaleData(); -TransactionIDType transactionIdentification = new TransactionIDType(); -transactionIdentification.setTransactionID(transactionID); -OffsetDateTime timestamp = OffsetDateTime.now(); +TransactionIdentification transactionIdentification = new TransactionIdentification(); +transactionIdentification.setTransactionID("001"); +XMLGregorianCalendar timestamp = DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar()); transactionIdentification.setTimeStamp(timestamp); saleData.setSaleTransactionID(transactionIdentification); @@ -346,14 +338,14 @@ merchantApplication.setVersion("1"); merchantApplication.setName("Test"); applicationInfo.setMerchantApplication(merchantApplication); saleToAcquirerData.setApplicationInfo(applicationInfo); -saleData.setSaleToAcquirerData(saleToAcquirerData.toBase64()); - +saleData.setSaleToAcquirerData(saleToAcquirerData); + PaymentTransaction paymentTransaction = new PaymentTransaction(); AmountsReq amountsReq = new AmountsReq(); amountsReq.setCurrency("EUR"); amountsReq.setRequestedAmount(BigDecimal.valueOf(1000)); paymentTransaction.setAmountsReq(amountsReq); - + paymentRequest.setPaymentTransaction(paymentTransaction); paymentRequest.setSaleData(saleData); @@ -373,8 +365,8 @@ TerminalAPIRequest terminalAPIRequest = new TerminalAPIRequest(); SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest(); MessageHeader messageHeader = new MessageHeader(); -messageHeader.setMessageClass(MessageClass.SERVICE); -messageHeader.setMessageCategory(MessageCategory.ABORT); +messageHeader.setMessageClass(MessageClassType.SERVICE); +messageHeader.setMessageCategory(MessageCategoryType.ABORT); messageHeader.setMessageType(MessageType.REQUEST); messageHeader.setProtocolVersion("3.0"); messageHeader.setServiceID("Different service ID"); @@ -384,7 +376,7 @@ messageHeader.setPOIID(POIID); AbortRequest abortRequest = new AbortRequest(); abortRequest.setAbortReason("MerchantAbort"); MessageReference messageReference = new MessageReference(); -messageReference.setMessageCategory(MessageCategory.PAYMENT); +messageReference.setMessageCategory(MessageCategoryType.PAYMENT); messageReference.setSaleID(saleID); messageReference.setPOIID(POIID); // Service ID of the payment you're aborting @@ -417,10 +409,10 @@ messageHeader.setPOIID(POIID); TransactionStatusRequest transactionStatusRequest = new TransactionStatusRequest(); transactionStatusRequest.setReceiptReprintFlag(true); -transactionStatusRequest.getDocumentQualifier().add(DocumentQualifier.CASHIERRECEIPT); -transactionStatusRequest.getDocumentQualifier().add(DocumentQualifier.CUSTOMERRECEIPT); +transactionStatusRequest.getDocumentQualifier().add(DocumentQualifierType.CASHIER_RECEIPT); +transactionStatusRequest.getDocumentQualifier().add(DocumentQualifierType.CUSTOMER_RECEIPT); MessageReference messageReference = new MessageReference(); -messageReference.setMessageCategory(MessageCategory.PAYMENT); +messageReference.setMessageCategory(MessageCategoryType.PAYMENT); messageReference.setSaleID(saleID); // serviceID of the transaction you want the status update from messageReference.setServiceID(serviceID); @@ -444,9 +436,8 @@ import com.adyen.Config; import com.adyen.enums.Environment; import com.adyen.httpclient.TerminalLocalAPIHostnameVerifier; import com.adyen.service.TerminalLocalAPI; -import com.adyen.terminal.TerminalAPIResponse; -import com.adyen.terminal.security.SecurityKey; - +import com.adyen.model.terminal.security.*; +import com.adyen.model.terminal.*; import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManagerFactory; import java.security.KeyStore; @@ -490,8 +481,7 @@ If you wish to develop the Local Terminal API integration parallel to your encry ```java // Step 1: Import the required classes import com.adyen.service.TerminalLocalAPIUnencrypted; -import com.adyen.terminal.TerminalAPIRequest; -import com.adyen.terminal.TerminalAPIResponse; +import com.adyen.model.nexo.*; import com.adyen.model.terminal.*; import javax.net.ssl.SSLContext; diff --git a/src/main/java/com/adyen/builders/terminal/TerminalAPIRequestBuilder.java b/src/main/java/com/adyen/builders/terminal/TerminalAPIRequestBuilder.java new file mode 100644 index 000000000..4de52f9a6 --- /dev/null +++ b/src/main/java/com/adyen/builders/terminal/TerminalAPIRequestBuilder.java @@ -0,0 +1,402 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +package com.adyen.builders.terminal; + +import com.adyen.model.nexo.AbortRequest; +import com.adyen.model.nexo.AdminRequest; +import com.adyen.model.nexo.BalanceInquiryRequest; +import com.adyen.model.nexo.BatchRequest; +import com.adyen.model.nexo.CardAcquisitionRequest; +import com.adyen.model.nexo.CardReaderAPDURequest; +import com.adyen.model.nexo.CardReaderInitRequest; +import com.adyen.model.nexo.CardReaderPowerOffRequest; +import com.adyen.model.nexo.ContentInformation; +import com.adyen.model.nexo.DiagnosisRequest; +import com.adyen.model.nexo.DisplayRequest; +import com.adyen.model.nexo.EnableServiceRequest; +import com.adyen.model.nexo.EventNotification; +import com.adyen.model.nexo.GetTotalsRequest; +import com.adyen.model.nexo.InputRequest; +import com.adyen.model.nexo.InputUpdate; +import com.adyen.model.nexo.LoginRequest; +import com.adyen.model.nexo.LogoutRequest; +import com.adyen.model.nexo.LoyaltyRequest; +import com.adyen.model.nexo.MessageCategoryType; +import com.adyen.model.nexo.MessageClassType; +import com.adyen.model.nexo.MessageHeader; +import com.adyen.model.nexo.MessageType; +import com.adyen.model.nexo.PINRequest; +import com.adyen.model.nexo.PaymentRequest; +import com.adyen.model.nexo.PrintRequest; +import com.adyen.model.nexo.ReconciliationRequest; +import com.adyen.model.nexo.ReversalRequest; +import com.adyen.model.nexo.SaleToPOIRequest; +import com.adyen.model.nexo.SoundRequest; +import com.adyen.model.nexo.StoredValueRequest; +import com.adyen.model.nexo.TransactionStatusRequest; +import com.adyen.model.nexo.TransmitRequest; +import com.adyen.model.terminal.TerminalAPIRequest; + +import static com.adyen.constants.ApiConstants.TerminalAPI.PROTOCOL_VERSION; + +public final class TerminalAPIRequestBuilder { + + // MessageHeader + private final MessageHeader messageHeader; + private MessageClassType messageClass; + private MessageCategoryType messageCategory; + + // SaleToPOIRequest + private AbortRequest abortRequest; + private BalanceInquiryRequest balanceInquiryRequest; + private BatchRequest batchRequest; + private CardAcquisitionRequest cardAcquisitionRequest; + private AdminRequest adminRequest; + private DiagnosisRequest diagnosisRequest; + private DisplayRequest displayRequest; + private EnableServiceRequest enableServiceRequest; + private EventNotification eventNotification; + private GetTotalsRequest getTotalsRequest; + private InputRequest inputRequest; + private InputUpdate inputUpdate; + private LoginRequest loginRequest; + private LogoutRequest logoutRequest; + private LoyaltyRequest loyaltyRequest; + private PaymentRequest paymentRequest; + private PINRequest pinRequest; + private PrintRequest printRequest; + private CardReaderInitRequest cardReaderInitRequest; + private CardReaderAPDURequest cardReaderAPDURequest; + private CardReaderPowerOffRequest cardReaderPowerOffRequest; + private ReconciliationRequest reconciliationRequest; + private ReversalRequest reversalRequest; + private SoundRequest soundRequest; + private StoredValueRequest storedValueRequest; + private TransactionStatusRequest transactionStatusRequest; + private TransmitRequest transmitRequest; + private ContentInformation securityTrailer; + + public TerminalAPIRequestBuilder(String saleId, String serviceId, String poiId) { + messageHeader = new MessageHeader(); + messageHeader.setProtocolVersion(PROTOCOL_VERSION); + messageHeader.setMessageType(MessageType.REQUEST); + messageHeader.setSaleID(saleId); + messageHeader.setServiceID(serviceId); + messageHeader.setPOIID(poiId); + } + + public TerminalAPIRequestBuilder withAbortRequest(AbortRequest abortRequest) { + this.messageClass = MessageClassType.SERVICE; + this.messageCategory = MessageCategoryType.ABORT; + this.abortRequest = abortRequest; + return this; + } + + public TerminalAPIRequestBuilder withBalanceInquiryRequest(BalanceInquiryRequest balanceInquiryRequest) { + this.messageClass = MessageClassType.SERVICE; + this.messageCategory = MessageCategoryType.BALANCE_INQUIRY; + this.balanceInquiryRequest = balanceInquiryRequest; + return this; + } + + public TerminalAPIRequestBuilder withBatchRequest(BatchRequest batchRequest) { + this.messageClass = MessageClassType.SERVICE; + this.messageCategory = MessageCategoryType.BATCH; + this.batchRequest = batchRequest; + return this; + } + + public TerminalAPIRequestBuilder withCardAcquisitionRequest(CardAcquisitionRequest cardAcquisitionRequest) { + this.messageClass = MessageClassType.SERVICE; + this.messageCategory = MessageCategoryType.CARD_ACQUISITION; + this.cardAcquisitionRequest = cardAcquisitionRequest; + return this; + } + + public TerminalAPIRequestBuilder withAdminRequest(AdminRequest adminRequest) { + this.messageClass = MessageClassType.SERVICE; + this.messageCategory = MessageCategoryType.ADMIN; + this.adminRequest = adminRequest; + return this; + } + + public TerminalAPIRequestBuilder withDiagnosisRequest(DiagnosisRequest diagnosisRequest) { + this.messageClass = MessageClassType.SERVICE; + this.messageCategory = MessageCategoryType.DIAGNOSIS; + this.diagnosisRequest = diagnosisRequest; + return this; + } + + public TerminalAPIRequestBuilder withDisplayRequest(DisplayRequest displayRequest) { + this.messageClass = MessageClassType.DEVICE; + this.messageCategory = MessageCategoryType.DISPLAY; + this.displayRequest = displayRequest; + return this; + } + + public TerminalAPIRequestBuilder withEnableServiceRequest(EnableServiceRequest enableServiceRequest) { + this.messageClass = MessageClassType.SERVICE; + this.messageCategory = MessageCategoryType.ENABLE_SERVICE; + this.enableServiceRequest = enableServiceRequest; + return this; + } + + public TerminalAPIRequestBuilder withEventNotification(EventNotification eventNotification) { + this.messageClass = MessageClassType.EVENT; + this.messageCategory = MessageCategoryType.EVENT; + this.eventNotification = eventNotification; + return this; + } + + public TerminalAPIRequestBuilder withGetTotalsRequest(GetTotalsRequest getTotalsRequest) { + this.messageClass = MessageClassType.SERVICE; + this.messageCategory = MessageCategoryType.GET_TOTALS; + this.getTotalsRequest = getTotalsRequest; + return this; + } + + public TerminalAPIRequestBuilder withInputRequest(InputRequest inputRequest) { + this.messageClass = MessageClassType.DEVICE; + this.messageCategory = MessageCategoryType.INPUT; + this.inputRequest = inputRequest; + return this; + } + + public TerminalAPIRequestBuilder withInputUpdate(InputUpdate inputUpdate) { + this.messageClass = MessageClassType.DEVICE; + this.messageCategory = MessageCategoryType.INPUT_UPDATE; + this.inputUpdate = inputUpdate; + return this; + } + + public TerminalAPIRequestBuilder withLoginRequest(LoginRequest loginRequest) { + this.messageClass = MessageClassType.SERVICE; + this.messageCategory = MessageCategoryType.LOGIN; + this.loginRequest = loginRequest; + return this; + } + + public TerminalAPIRequestBuilder withLogoutRequest(LogoutRequest logoutRequest) { + this.messageClass = MessageClassType.SERVICE; + this.messageCategory = MessageCategoryType.LOGOUT; + this.logoutRequest = logoutRequest; + return this; + } + + public TerminalAPIRequestBuilder withLoyaltyRequest(LoyaltyRequest loyaltyRequest) { + this.messageClass = MessageClassType.SERVICE; + this.messageCategory = MessageCategoryType.LOYALTY; + this.loyaltyRequest = loyaltyRequest; + return this; + } + + public TerminalAPIRequestBuilder withPaymentRequest(PaymentRequest paymentRequest) { + this.messageClass = MessageClassType.SERVICE; + this.messageCategory = MessageCategoryType.PAYMENT; + this.paymentRequest = paymentRequest; + return this; + } + + public TerminalAPIRequestBuilder withPinRequest(PINRequest pinRequest) { + this.messageClass = MessageClassType.DEVICE; + this.messageCategory = MessageCategoryType.PIN; + this.pinRequest = pinRequest; + return this; + } + + public TerminalAPIRequestBuilder withPrintRequest(PrintRequest printRequest) { + this.messageClass = MessageClassType.DEVICE; + this.messageCategory = MessageCategoryType.PRINT; + this.printRequest = printRequest; + return this; + } + + public TerminalAPIRequestBuilder withCardReaderInitRequest(CardReaderInitRequest cardReaderInitRequest) { + this.messageClass = MessageClassType.DEVICE; + this.messageCategory = MessageCategoryType.CARD_READER_INIT; + this.cardReaderInitRequest = cardReaderInitRequest; + return this; + } + + public TerminalAPIRequestBuilder withCardReaderAPDURequest(CardReaderAPDURequest cardReaderAPDURequest) { + this.messageClass = MessageClassType.DEVICE; + this.messageCategory = MessageCategoryType.CARD_READER_APDU; + this.cardReaderAPDURequest = cardReaderAPDURequest; + return this; + } + + public TerminalAPIRequestBuilder withCardReaderPowerOffRequest(CardReaderPowerOffRequest cardReaderPowerOffRequest) { + this.messageClass = MessageClassType.DEVICE; + this.messageCategory = MessageCategoryType.CARD_READER_POWER_OFF; + this.cardReaderPowerOffRequest = cardReaderPowerOffRequest; + return this; + } + + public TerminalAPIRequestBuilder withReconciliationRequest(ReconciliationRequest reconciliationRequest) { + this.messageClass = MessageClassType.SERVICE; + this.messageCategory = MessageCategoryType.RECONCILIATION; + this.reconciliationRequest = reconciliationRequest; + return this; + } + + public TerminalAPIRequestBuilder withReversalRequest(ReversalRequest reversalRequest) { + this.messageClass = MessageClassType.SERVICE; + this.messageCategory = MessageCategoryType.REVERSAL; + this.reversalRequest = reversalRequest; + return this; + } + + public TerminalAPIRequestBuilder withSoundRequest(SoundRequest soundRequest) { + this.messageClass = MessageClassType.DEVICE; + this.messageCategory = MessageCategoryType.SOUND; + this.soundRequest = soundRequest; + return this; + } + + public TerminalAPIRequestBuilder withStoredValueRequest(StoredValueRequest storedValueRequest) { + this.messageClass = MessageClassType.SERVICE; + this.messageCategory = MessageCategoryType.STORED_VALUE; + this.storedValueRequest = storedValueRequest; + return this; + } + + public TerminalAPIRequestBuilder withTransactionStatusRequest(TransactionStatusRequest transactionStatusRequest) { + this.messageClass = MessageClassType.SERVICE; + this.messageCategory = MessageCategoryType.TRANSACTION_STATUS; + this.transactionStatusRequest = transactionStatusRequest; + return this; + } + + public TerminalAPIRequestBuilder withTransmitRequest(TransmitRequest transmitRequest) { + this.messageClass = MessageClassType.DEVICE; + this.messageCategory = MessageCategoryType.TRANSMIT; + this.transmitRequest = transmitRequest; + return this; + } + + public TerminalAPIRequestBuilder withSecurityTrailer(ContentInformation securityTrailer) { + this.securityTrailer = securityTrailer; + return this; + } + + public TerminalAPIRequest build() { + messageHeader.setMessageClass(messageClass); + messageHeader.setMessageCategory(messageCategory); + + SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest(); + saleToPOIRequest.setMessageHeader(messageHeader); + saleToPOIRequest.setSecurityTrailer(securityTrailer); + + if (messageCategory != null) { + switch (messageCategory) { + case PAYMENT: + saleToPOIRequest.setPaymentRequest(paymentRequest); + break; + case TRANSACTION_STATUS: + saleToPOIRequest.setTransactionStatusRequest(transactionStatusRequest); + break; + case ABORT: + saleToPOIRequest.setAbortRequest(abortRequest); + break; + case REVERSAL: + saleToPOIRequest.setReversalRequest(reversalRequest); + break; + case CARD_ACQUISITION: + saleToPOIRequest.setCardAcquisitionRequest(cardAcquisitionRequest); + break; + case BALANCE_INQUIRY: + saleToPOIRequest.setBalanceInquiryRequest(balanceInquiryRequest); + break; + case BATCH: + saleToPOIRequest.setBatchRequest(batchRequest); + break; + case ADMIN: + saleToPOIRequest.setAdminRequest(adminRequest); + break; + case DIAGNOSIS: + saleToPOIRequest.setDiagnosisRequest(diagnosisRequest); + break; + case DISPLAY: + saleToPOIRequest.setDisplayRequest(displayRequest); + break; + case EVENT: + saleToPOIRequest.setEventNotification(eventNotification); + break; + case ENABLE_SERVICE: + saleToPOIRequest.setEnableServiceRequest(enableServiceRequest); + break; + case GET_TOTALS: + saleToPOIRequest.setGetTotalsRequest(getTotalsRequest); + break; + case INPUT: + saleToPOIRequest.setInputRequest(inputRequest); + break; + case INPUT_UPDATE: + saleToPOIRequest.setInputUpdate(inputUpdate); + break; + case LOGIN: + saleToPOIRequest.setLoginRequest(loginRequest); + break; + case LOGOUT: + saleToPOIRequest.setLogoutRequest(logoutRequest); + break; + case LOYALTY: + saleToPOIRequest.setLoyaltyRequest(loyaltyRequest); + break; + case PIN: + saleToPOIRequest.setPINRequest(pinRequest); + break; + case PRINT: + saleToPOIRequest.setPrintRequest(printRequest); + break; + case CARD_READER_INIT: + saleToPOIRequest.setCardReaderInitRequest(cardReaderInitRequest); + break; + case CARD_READER_APDU: + saleToPOIRequest.setCardReaderAPDURequest(cardReaderAPDURequest); + break; + case CARD_READER_POWER_OFF: + saleToPOIRequest.setCardReaderPowerOffRequest(cardReaderPowerOffRequest); + break; + case RECONCILIATION: + saleToPOIRequest.setReconciliationRequest(reconciliationRequest); + break; + case SOUND: + saleToPOIRequest.setSoundRequest(soundRequest); + break; + case STORED_VALUE: + saleToPOIRequest.setStoredValueRequest(storedValueRequest); + break; + case TRANSMIT: + saleToPOIRequest.setTransmitRequest(transmitRequest); + break; + default: + break; + } + } + + TerminalAPIRequest terminalAPIRequest = new TerminalAPIRequest(); + terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest); + + return terminalAPIRequest; + } +} diff --git a/src/main/java/com/adyen/model/ApiError.java b/src/main/java/com/adyen/model/ApiError.java index 3941a5215..b149f3635 100644 --- a/src/main/java/com/adyen/model/ApiError.java +++ b/src/main/java/com/adyen/model/ApiError.java @@ -278,15 +278,17 @@ public int hashCode() { @Override public String toString() { - return "class ServiceError {\n" + - " invalidFields: " + toIndentedString(invalidFields) + "\n" + - " additionalData: " + toIndentedString(additionalData) + "\n" + - " errorCode: " + toIndentedString(errorCode) + "\n" + - " errorType: " + toIndentedString(errorType) + "\n" + - " message: " + toIndentedString(message) + "\n" + - " pspReference: " + toIndentedString(pspReference) + "\n" + - " status: " + toIndentedString(status) + "\n" + - "}"; + StringBuilder sb = new StringBuilder(); + sb.append("class ServiceError {\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" additionalData: ").append(toIndentedString(additionalData)).append("\n"); + sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); + sb.append(" errorType: ").append(toIndentedString(errorType)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); } /** diff --git a/src/main/java/com/adyen/model/InvalidField.java b/src/main/java/com/adyen/model/InvalidField.java index 685f538d6..305cd2b63 100644 --- a/src/main/java/com/adyen/model/InvalidField.java +++ b/src/main/java/com/adyen/model/InvalidField.java @@ -150,11 +150,13 @@ public int hashCode() { @Override public String toString() { - return "class InvalidField {\n" + - " message: " + toIndentedString(message) + "\n" + - " name: " + toIndentedString(name) + "\n" + - " value: " + toIndentedString(value) + "\n" + - "}"; + StringBuilder sb = new StringBuilder(); + sb.append("class InvalidField {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); } /** diff --git a/src/main/java/com/adyen/model/nexo/AbortRequest.java b/src/main/java/com/adyen/model/nexo/AbortRequest.java new file mode 100644 index 000000000..db8bd06b6 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/AbortRequest.java @@ -0,0 +1,113 @@ +package com.adyen.model.nexo; + +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 identification of the messageType request carrying the transaction to abort. A messageType to display on the CustomerError Device could be sent by the Sale System (DisplayOutput). + * + *

Java class for AbortRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="AbortRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MessageReference" type="{}MessageReference"/>
+ *         <element name="AbortReason" type="{}AbortReason"/>
+ *         <element name="DisplayOutput" type="{}DisplayOutput" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AbortRequest", propOrder = { + "messageReference", + "abortReason", + "displayOutput" +}) +public class AbortRequest { + + /** + * The Message reference. + */ + @XmlElement(name = "MessageReference", required = true) + @Schema(description = "Identification of a previous POI transaction.") + protected MessageReference messageReference; + /** + * The Abort reason. + */ + @XmlElement(name = "AbortReason", required = true) + @Schema(description = "Reason of aborting a transaction") + protected String abortReason; + /** + * The Display output. + */ + @XmlElement(name = "DisplayOutput") + @Schema(description = "Information to display and the way to process the display. --Rule: To display an abort message to the Customer") + protected DisplayOutput displayOutput; + + /** + * Gets the value of the messageReference property. + * + * @return possible object is {@link MessageReference } + */ + public MessageReference getMessageReference() { + return messageReference; + } + + /** + * Sets the value of the messageReference property. + * + * @param value allowed object is {@link MessageReference } + */ + public void setMessageReference(MessageReference value) { + this.messageReference = value; + } + + /** + * Gets the value of the abortReason property. + * + * @return possible object is {@link String } + */ + public String getAbortReason() { + return abortReason; + } + + /** + * Sets the value of the abortReason property. + * + * @param value allowed object is {@link String } + */ + public void setAbortReason(String value) { + this.abortReason = value; + } + + /** + * Gets the value of the displayOutput property. + * + * @return possible object is {@link DisplayOutput } + */ + public DisplayOutput getDisplayOutput() { + return displayOutput; + } + + /** + * Sets the value of the displayOutput property. + * + * @param value allowed object is {@link DisplayOutput } + */ + public void setDisplayOutput(DisplayOutput value) { + this.displayOutput = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/AccountType.java b/src/main/java/com/adyen/model/nexo/AccountType.java new file mode 100644 index 000000000..b5c2db223 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/AccountType.java @@ -0,0 +1,119 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for AccountType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="AccountType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Default"/>
+ *     <enumeration value="Savings"/>
+ *     <enumeration value="Checking"/>
+ *     <enumeration value="CreditCard"/>
+ *     <enumeration value="Universal"/>
+ *     <enumeration value="Investment"/>
+ *     <enumeration value="CardTotals"/>
+ *     <enumeration value="EpurseCard"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "AccountType") +@XmlEnum +public enum AccountType { + + + /** + * Default account + */ + @XmlEnumValue("Default") + @Schema(description = "Default account") + DEFAULT("Default"), + + /** + * Savings account + */ + @XmlEnumValue("Savings") + @Schema(description = "Savings account") + SAVINGS("Savings"), + + /** + * Checking account + */ + @XmlEnumValue("Checking") + @Schema(description = "Checking account") + CHECKING("Checking"), + + /** + * Credit card account + */ + @XmlEnumValue("CreditCard") + @Schema(description = "Credit card account") + CREDIT_CARD("CreditCard"), + + /** + * Universal account + */ + @XmlEnumValue("Universal") + @Schema(description = "Universal account") + UNIVERSAL("Universal"), + + /** + * Investment account + */ + @XmlEnumValue("Investment") + @Schema(description = "Investment account") + INVESTMENT("Investment"), + + /** + * Card totals + */ + @XmlEnumValue("CardTotals") + @Schema(description = "Card totals") + CARD_TOTALS("CardTotals"), + + /** + * e-Purse card account + */ + @XmlEnumValue("EpurseCard") + @Schema(description = "e-Purse card account") + EPURSE_CARD("EpurseCard"); + + private final String value; + + AccountType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value account type. + * + * @param v the v + * @return the account type + */ + public static AccountType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/AdminRequest.java b/src/main/java/com/adyen/model/nexo/AdminRequest.java new file mode 100644 index 000000000..542a20cd4 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/AdminRequest.java @@ -0,0 +1,61 @@ +package com.adyen.model.nexo; + +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 + * + *

Java class for AdminRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="AdminRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ServiceIdentification" type="{}ServiceIdentification" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AdminRequest", propOrder = { + "serviceIdentification" +}) +public class AdminRequest { + + /** + * The Service identification. + */ + @XmlElement(name = "ServiceIdentification") + @Schema(description = "Identification of the administrative service to process.") + protected String serviceIdentification; + + /** + * Gets the value of the serviceIdentification property. + * + * @return possible object is {@link String } + */ + public String getServiceIdentification() { + return serviceIdentification; + } + + /** + * Sets the value of the serviceIdentification property. + * + * @param value allowed object is {@link String } + */ + public void setServiceIdentification(String value) { + this.serviceIdentification = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/AdminResponse.java b/src/main/java/com/adyen/model/nexo/AdminResponse.java new file mode 100644 index 000000000..281af2680 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/AdminResponse.java @@ -0,0 +1,61 @@ +package com.adyen.model.nexo; + +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 the Custom Admin. + * + *

Java class for AdminResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="AdminResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AdminResponse", propOrder = { + "response" +}) +public class AdminResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/AlgorithmIdentifier.java b/src/main/java/com/adyen/model/nexo/AlgorithmIdentifier.java new file mode 100644 index 000000000..a0d391b41 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/AlgorithmIdentifier.java @@ -0,0 +1,82 @@ +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; + + +/** + * Definition: Identification of a cryptographic algorithm -- Reference: RFC 3880: Internet X.509 Public Key Infrastructure Certificate and Certificate -- Usage: This data structure contains: the algorithm identifier associated parameters + * + *

Java class for AlgorithmIdentifier complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="AlgorithmIdentifier">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Parameter" type="{}Parameter" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Algorithm" use="required" type="{}AlgorithmType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AlgorithmIdentifier", propOrder = { + "parameter" +}) +public class AlgorithmIdentifier { + + /** + * The Parameter. + */ + @XmlElement(name = "Parameter") + protected Parameter parameter; + /** + * The Algorithm. + */ + @XmlElement(name = "Algorithm", required = true) + protected AlgorithmType algorithm; + + /** + * Gets the value of the parameter property. + * + * @return possible object is {@link Parameter } + */ + public Parameter getParameter() { + return parameter; + } + + /** + * Sets the value of the parameter property. + * + * @param value allowed object is {@link Parameter } + */ + public void setParameter(Parameter value) { + this.parameter = value; + } + + /** + * Gets the value of the algorithm property. + * + * @return possible object is {@link AlgorithmType } + */ + public AlgorithmType getAlgorithm() { + return algorithm; + } + + /** + * Sets the value of the algorithm property. + * + * @param value allowed object is {@link AlgorithmType } + */ + public void setAlgorithm(AlgorithmType value) { + this.algorithm = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/AlgorithmType.java b/src/main/java/com/adyen/model/nexo/AlgorithmType.java new file mode 100644 index 000000000..0cff3800a --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/AlgorithmType.java @@ -0,0 +1,115 @@ +package com.adyen.model.nexo; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for AlgorithmType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="AlgorithmType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="id-retail-cbc-mac"/>
+ *     <enumeration value="id-retail-cbc-mac-sha-256"/>
+ *     <enumeration value="id-ukpt-wrap "/>
+ *     <enumeration value="id-dukpt-wrap"/>
+ *     <enumeration value="des-ede3-ecb"/>
+ *     <enumeration value="des-ede3-cbc"/>
+ *     <enumeration value="id-sha256"/>
+ *     <enumeration value="sha256WithRSAEncryption"/>
+ *     <enumeration value="rsaEncryption"/>
+ *   </restriction>
+ * </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") + 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") + 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 ") + 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") + 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") + 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") + 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") + 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") + 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") + RSA_ENCRYPTION("rsaEncryption"); + private final String value; + + AlgorithmType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value algorithm type. + * + * @param v the v + * @return the algorithm type + */ + public static AlgorithmType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/AlignmentType.java b/src/main/java/com/adyen/model/nexo/AlignmentType.java new file mode 100644 index 000000000..a1b9f00c0 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/AlignmentType.java @@ -0,0 +1,76 @@ +package com.adyen.model.nexo; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for AlignmentType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="AlignmentType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Left"/>
+ *     <enumeration value="Right"/>
+ *     <enumeration value="Centred"/>
+ *     <enumeration value="Justified"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "AlignmentType") +@XmlEnum +public enum AlignmentType { + + /** + * Left alignment type. + */ + @XmlEnumValue("Left") + LEFT("Left"), + /** + * Right alignment type. + */ + @XmlEnumValue("Right") + RIGHT("Right"), + /** + * Centred alignment type. + */ + @XmlEnumValue("Centred") + CENTRED("Centred"), + /** + * Justified alignment type. + */ + @XmlEnumValue("Justified") + JUSTIFIED("Justified"); + private final String value; + + AlignmentType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value alignment type. + * + * @param v the v + * @return the alignment type + */ + public static AlignmentType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/AllowedProduct.java b/src/main/java/com/adyen/model/nexo/AllowedProduct.java new file mode 100644 index 000000000..861cd77b2 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/AllowedProduct.java @@ -0,0 +1,137 @@ +package com.adyen.model.nexo; + +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 payable by a card. + * + *

Java class for AllowedProduct complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="AllowedProduct">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ProductLabel" type="{}ProductLabel" minOccurs="0"/>
+ *         <element name="AdditionalProductInfo" type="{}AdditionalProductInfo" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="ProductCode" use="required" type="{}ProductCode" />
+ *       <attribute name="EanUpc" type="{}EanUpc" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AllowedProduct", propOrder = { + "productLabel", + "additionalProductInfo" +}) +public class AllowedProduct { + + /** + * The Product label. + */ + @XmlElement(name = "ProductLabel") + @Schema(description = "Product name of an item purchased with the transaction.") + protected String productLabel; + /** + * The Additional product info. + */ + @XmlElement(name = "AdditionalProductInfo") + @Schema(description = "Additionl information related to the line item.") + protected String additionalProductInfo; + /** + * The Product code. + */ + @XmlElement(name = "ProductCode", required = true) + @Schema(description = "Product code of item purchased with the transaction.") + protected String productCode; + /** + * The Ean upc. + */ + @XmlElement(name = "EanUpc") + @Schema(description = "Standard product code of item purchased with the transaction.") + protected String eanUpc; + + /** + * Gets the value of the productLabel property. + * + * @return possible object is {@link String } + */ + public String getProductLabel() { + return productLabel; + } + + /** + * Sets the value of the productLabel property. + * + * @param value allowed object is {@link String } + */ + public void setProductLabel(String value) { + this.productLabel = value; + } + + /** + * Gets the value of the additionalProductInfo property. + * + * @return possible object is {@link String } + */ + public String getAdditionalProductInfo() { + return additionalProductInfo; + } + + /** + * Sets the value of the additionalProductInfo property. + * + * @param value allowed object is {@link String } + */ + public void setAdditionalProductInfo(String value) { + this.additionalProductInfo = value; + } + + /** + * Gets the value of the productCode property. + * + * @return possible object is {@link String } + */ + public String getProductCode() { + return productCode; + } + + /** + * Sets the value of the productCode property. + * + * @param value allowed object is {@link String } + */ + public void setProductCode(String value) { + this.productCode = value; + } + + /** + * Gets the value of the eanUpc property. + * + * @return possible object is {@link String } + */ + public String getEanUpc() { + return eanUpc; + } + + /** + * Sets the value of the eanUpc property. + * + * @param value allowed object is {@link String } + */ + public void setEanUpc(String value) { + this.eanUpc = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/Amount.java b/src/main/java/com/adyen/model/nexo/Amount.java new file mode 100644 index 000000000..8c51e7f2b --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/Amount.java @@ -0,0 +1,81 @@ +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 java.math.BigDecimal; + + +/** + * Definition: Common amount definition with currency -- Usage: Decimal unsigned amount with currency and amount before conversion. + * + *

Java class for Amount complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Amount">
+ *   <simpleContent>
+ *     <extension base="Decimal">
+ *       <attribute name="Currency" type="{}ISOCurrency3A" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Amount", propOrder = { + "amountValue", + "currency" +}) +public class Amount { + + /** + * The Value. + */ + @XmlElement(name = "AmountValue") + protected BigDecimal amountValue; + /** + * The Currency. + */ + @XmlElement(name = "Currency") + protected String currency; + + /** + * Gets the value of the amountValue property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getAmountValue() { + return amountValue; + } + + /** + * Sets the value of the amountValue property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setAmountValue(BigDecimal value) { + this.amountValue = value; + } + + /** + * Gets the value of the currency property. + * + * @return possible object is {@link String } + */ + public String getCurrency() { + return currency; + } + + /** + * Sets the value of the currency property. + * + * @param value allowed object is {@link String } + */ + public void setCurrency(String value) { + this.currency = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/AmountsReq.java b/src/main/java/com/adyen/model/nexo/AmountsReq.java new file mode 100644 index 000000000..301ed9e42 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/AmountsReq.java @@ -0,0 +1,233 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; + + +/** + * Definition: Various amounts related to the payment and loyalty request from the Sale System. -- Usage: Amounts requested by the Sale System for the payment and loyalty transaction, containing: The currency which is the same for all these amounts The requested amount to pay The cash back part of the requested amount for a payment with cash + * + *

Java class for AmountsReq complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="AmountsReq">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="Currency" use="required" type="{}ISOCurrency3A" />
+ *       <attribute name="RequestedAmount" type="{}SimpleAmountType" />
+ *       <attribute name="CashBackAmount" type="{}SimpleAmountType" />
+ *       <attribute name="TipAmount" type="{}SimpleAmountType" />
+ *       <attribute name="PaidAmount" type="{}SimpleAmountType" />
+ *       <attribute name="MinimumAmountToDeliver" type="{}SimpleAmountType" />
+ *       <attribute name="MaximumCashBackAmount" type="{}SimpleAmountType" />
+ *       <attribute name="MinimumSplitAmount" type="{}SimpleAmountType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AmountsReq") +public class AmountsReq { + + /** + * The Currency. + */ + @XmlElement(name = "Currency", required = true) + @Schema(description = "Currency of a monetary amount.") + protected String currency; + /** + * The Requested amount. + */ + @XmlElement(name = "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") + @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") + @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") + @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") + @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") + @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") + @Schema(description = "Minimum amount of a split, which could be requested by a Customer. --Rule: Minimum amount of a split, which could be requested.") + protected BigDecimal minimumSplitAmount; + + /** + * Gets the value of the currency property. + * + * @return possible object is {@link String } + */ + public String getCurrency() { + return currency; + } + + /** + * Sets the value of the currency property. + * + * @param value allowed object is {@link String } + */ + public void setCurrency(String value) { + this.currency = value; + } + + /** + * Gets the value of the requestedAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getRequestedAmount() { + return requestedAmount; + } + + /** + * Sets the value of the requestedAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setRequestedAmount(BigDecimal value) { + this.requestedAmount = value; + } + + /** + * Gets the value of the cashBackAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getCashBackAmount() { + return cashBackAmount; + } + + /** + * Sets the value of the cashBackAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setCashBackAmount(BigDecimal value) { + this.cashBackAmount = value; + } + + /** + * Gets the value of the tipAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getTipAmount() { + return tipAmount; + } + + /** + * Sets the value of the tipAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setTipAmount(BigDecimal value) { + this.tipAmount = value; + } + + /** + * Gets the value of the paidAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getPaidAmount() { + return paidAmount; + } + + /** + * Sets the value of the paidAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setPaidAmount(BigDecimal value) { + this.paidAmount = value; + } + + /** + * Gets the value of the minimumAmountToDeliver property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getMinimumAmountToDeliver() { + return minimumAmountToDeliver; + } + + /** + * Sets the value of the minimumAmountToDeliver property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setMinimumAmountToDeliver(BigDecimal value) { + this.minimumAmountToDeliver = value; + } + + /** + * Gets the value of the maximumCashBackAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getMaximumCashBackAmount() { + return maximumCashBackAmount; + } + + /** + * Sets the value of the maximumCashBackAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setMaximumCashBackAmount(BigDecimal value) { + this.maximumCashBackAmount = value; + } + + /** + * Gets the value of the minimumSplitAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getMinimumSplitAmount() { + return minimumSplitAmount; + } + + /** + * Sets the value of the minimumSplitAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setMinimumSplitAmount(BigDecimal value) { + this.minimumSplitAmount = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/AmountsResp.java b/src/main/java/com/adyen/model/nexo/AmountsResp.java new file mode 100644 index 000000000..21093a52f --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/AmountsResp.java @@ -0,0 +1,183 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; + + +/** + * Definition: Various amounts related to the payment response from the POI System. -- Usage: Amounts approved by the POI and the Acquirer for the payment and loyalty transaction, containing: The authorised amount to be paid The amount of the rebates The amount of financial fees The cash back part of the requested amount for a + * + *

Java class for AmountsResp complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="AmountsResp">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="Currency" type="{}ISOCurrency3A" />
+ *       <attribute name="AuthorizedAmount" use="required" type="{}SimpleAmountType" />
+ *       <attribute name="TotalRebatesAmount" type="{}SimpleAmountType" />
+ *       <attribute name="TotalFeesAmount" type="{}SimpleAmountType" />
+ *       <attribute name="CashBackAmount" type="{}SimpleAmountType" />
+ *       <attribute name="TipAmount" type="{}SimpleAmountType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AmountsResp") +public class AmountsResp { + + /** + * The Currency. + */ + @XmlElement(name = "Currency") + @Schema(description = "Currency of a monetary amount. --Rule: Mandatory for currency conversion.") + protected String currency; + /** + * The Authorized amount. + */ + @XmlElement(name = "AuthorizedAmount", required = true) + @Schema(description = "The amount authorized by the Acquirer for the payment transaction.") + protected BigDecimal authorizedAmount; + /** + * The Total rebates amount. + */ + @XmlElement(name = "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") + @Schema(description = "Total amount of financial fees.") + protected BigDecimal totalFeesAmount; + /** + * The Cash back amount. + */ + @XmlElement(name = "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") + @Schema(description = "Amount paid for a tip. --Rule: If payment with tip requested by the Sale System.") + protected BigDecimal tipAmount; + + /** + * Gets the value of the currency property. + * + * @return possible object is {@link String } + */ + public String getCurrency() { + return currency; + } + + /** + * Sets the value of the currency property. + * + * @param value allowed object is {@link String } + */ + public void setCurrency(String value) { + this.currency = value; + } + + /** + * Gets the value of the authorizedAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getAuthorizedAmount() { + return authorizedAmount; + } + + /** + * Sets the value of the authorizedAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setAuthorizedAmount(BigDecimal value) { + this.authorizedAmount = value; + } + + /** + * Gets the value of the totalRebatesAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getTotalRebatesAmount() { + return totalRebatesAmount; + } + + /** + * Sets the value of the totalRebatesAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setTotalRebatesAmount(BigDecimal value) { + this.totalRebatesAmount = value; + } + + /** + * Gets the value of the totalFeesAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getTotalFeesAmount() { + return totalFeesAmount; + } + + /** + * Sets the value of the totalFeesAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setTotalFeesAmount(BigDecimal value) { + this.totalFeesAmount = value; + } + + /** + * Gets the value of the cashBackAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getCashBackAmount() { + return cashBackAmount; + } + + /** + * Sets the value of the cashBackAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setCashBackAmount(BigDecimal value) { + this.cashBackAmount = value; + } + + /** + * Gets the value of the tipAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getTipAmount() { + return tipAmount; + } + + /** + * Sets the value of the tipAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setTipAmount(BigDecimal value) { + this.tipAmount = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/AreaSize.java b/src/main/java/com/adyen/model/nexo/AreaSize.java new file mode 100644 index 000000000..442f762c4 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/AreaSize.java @@ -0,0 +1,82 @@ +package com.adyen.model.nexo; + +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 written, given with the maximum abissa and ordinate values (X and Y). The maximum value is "FFFF". + * + *

Java class for AreaSize complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="AreaSize">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="X" use="required" type="{}X" />
+ *       <attribute name="Y" use="required" type="{}Y" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AreaSize") +public class AreaSize { + + /** + * The X. + */ + @XmlElement(name = "X", required = true) + @Schema(description = "Abscissa of a point coordinates.") + protected String x; + /** + * The Y. + */ + @XmlElement(name = "Y", required = true) + @Schema(description = "Ordinate of a point coordinates.") + protected String y; + + /** + * Gets the value of the x property. + * + * @return possible object is {@link String } + */ + public String getX() { + return x; + } + + /** + * Sets the value of the x property. + * + * @param value allowed object is {@link String } + */ + public void setX(String value) { + this.x = value; + } + + /** + * Gets the value of the y property. + * + * @return possible object is {@link String } + */ + public String getY() { + return y; + } + + /** + * Sets the value of the y property. + * + * @param value allowed object is {@link String } + */ + public void setY(String value) { + this.y = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/AttributeType.java b/src/main/java/com/adyen/model/nexo/AttributeType.java new file mode 100644 index 000000000..9062886e2 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/AttributeType.java @@ -0,0 +1,87 @@ +package com.adyen.model.nexo; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for AttributeType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="AttributeType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="id-at-commonName"/>
+ *     <enumeration value="id-at-localityName"/>
+ *     <enumeration value="id-at-organizationName"/>
+ *     <enumeration value="id-at-organizationalUnitName"/>
+ *     <enumeration value="id-at-countryName"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "AttributeType") +@XmlEnum +public enum AttributeType { + + + /** + * Common Name - (OID: joint-iso-ccitt(2) ds(5) 4 3) + */ + @XmlEnumValue("id-at-commonName") + ID_AT_COMMON_NAME("id-at-commonName"), + + /** + * Locality - (OID: joint-iso-ccitt(2) ds(5) 4 7) + */ + @XmlEnumValue("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") + ID_AT_ORGANIZATION_NAME("id-at-organizationName"), + + /** + * Organization Unit Name - (OID: joint-iso-ccitt(2) ds(5) 4 11) + */ + @XmlEnumValue("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") + ID_AT_COUNTRY_NAME("id-at-countryName"); + private final String value; + + AttributeType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value attribute type. + * + * @param v the v + * @return the attribute type + */ + public static AttributeType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/AuthenticatedData.java b/src/main/java/com/adyen/model/nexo/AuthenticatedData.java new file mode 100644 index 000000000..f1bb52254 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/AuthenticatedData.java @@ -0,0 +1,181 @@ +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.XmlElements; +import javax.xml.bind.annotation.XmlType; +import java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Cryptographic Message Syntax (CMS) data structure containing MACed data with encryption key -- Reference: RFC 3852: Cryptographic Message Syntax (CMS) -- Usage: This data structure contains: the version of the data structure (which is v0 in EPAS protocol context) the protected encrytion key for every adressee (recipient) the encrypted data + * + *

Java class for AuthenticatedData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="AuthenticatedData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <choice maxOccurs="unbounded">
+ *           <element name="KeyTransport" type="{}KeyTransport"/>
+ *           <element name="KEK" type="{}KEK"/>
+ *         </choice>
+ *         <element name="MACAlgorithm" type="{}AlgorithmIdentifier"/>
+ *         <element name="EncapsulatedContent" type="{}EncapsulatedContent"/>
+ *       </sequence>
+ *       <attribute name="Version" type="{}VersionType" default="v0" />
+ *       <attribute name="MAC" use="required" type="{}MAC" />
+ *     </restriction>
+ *   </complexContent>
+ * </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) + }) + protected List keyTransportOrKEK; + /** + * The Mac algorithm. + */ + @XmlElement(name = "MACAlgorithm", required = true) + protected AlgorithmIdentifier macAlgorithm; + /** + * The Encapsulated content. + */ + @XmlElement(name = "EncapsulatedContent", required = true) + protected EncapsulatedContent encapsulatedContent; + /** + * The Version. + */ + @XmlElement(name = "Version") + protected VersionType version; + /** + * The Mac. + */ + @XmlElement(name = "MAC", required = true) + protected byte[] mac; + + /** + * Gets the value of the keyTransportOrKEK property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the keyTransportOrKEK property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getKeyTransportOrKEK().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link KeyTransport } + * {@link KEK } + * + * @return the key transport or kek + */ + public List getKeyTransportOrKEK() { + if (keyTransportOrKEK == null) { + keyTransportOrKEK = new ArrayList<>(); + } + return this.keyTransportOrKEK; + } + + /** + * Gets the value of the macAlgorithm property. + * + * @return possible object is {@link AlgorithmIdentifier } + */ + public AlgorithmIdentifier getMACAlgorithm() { + return macAlgorithm; + } + + /** + * Sets the value of the macAlgorithm property. + * + * @param value allowed object is {@link AlgorithmIdentifier } + */ + public void setMACAlgorithm(AlgorithmIdentifier value) { + this.macAlgorithm = value; + } + + /** + * Gets the value of the encapsulatedContent property. + * + * @return possible object is {@link EncapsulatedContent } + */ + public EncapsulatedContent getEncapsulatedContent() { + return encapsulatedContent; + } + + /** + * Sets the value of the encapsulatedContent property. + * + * @param value allowed object is {@link EncapsulatedContent } + */ + public void setEncapsulatedContent(EncapsulatedContent value) { + this.encapsulatedContent = value; + } + + /** + * Gets the value of the version property. + * + * @return possible object is {@link VersionType } + */ + public VersionType getVersion() { + if (version == null) { + return VersionType.V_0; + } else { + return version; + } + } + + /** + * Sets the value of the version property. + * + * @param value allowed object is {@link VersionType } + */ + public void setVersion(VersionType value) { + this.version = value; + } + + /** + * Gets the value of the mac property. + * + * @return possible object is byte[] + */ + public byte[] getMAC() { + return mac; + } + + /** + * Sets the value of the mac property. + * + * @param value allowed object is byte[] + */ + public void setMAC(byte[] value) { + this.mac = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/AuthenticationMethodType.java b/src/main/java/com/adyen/model/nexo/AuthenticationMethodType.java new file mode 100644 index 000000000..7995feb4b --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/AuthenticationMethodType.java @@ -0,0 +1,143 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for AuthenticationMethodType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="AuthenticationMethodType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Bypass"/>
+ *     <enumeration value="ManualVerification"/>
+ *     <enumeration value="MerchantAuthentication"/>
+ *     <enumeration value="OfflinePIN"/>
+ *     <enumeration value="OnlinePIN"/>
+ *     <enumeration value="PaperSignature"/>
+ *     <enumeration value="SecuredChannel"/>
+ *     <enumeration value="SecureCertificate"/>
+ *     <enumeration value="SecureNoCertificate"/>
+ *     <enumeration value="SignatureCapture"/>
+ *     <enumeration value="UnknownMethod"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "AuthenticationMethodType") +@XmlEnum +public enum AuthenticationMethodType { + + + /** + * Authentication bypassed by the merchant. + */ + @XmlEnumValue("Bypass") + @Schema(description = "Authentication bypassed by the merchant.") + BYPASS("Bypass"), + + /** + * Manual verification, for example passport or drivers license. + */ + @XmlEnumValue("ManualVerification") + @Schema(description = "Manual verification, for example passport or drivers license.") + MANUAL_VERIFICATION("ManualVerification"), + + /** + * Merchant-related authentication. + */ + @XmlEnumValue("MerchantAuthentication") + @Schema(description = "Merchant-related authentication.") + MERCHANT_AUTHENTICATION("MerchantAuthentication"), + + /** + * Off-line PIN authentication (Personal Identification Number). + */ + @XmlEnumValue("OfflinePIN") + @Schema(description = "Off-line PIN authentication (Personal Identification Number).") + OFFLINE_PIN("OfflinePIN"), + + /** + * On-line PIN authentication (Personal Identification Number). + */ + @XmlEnumValue("OnlinePIN") + @Schema(description = "On-line PIN authentication (Personal Identification Number).") + ON_LINE_PIN("OnLinePIN", "OnlinePIN"), + + /** + * Handwritten paper signature. + */ + @XmlEnumValue("PaperSignature") + @Schema(description = "Handwritten paper signature.") + PAPER_SIGNATURE("PaperSignature"), + + /** + * Channel-encrypted transaction. + */ + @XmlEnumValue("SecuredChannel") + @Schema(description = "Channel-encrypted transaction.") + SECURED_CHANNEL("SecuredChannel"), + + /** + * Secure electronic transaction with cardholder X.509 certificate. + */ + @XmlEnumValue("SecureCertificate") + @Schema(description = "Secure electronic transaction with cardholder X.509 certificate.") + SECURE_CERTIFICATE("SecureCertificate"), + + /** + * Secure electronic transaction without cardholder certificate. + */ + @XmlEnumValue("SecureNoCertificate") + @Schema(description = "Secure electronic transaction without cardholder certificate.") + SECURE_NO_CERTIFICATE("SecureNoCertificate"), + + /** + * Electronic signature capture (handwritten signature). + */ + @XmlEnumValue("SignatureCapture") + @Schema(description = "Electronic signature capture (handwritten signature).") + SIGNATURE_CAPTURE("SignatureCapture"), + + /** + * Authentication method is performed unknown. + */ + @XmlEnumValue("UnknownMethod") + @Schema(description = "Authentication method is performed unknown.") + UNKNOWN_METHOD("UnknownMethod"); + + private final String[] value; + + AuthenticationMethodType(String... v) { + value = v; + } + + /** + * Values array. + * + * @return the values + */ + public String[] value() { + return value; + } + + /** + * From value authentication method type. + * + * @param v the v + * @return the authentication method type + */ + public static AuthenticationMethodType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> Arrays.asList(s.value).contains(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/BalanceInquiryRequest.java b/src/main/java/com/adyen/model/nexo/BalanceInquiryRequest.java new file mode 100644 index 000000000..c38c11e2a --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/BalanceInquiryRequest.java @@ -0,0 +1,87 @@ +package com.adyen.model.nexo; + +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 related to the account for which a Balance Inquiry is requested + * + *

Java class for BalanceInquiryRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="BalanceInquiryRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="PaymentAccountReq" type="{}PaymentAccountReq" minOccurs="0"/>
+ *         <element name="LoyaltyAccountReq" type="{}LoyaltyAccountReq" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "BalanceInquiryRequest", propOrder = { + "paymentAccountReq", + "loyaltyAccountReq" +}) +public class BalanceInquiryRequest { + + /** + * The Payment account req. + */ + @XmlElement(name = "PaymentAccountReq") + @Schema(description = "Data related to the account pointed by the payment card") + protected PaymentAccountReq paymentAccountReq; + /** + * The Loyalty account req. + */ + @XmlElement(name = "LoyaltyAccountReq") + @Schema(description = "Data related to a requested Loyalty program or account.") + protected LoyaltyAccountReq loyaltyAccountReq; + + /** + * Gets the value of the paymentAccountReq property. + * + * @return possible object is {@link PaymentAccountReq } + */ + public PaymentAccountReq getPaymentAccountReq() { + return paymentAccountReq; + } + + /** + * Sets the value of the paymentAccountReq property. + * + * @param value allowed object is {@link PaymentAccountReq } + */ + public void setPaymentAccountReq(PaymentAccountReq value) { + this.paymentAccountReq = value; + } + + /** + * Gets the value of the loyaltyAccountReq property. + * + * @return possible object is {@link LoyaltyAccountReq } + */ + public LoyaltyAccountReq getLoyaltyAccountReq() { + return loyaltyAccountReq; + } + + /** + * Sets the value of the loyaltyAccountReq property. + * + * @param value allowed object is {@link LoyaltyAccountReq } + */ + public void setLoyaltyAccountReq(LoyaltyAccountReq value) { + this.loyaltyAccountReq = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/BalanceInquiryResponse.java b/src/main/java/com/adyen/model/nexo/BalanceInquiryResponse.java new file mode 100644 index 000000000..a15a90bf2 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/BalanceInquiryResponse.java @@ -0,0 +1,113 @@ +package com.adyen.model.nexo; + +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 and the identification of the associated payment, loyalty or stored value account. + * + *

Java class for BalanceInquiryResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="BalanceInquiryResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="PaymentAccountStatus" type="{}PaymentAccountStatus" minOccurs="0"/>
+ *         <element name="LoyaltyAccountStatus" type="{}LoyaltyAccountStatus" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "BalanceInquiryResponse", propOrder = { + "response", + "paymentAccountStatus", + "loyaltyAccountStatus" +}) +public class BalanceInquiryResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Payment account status. + */ + @XmlElement(name = "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") + @Schema(description = "Data related to the result of a loyalty Balance Inquiry. --Rule: If BalanceInquiryRequest. LoyaltyData present") + protected LoyaltyAccountStatus loyaltyAccountStatus; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the paymentAccountStatus property. + * + * @return possible object is {@link PaymentAccountStatus } + */ + public PaymentAccountStatus getPaymentAccountStatus() { + return paymentAccountStatus; + } + + /** + * Sets the value of the paymentAccountStatus property. + * + * @param value allowed object is {@link PaymentAccountStatus } + */ + public void setPaymentAccountStatus(PaymentAccountStatus value) { + this.paymentAccountStatus = value; + } + + /** + * Gets the value of the loyaltyAccountStatus property. + * + * @return possible object is {@link LoyaltyAccountStatus } + */ + public LoyaltyAccountStatus getLoyaltyAccountStatus() { + return loyaltyAccountStatus; + } + + /** + * Sets the value of the loyaltyAccountStatus property. + * + * @param value allowed object is {@link LoyaltyAccountStatus } + */ + public void setLoyaltyAccountStatus(LoyaltyAccountStatus value) { + this.loyaltyAccountStatus = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/BarcodeType.java b/src/main/java/com/adyen/model/nexo/BarcodeType.java new file mode 100644 index 000000000..ae08abc05 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/BarcodeType.java @@ -0,0 +1,93 @@ +package com.adyen.model.nexo; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for BarcodeType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="BarcodeType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="EAN8"/>
+ *     <enumeration value="EAN13"/>
+ *     <enumeration value="UPCA"/>
+ *     <enumeration value="Code25"/>
+ *     <enumeration value="Code128"/>
+ *     <enumeration value="PDF417"/>
+ *     <enumeration value="QRCode"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "BarcodeType") +@XmlEnum +public enum BarcodeType { + + /** + * Ean 8 barcode type. + */ + @XmlEnumValue("EAN8") + EAN_8("EAN8"), + /** + * Ean 13 barcode type. + */ + @XmlEnumValue("EAN13") + EAN_13("EAN13"), + /** + * Upca barcode type. + */ + UPCA("UPCA"), + /** + * Code 25 barcode type. + */ + @XmlEnumValue("Code25") + CODE_25("Code25"), + /** + * Code 128 barcode type. + */ + @XmlEnumValue("Code128") + CODE_128("Code128"), + /** + * Pdf 417 barcode type. + */ + @XmlEnumValue("PDF417") + PDF_417("PDF417"), + /** + * Qrcode barcode type. + */ + @XmlEnumValue("QRCode") + QRCODE("QRCode"); + private final String value; + + BarcodeType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value barcode type. + * + * @param v the v + * @return the barcode type + */ + public static BarcodeType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/BatchRequest.java b/src/main/java/com/adyen/model/nexo/BatchRequest.java new file mode 100644 index 000000000..ec5754036 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/BatchRequest.java @@ -0,0 +1,99 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Batch Request messageType. -- Usage: Message to send Payment, Loyalty and Reversal transactions to be performed without the Sale System, or to request the Payment, Loyalty and Reversal transactions that has been performed without the Sale System. + * + *

Java class for BatchRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="BatchRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="TransactionToPerform" type="{}TransactionToPerform" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="RemoveAllFlag" type="{}RemoveAllFlag" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "BatchRequest", propOrder = { + "transactionToPerform" +}) +public class BatchRequest { + + /** + * The Transaction to perform. + */ + @XmlElement(name = "TransactionToPerform") + @Schema(description = "Content of the Batch Request message") + protected List transactionToPerform; + /** + * The Remove all flag. + */ + @XmlElement(name = "RemoveAllFlag") + @Schema(description = "A flag requesting to remove the transactions stored and not yet performed. default False.") + protected Boolean removeAllFlag; + + /** + * Gets the value of the transactionToPerform property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the transactionToPerform property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getTransactionToPerform().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link TransactionToPerform } + * + * @return the transaction to perform + */ + public List getTransactionToPerform() { + if (transactionToPerform == null) { + transactionToPerform = new ArrayList<>(); + } + return this.transactionToPerform; + } + + /** + * Gets the value of the removeAllFlag property. + * + * @return possible object is {@link Boolean } + */ + public Boolean isRemoveAllFlag() { + return removeAllFlag; + } + + /** + * Sets the value of the removeAllFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setRemoveAllFlag(Boolean value) { + this.removeAllFlag = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/BatchResponse.java b/src/main/java/com/adyen/model/nexo/BatchResponse.java new file mode 100644 index 000000000..46b94dc31 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/BatchResponse.java @@ -0,0 +1,100 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Batch Response messageType. -- Usage: It conveys either the response of transactions to perform sent in the batch request, or a collection of results of performed Payment, Loyalty and Reversal transactions in a batch messageType or file. + * + *

Java class for BatchResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="BatchResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="PerformedTransaction" type="{}PerformedTransaction" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "BatchResponse", propOrder = { + "response", + "performedTransaction" +}) +public class BatchResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Performed transaction. + */ + @XmlElement(name = "PerformedTransaction") + @Schema(description = "Result of performed transactions.") + protected List performedTransaction; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the performedTransaction property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the performedTransaction property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getPerformedTransaction().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link PerformedTransaction } + * + * @return the performed transaction + */ + public List getPerformedTransaction() { + if (performedTransaction == null) { + performedTransaction = new ArrayList<>(); + } + return this.performedTransaction; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CapturedSignature.java b/src/main/java/com/adyen/model/nexo/CapturedSignature.java new file mode 100644 index 000000000..587d8bfd8 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CapturedSignature.java @@ -0,0 +1,100 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Numeric value of a handwritten signature. -- Usage: Contain the value of a handwritten signature, e.g. the signature of a cardholder on the merchant payment receipt. Only one format of the signature is allowed, it contains: The size of the pad area where the signature is written, given + * + *

Java class for CapturedSignature complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CapturedSignature">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="AreaSize" type="{}AreaSize" minOccurs="0"/>
+ *         <element name="SignaturePoint" type="{}SignaturePoint" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CapturedSignature", propOrder = { + "areaSize", + "signaturePoint" +}) +public class CapturedSignature { + + /** + * The Area size. + */ + @XmlElement(name = "AreaSize") + @Schema(description = "Size of an area") + protected AreaSize areaSize; + /** + * The Signature point. + */ + @XmlElement(name = "SignaturePoint", required = true) + @Schema(description = "Coordinates of a point where the pen changes direction or lift.") + protected List signaturePoint; + + /** + * Gets the value of the areaSize property. + * + * @return possible object is {@link AreaSize } + */ + public AreaSize getAreaSize() { + return areaSize; + } + + /** + * Sets the value of the areaSize property. + * + * @param value allowed object is {@link AreaSize } + */ + public void setAreaSize(AreaSize value) { + this.areaSize = value; + } + + /** + * Gets the value of the signaturePoint property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the signaturePoint property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getSignaturePoint().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link SignaturePoint } + * + * @return the signature point + */ + public List getSignaturePoint() { + if (signaturePoint == null) { + signaturePoint = new ArrayList<>(); + } + return this.signaturePoint; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CardAcquisitionRequest.java b/src/main/java/com/adyen/model/nexo/CardAcquisitionRequest.java new file mode 100644 index 000000000..95e164a02 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CardAcquisitionRequest.java @@ -0,0 +1,87 @@ +package com.adyen.model.nexo; + +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 related to the payment and loyalty cards to read and analyse. This messageType pair is usually followed by a messageType pair (e.g. payment or loyalty) which refers to this Card Acquisition messageType pair. The Card Acquisition + * + *

Java class for CardAcquisitionRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CardAcquisitionRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SaleData" type="{}SaleData"/>
+ *         <element name="CardAcquisitionTransaction" type="{}CardAcquisitionTransaction"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CardAcquisitionRequest", propOrder = { + "saleData", + "cardAcquisitionTransaction" +}) +public class CardAcquisitionRequest { + + /** + * The Sale data. + */ + @XmlElement(name = "SaleData", required = true) + @Schema(description = "Data related to the Sale System.") + protected SaleData saleData; + /** + * The Card acquisition transaction. + */ + @XmlElement(name = "CardAcquisitionTransaction", required = true) + @Schema(description = "Data related to the payment and loyalty card acquisition.") + protected CardAcquisitionTransaction cardAcquisitionTransaction; + + /** + * Gets the value of the saleData property. + * + * @return possible object is {@link SaleData } + */ + public SaleData getSaleData() { + return saleData; + } + + /** + * Sets the value of the saleData property. + * + * @param value allowed object is {@link SaleData } + */ + public void setSaleData(SaleData value) { + this.saleData = value; + } + + /** + * Gets the value of the cardAcquisitionTransaction property. + * + * @return possible object is {@link CardAcquisitionTransaction } + */ + public CardAcquisitionTransaction getCardAcquisitionTransaction() { + return cardAcquisitionTransaction; + } + + /** + * Sets the value of the cardAcquisitionTransaction property. + * + * @param value allowed object is {@link CardAcquisitionTransaction } + */ + public void setCardAcquisitionTransaction(CardAcquisitionTransaction value) { + this.cardAcquisitionTransaction = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CardAcquisitionResponse.java b/src/main/java/com/adyen/model/nexo/CardAcquisitionResponse.java new file mode 100644 index 000000000..b405589ae --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CardAcquisitionResponse.java @@ -0,0 +1,252 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Card Acquisition Response messageType. -- Usage: It conveys Information related to the payment and loyalty cards read and processed by the POI System and entered by the Customer:As for the Payment request, the result of the CardAcquisition and the identification of the transaction.One + * + *

Java class for CardAcquisitionResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CardAcquisitionResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="SaleData" type="{}SaleData"/>
+ *         <element name="POIData" type="{}POIData"/>
+ *         <element name="PaymentBrand" type="{}PaymentBrand" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="PaymentInstrumentData" type="{}PaymentInstrumentData" minOccurs="0"/>
+ *         <element name="LoyaltyAccount" type="{}LoyaltyAccount" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="CustomerOrder" type="{}CustomerOrder" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </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) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Sale data. + */ + @XmlElement(name = "SaleData", required = true) + @Schema(description = "Data related to the Sale System.") + protected SaleData saleData; + /** + * The Poi data. + */ + @XmlElement(name = "POIData", required = true) + @Schema(description = "Data related to the POI System.") + protected POIData poiData; + /** + * The Payment brand. + */ + @XmlElement(name = "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") + @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") + @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") + @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; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the saleData property. + * + * @return possible object is {@link SaleData } + */ + public SaleData getSaleData() { + return saleData; + } + + /** + * Sets the value of the saleData property. + * + * @param value allowed object is {@link SaleData } + */ + public void setSaleData(SaleData value) { + this.saleData = value; + } + + /** + * Gets the value of the poiData property. + * + * @return possible object is {@link POIData } + */ + public POIData getPOIData() { + return poiData; + } + + /** + * Sets the value of the poiData property. + * + * @param value allowed object is {@link POIData } + */ + public void setPOIData(POIData value) { + this.poiData = value; + } + + /** + * Gets the value of the paymentBrand property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the paymentBrand property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getPaymentBrand().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * @return the payment brand + */ + public List getPaymentBrand() { + if (paymentBrand == null) { + paymentBrand = new ArrayList<>(); + } + return this.paymentBrand; + } + + /** + * Gets the value of the paymentInstrumentData property. + * + * @return possible object is {@link PaymentInstrumentData } + */ + public PaymentInstrumentData getPaymentInstrumentData() { + return paymentInstrumentData; + } + + /** + * Sets the value of the paymentInstrumentData property. + * + * @param value allowed object is {@link PaymentInstrumentData } + */ + public void setPaymentInstrumentData(PaymentInstrumentData value) { + this.paymentInstrumentData = value; + } + + /** + * Gets the value of the loyaltyAccount property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the loyaltyAccount property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getLoyaltyAccount().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link LoyaltyAccount } + * + * @return the loyalty account + */ + public List getLoyaltyAccount() { + if (loyaltyAccount == null) { + loyaltyAccount = new ArrayList<>(); + } + return this.loyaltyAccount; + } + + /** + * Gets the value of the customerOrder property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the customerOrder property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getCustomerOrder().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link CustomerOrder } + * + * @return the customer order + */ + public List getCustomerOrder() { + if (customerOrder == null) { + customerOrder = new ArrayList<>(); + } + return this.customerOrder; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CardAcquisitionTransaction.java b/src/main/java/com/adyen/model/nexo/CardAcquisitionTransaction.java new file mode 100644 index 000000000..fb596f9ab --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CardAcquisitionTransaction.java @@ -0,0 +1,307 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Data related to the payment and loyalty card acquisition. -- Usage: Elements requested by the Sale System that are global to the payment or loyalty transaction. + * + *

Java class for CardAcquisitionTransaction complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CardAcquisitionTransaction">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="AllowedPaymentBrand" type="{}AllowedPaymentBrand" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="AllowedLoyaltyBrand" type="{}AllowedLoyaltyBrand" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="ForceEntryMode" type="{}ForceEntryMode" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="LoyaltyHandling" type="{}LoyaltyHandlingType" default="Allowed" />
+ *       <attribute name="CustomerLanguage" type="{}ISOLanguage2A" />
+ *       <attribute name="ForceCustomerSelectionFlag" type="{}ForceCustomerSelectionFlag" default="false" />
+ *       <attribute name="TotalAmount" type="{}SimpleAmountType" />
+ *       <attribute name="Payment" type="{}PaymentType" />
+ *       <attribute name="CashBackFlag" type="{}CashBackFlag" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CardAcquisitionTransaction", propOrder = { + "allowedPaymentBrand", + "allowedLoyaltyBrand", + "forceEntryMode" +}) +public class CardAcquisitionTransaction { + + /** + * The Allowed payment brand. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "Payment instrument entry mode requested by the Sale System.") + protected List forceEntryMode; + /** + * The Loyalty handling. + */ + @XmlElement(name = "LoyaltyHandling") + @Schema(description = "Type of Loyalty processing requested by the Sale System.") + protected LoyaltyHandlingType loyaltyHandling; + /** + * The Customer language. + */ + @XmlElement(name = "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") + @Schema(description = "Indicates if the Customer realises the selection of the card application.") + protected Boolean forceCustomerSelectionFlag; + /** + * The Total amount. + */ + @XmlElement(name = "TotalAmount") + @Schema(description = "Amount of a transaction. --Rule: Mandatory for contactless card, otherwise absent") + protected BigDecimal totalAmount; + /** + * The Payment. + */ + @XmlElement(name = "PaymentType") + @Schema(description = "Type of payment transaction. --Rule: Mandatory for contactless card, otherwise absent") + protected PaymentType paymentType; + /** + * The Cash back flag. + */ + @XmlElement(name = "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.") + protected Boolean cashBackFlag; + + /** + * Gets the value of the allowedPaymentBrand property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the allowedPaymentBrand property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getAllowedPaymentBrand().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * @return the allowed payment brand + */ + public List getAllowedPaymentBrand() { + if (allowedPaymentBrand == null) { + allowedPaymentBrand = new ArrayList<>(); + } + return this.allowedPaymentBrand; + } + + /** + * Gets the value of the allowedLoyaltyBrand property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the allowedLoyaltyBrand property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getAllowedLoyaltyBrand().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * @return the allowed loyalty brand + */ + public List getAllowedLoyaltyBrand() { + if (allowedLoyaltyBrand == null) { + allowedLoyaltyBrand = new ArrayList<>(); + } + return this.allowedLoyaltyBrand; + } + + /** + * Gets the value of the forceEntryMode property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the forceEntryMode property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getForceEntryMode().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link ForceEntryModeType } + * + * @return the force entry mode + */ + public List getForceEntryMode() { + if (forceEntryMode == null) { + forceEntryMode = new ArrayList<>(); + } + return this.forceEntryMode; + } + + /** + * Gets the value of the loyaltyHandling property. + * + * @return possible object is {@link LoyaltyHandlingType } + */ + public LoyaltyHandlingType getLoyaltyHandling() { + if (loyaltyHandling == null) { + return LoyaltyHandlingType.ALLOWED; + } else { + return loyaltyHandling; + } + } + + /** + * Sets the value of the loyaltyHandling property. + * + * @param value allowed object is {@link LoyaltyHandlingType } + */ + public void setLoyaltyHandling(LoyaltyHandlingType value) { + this.loyaltyHandling = value; + } + + /** + * Gets the value of the customerLanguage property. + * + * @return possible object is {@link String } + */ + public String getCustomerLanguage() { + return customerLanguage; + } + + /** + * Sets the value of the customerLanguage property. + * + * @param value allowed object is {@link String } + */ + public void setCustomerLanguage(String value) { + this.customerLanguage = value; + } + + /** + * Gets the value of the forceCustomerSelectionFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isForceCustomerSelectionFlag() { + if (forceCustomerSelectionFlag == null) { + return false; + } else { + return forceCustomerSelectionFlag; + } + } + + /** + * Sets the value of the forceCustomerSelectionFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setForceCustomerSelectionFlag(Boolean value) { + this.forceCustomerSelectionFlag = value; + } + + /** + * Gets the value of the totalAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getTotalAmount() { + return totalAmount; + } + + /** + * Sets the value of the totalAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setTotalAmount(BigDecimal value) { + this.totalAmount = value; + } + + /** + * Gets the value of the paymentType property. + * + * @return possible object is {@link PaymentType } + */ + public PaymentType getPaymentType() { + return paymentType; + } + + /** + * Sets the value of the paymentType property. + * + * @param value allowed object is {@link PaymentType } + */ + public void setPaymentType(PaymentType value) { + this.paymentType = value; + } + + /** + * Gets the value of the cashBackFlag property. + * + * @return possible object is {@link Boolean } + */ + public Boolean isCashBackFlag() { + return cashBackFlag; + } + + /** + * Sets the value of the cashBackFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setCashBackFlag(Boolean value) { + this.cashBackFlag = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CardData.java b/src/main/java/com/adyen/model/nexo/CardData.java new file mode 100644 index 000000000..a8d34837a --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CardData.java @@ -0,0 +1,361 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Information related to the payment card used for the transaction. -- Usage: Allows acquisition of the card data by the Sale System before the Payment, CardAcquisition or BalanceInquiry request to the POI. It could also be sent in the CardAcquisition response, to be processed by the Sale System. In this case, the + * + *

Java class for CardData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CardData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ProtectedCardData" type="{}ContentInformation" minOccurs="0"/>
+ *         <element name="SensitiveCardData" type="{}SensitiveCardData" minOccurs="0"/>
+ *         <element name="AllowedProductCode" type="{}AllowedProductCode" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="AllowedProduct" type="{}AllowedProduct" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="PaymentToken" type="{}PaymentToken" minOccurs="0"/>
+ *         <element name="CustomerOrder" type="{}CustomerOrder" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="PaymentBrand" type="{}PaymentBrand" />
+ *       <attribute name="MaskedPAN" type="{}MaskedPAN" />
+ *       <attribute name="PaymentAccountRef" type="{}PaymentAccountRef" />
+ *       <attribute name="EntryMode" type="{}EntryMode" />
+ *       <attribute name="CardCountryCode" type="{}CardCountryCode" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CardData", propOrder = { + "protectedCardData", + "sensitiveCardData", + "allowedProductCode", + "allowedProduct", + "paymentToken", + "customerOrder" +}) +public class CardData { + + /** + * The Protected card data. + */ + @XmlElement(name = "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") + @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") + @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).", minLength = 1, maxLength = 20) + protected List allowedProductCode; + /** + * The Allowed product. + */ + @XmlElement(name = "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") + @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") + @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") + @Schema(description = "Type of payment card --Rule: If card PAN is readable ") + protected String paymentBrand; + /** + * The Masked pan. + */ + @XmlElement(name = "MaskedPan") + protected String maskedPAN; + /** + * The Payment account ref. + */ + @XmlElement(name = "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") + @Schema(description = "Entry mode of the payment instrument information --Rule: Mandatory in the request") + protected List entryMode; + /** + * The Card country code. + */ + @XmlElement(name = "CardCountryCode") + @Schema(description = "Country Code attached to the card (3 numerics). --Rule: If available in the card", minLength = 3, maxLength = 3) + protected String cardCountryCode; + + /** + * Gets the value of the protectedCardData property. + * + * @return possible object is {@link ContentInformation } + */ + public ContentInformation getProtectedCardData() { + return protectedCardData; + } + + /** + * Sets the value of the protectedCardData property. + * + * @param value allowed object is {@link ContentInformation } + */ + public void setProtectedCardData(ContentInformation value) { + this.protectedCardData = value; + } + + /** + * Gets the value of the sensitiveCardData property. + * + * @return possible object is {@link SensitiveCardData } + */ + public SensitiveCardData getSensitiveCardData() { + return sensitiveCardData; + } + + /** + * Sets the value of the sensitiveCardData property. + * + * @param value allowed object is {@link SensitiveCardData } + */ + public void setSensitiveCardData(SensitiveCardData value) { + this.sensitiveCardData = value; + } + + /** + * Gets the value of the allowedProductCode property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the allowedProductCode property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getAllowedProductCode().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * @return the allowed product code + */ + public List getAllowedProductCode() { + if (allowedProductCode == null) { + allowedProductCode = new ArrayList<>(); + } + return this.allowedProductCode; + } + + /** + * Gets the value of the allowedProduct property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the allowedProduct property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getAllowedProduct().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link AllowedProduct } + * + * @return the allowed product + */ + public List getAllowedProduct() { + if (allowedProduct == null) { + allowedProduct = new ArrayList<>(); + } + return this.allowedProduct; + } + + /** + * Gets the value of the paymentToken property. + * + * @return possible object is {@link PaymentToken } + */ + public PaymentToken getPaymentToken() { + return paymentToken; + } + + /** + * Sets the value of the paymentToken property. + * + * @param value allowed object is {@link PaymentToken } + */ + public void setPaymentToken(PaymentToken value) { + this.paymentToken = value; + } + + /** + * Gets the value of the customerOrder property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the customerOrder property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getCustomerOrder().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link CustomerOrder } + * + * @return the customer order + */ + public List getCustomerOrder() { + if (customerOrder == null) { + customerOrder = new ArrayList<>(); + } + return this.customerOrder; + } + + /** + * Gets the value of the paymentBrand property. + * + * @return possible object is {@link String } + */ + public String getPaymentBrand() { + return paymentBrand; + } + + /** + * Sets the value of the paymentBrand property. + * + * @param value allowed object is {@link String } + */ + public void setPaymentBrand(String value) { + this.paymentBrand = value; + } + + /** + * Gets the value of the maskedPAN property. + * + * @return possible object is {@link String } + */ + public String getMaskedPAN() { + return maskedPAN; + } + + /** + * Sets the value of the maskedPAN property. + * + * @param value allowed object is {@link String } + */ + public void setMaskedPAN(String value) { + this.maskedPAN = value; + } + + /** + * Gets the value of the paymentAccountRef property. + * + * @return possible object is {@link String } + */ + public String getPaymentAccountRef() { + return paymentAccountRef; + } + + /** + * Sets the value of the paymentAccountRef property. + * + * @param value allowed object is {@link String } + */ + public void setPaymentAccountRef(String value) { + this.paymentAccountRef = value; + } + + /** + * Gets the value of the entryMode property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the entryMode property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getEntryMode().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link EntryModeType } + * + * @return the entry mode + */ + public List getEntryMode() { + if (entryMode == null) { + entryMode = new ArrayList<>(); + } + return this.entryMode; + } + + /** + * Gets the value of the cardCountryCode property. + * + * @return possible object is {@link String } + */ + public String getCardCountryCode() { + return cardCountryCode; + } + + /** + * Sets the value of the cardCountryCode property. + * + * @param value allowed object is {@link String } + */ + public void setCardCountryCode(String value) { + this.cardCountryCode = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CardReaderAPDURequest.java b/src/main/java/com/adyen/model/nexo/CardReaderAPDURequest.java new file mode 100644 index 000000000..2ba25bb1e --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CardReaderAPDURequest.java @@ -0,0 +1,186 @@ +package com.adyen.model.nexo; + +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 request to send to the chip of the card, and a possible invitation messageType to display on the CashierInterface or the CustomerInterface. + * + *

Java class for CardReaderAPDURequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CardReaderAPDURequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="APDUData" type="{}APDUData" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="APDUClass" use="required" type="{}APDUClass" />
+ *       <attribute name="APDUInstruction" use="required" type="{}APDUInstruction" />
+ *       <attribute name="APDUPar1" use="required" type="{}APDUPar1" />
+ *       <attribute name="APDUPar2" use="required" type="{}APDUPar2" />
+ *       <attribute name="APDUExpectedLength" type="{}APDUExpectedLength" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CardReaderAPDURequest", propOrder = { + "apduData" +}) +public class CardReaderAPDURequest { + + /** + * The Apdu data. + */ + @XmlElement(name = "APDUData") + @Schema(description = "Data field of the APDU command (Lc + Data)") + protected byte[] apduData; + /** + * The Apdu class. + */ + @XmlElement(name = "APDUClass", required = true) + @Schema(description = "Class field of the APDU command (CLA)", minLength = 1, maxLength = 1) + protected byte[] apduClass; + /** + * The Apdu instruction. + */ + @XmlElement(name = "APDUInstruction", required = true) + @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) + @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) + @Schema(description = "Parameter 2 field of the APDU command(P2)", minLength = 1, maxLength = 1) + protected byte[] apduPar2; + /** + * The Apdu expected length. + */ + @XmlElement(name = "APDUExpectedLength") + @Schema(description = "Expected length of the data field of the APDU response to the command (Le)", minLength = 1, maxLength = 1) + protected byte[] apduExpectedLength; + + /** + * Gets the value of the apduData property. + * + * @return possible object is byte[] + */ + public byte[] getAPDUData() { + return apduData; + } + + /** + * Sets the value of the apduData property. + * + * @param value allowed object is byte[] + */ + public void setAPDUData(byte[] value) { + this.apduData = value; + } + + /** + * Gets the value of the apduClass property. + * + * @return possible object is byte[] + */ + public byte[] getAPDUClass() { + return apduClass; + } + + /** + * Sets the value of the apduClass property. + * + * @param value allowed object is byte[] + */ + public void setAPDUClass(byte[] value) { + this.apduClass = value; + } + + /** + * Gets the value of the apduInstruction property. + * + * @return possible object is byte[] + */ + public byte[] getAPDUInstruction() { + return apduInstruction; + } + + /** + * Sets the value of the apduInstruction property. + * + * @param value allowed object is byte[] + */ + public void setAPDUInstruction(byte[] value) { + this.apduInstruction = value; + } + + /** + * Gets the value of the apduPar1 property. + * + * @return possible object is byte[] + */ + public byte[] getAPDUPar1() { + return apduPar1; + } + + /** + * Sets the value of the apduPar1 property. + * + * @param value allowed object is byte[] + */ + public void setAPDUPar1(byte[] value) { + this.apduPar1 = value; + } + + /** + * Gets the value of the apduPar2 property. + * + * @return possible object is byte[] + */ + public byte[] getAPDUPar2() { + return apduPar2; + } + + /** + * Sets the value of the apduPar2 property. + * + * @param value allowed object is byte[] + */ + public void setAPDUPar2(byte[] value) { + this.apduPar2 = value; + } + + /** + * Gets the value of the apduExpectedLength property. + * + * @return possible object is byte[] + */ + public byte[] getAPDUExpectedLength() { + return apduExpectedLength; + } + + /** + * Sets the value of the apduExpectedLength property. + * + * @param value allowed object is byte[] + */ + public void setAPDUExpectedLength(byte[] value) { + this.apduExpectedLength = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CardReaderAPDUResponse.java b/src/main/java/com/adyen/model/nexo/CardReaderAPDUResponse.java new file mode 100644 index 000000000..d95a42764 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CardReaderAPDUResponse.java @@ -0,0 +1,112 @@ +package com.adyen.model.nexo; + +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 result of the requested service, APDU response sent by the chip of the card in response to the APDU request. + * + *

Java class for CardReaderAPDUResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CardReaderAPDUResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="APDUData" type="{}APDUData" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="CardStatusWords" use="required" type="{}CardStatusWords" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CardReaderAPDUResponse", propOrder = { + "response", + "apduData" +}) +public class CardReaderAPDUResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Apdu data. + */ + @XmlElement(name = "APDUData") + @Schema(description = "Data field of the APDU command (Lc + Data)") + protected byte[] apduData; + /** + * The Card status words. + */ + @XmlElement(name = "CardStatusWords", required = true) + @Schema(description = "Status of a smartcard response to a command (SW1-SW2)") + protected byte[] cardStatusWords; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the apduData property. + * + * @return possible object is byte[] + */ + public byte[] getAPDUData() { + return apduData; + } + + /** + * Sets the value of the apduData property. + * + * @param value allowed object is byte[] + */ + public void setAPDUData(byte[] value) { + this.apduData = value; + } + + /** + * Gets the value of the cardStatusWords property. + * + * @return possible object is byte[] + */ + public byte[] getCardStatusWords() { + return cardStatusWords; + } + + /** + * Sets the value of the cardStatusWords property. + * + * @param value allowed object is byte[] + */ + public void setCardStatusWords(byte[] value) { + this.cardStatusWords = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CardReaderInitRequest.java b/src/main/java/com/adyen/model/nexo/CardReaderInitRequest.java new file mode 100644 index 000000000..666e2508b --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CardReaderInitRequest.java @@ -0,0 +1,180 @@ +package com.adyen.model.nexo; + +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 java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Card Reader Init Request messageType. -- Usage: It contains possible restrictions for the type of card reader to use, and a possible invitation messageType to display on the CashierInterface or the CustomerInterface. + * + *

Java class for CardReaderInitRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CardReaderInitRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ForceEntryMode" type="{}ForceEntryMode" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="DisplayOutput" type="{}DisplayOutput" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="WarmResetFlag" type="{}WarmResetFlag" />
+ *       <attribute name="LeaveCardFlag" type="{}LeaveCardFlag" default="true" />
+ *       <attribute name="MaxWaitingTime" type="{}MaxWaitingTime" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CardReaderInitRequest", propOrder = { + "forceEntryMode", + "displayOutput" +}) +public class CardReaderInitRequest { + + /** + * The Force entry mode. + */ + @XmlElement(name = "ForceEntryMode") + @Schema(description = "Payment instrument entry mode requested by the Sale System.") + protected List forceEntryMode; + /** + * The Display output. + */ + @XmlElement(name = "DisplayOutput") + @Schema(description = "Information to display and the way to process the display.") + protected DisplayOutput displayOutput; + /** + * The Warm reset flag. + */ + @XmlElement(name = "WarmResetFlag") + @Schema(description = "Flag to request a warm reset on a chip.") + protected Boolean warmResetFlag; + /** + * The Leave card flag. + */ + @XmlElement(name = "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") + @Schema(description = "Maximum time to wait for the request processing in seconds.") + protected BigInteger maxWaitingTime; + + /** + * Gets the value of the forceEntryMode property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the forceEntryMode property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getForceEntryMode().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link ForceEntryModeType } + * + * @return the force entry mode + */ + public List getForceEntryMode() { + if (forceEntryMode == null) { + forceEntryMode = new ArrayList<>(); + } + return this.forceEntryMode; + } + + /** + * Gets the value of the displayOutput property. + * + * @return possible object is {@link DisplayOutput } + */ + public DisplayOutput getDisplayOutput() { + return displayOutput; + } + + /** + * Sets the value of the displayOutput property. + * + * @param value allowed object is {@link DisplayOutput } + */ + public void setDisplayOutput(DisplayOutput value) { + this.displayOutput = value; + } + + /** + * Gets the value of the warmResetFlag property. + * + * @return possible object is {@link Boolean } + */ + public Boolean isWarmResetFlag() { + return warmResetFlag; + } + + /** + * Sets the value of the warmResetFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setWarmResetFlag(Boolean value) { + this.warmResetFlag = value; + } + + /** + * Gets the value of the leaveCardFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isLeaveCardFlag() { + if (leaveCardFlag == null) { + return true; + } else { + return leaveCardFlag; + } + } + + /** + * Sets the value of the leaveCardFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setLeaveCardFlag(Boolean value) { + this.leaveCardFlag = value; + } + + /** + * Gets the value of the maxWaitingTime property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getMaxWaitingTime() { + return maxWaitingTime; + } + + /** + * Sets the value of the maxWaitingTime property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setMaxWaitingTime(BigInteger value) { + this.maxWaitingTime = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CardReaderInitResponse.java b/src/main/java/com/adyen/model/nexo/CardReaderInitResponse.java new file mode 100644 index 000000000..e6eb633b2 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CardReaderInitResponse.java @@ -0,0 +1,169 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Card Reader Init Response messageType. -- Usage: It contains the result of the Card Reader by the POI Card Reader (magnetic stripe content, or chip initialisation data). + * + *

Java class for CardReaderInitResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CardReaderInitResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="TrackData" type="{}TrackData" maxOccurs="4" minOccurs="0"/>
+ *         <element name="ICCResetData" type="{}ICCResetData" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="EntryMode" type="{}EntryMode" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CardReaderInitResponse", propOrder = { + "response", + "trackData", + "iccResetData" +}) +public class CardReaderInitResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Track data. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "Entry mode of the payment instrument information --Rule: RFID, MagStripe, ICC, EMVContactless or SynchronousICC") + protected List entryMode; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the trackData property. + *

+ *

+ *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the trackData property. + *

+ *

+ *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getTrackData().add(newItem);
+     * 
+ *

+ *

+ *

+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link TrackData } + * + * @return the track data + */ + public List getTrackData() { + if (trackData == null) { + trackData = new ArrayList<>(); + } + return this.trackData; + } + + /** + * Gets the value of the iccResetData property. + * + * @return possible object is {@link ICCResetData } + */ + public ICCResetData getICCResetData() { + return iccResetData; + } + + /** + * Sets the value of the iccResetData property. + * + * @param value allowed object is {@link ICCResetData } + */ + public void setICCResetData(ICCResetData value) { + this.iccResetData = value; + } + + /** + * Gets the value of the entryMode property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the entryMode property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getEntryMode().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link EntryModeType } + * + * @return the entry mode + */ + public List getEntryMode() { + if (entryMode == null) { + entryMode = new ArrayList<>(); + } + return this.entryMode; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CardReaderPowerOffRequest.java b/src/main/java/com/adyen/model/nexo/CardReaderPowerOffRequest.java new file mode 100644 index 000000000..04f9a4258 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CardReaderPowerOffRequest.java @@ -0,0 +1,87 @@ +package com.adyen.model.nexo; + +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 java.math.BigInteger; + + +/** + * Definition: Content of the Card Reader Power-Off Request messageType. -- Usage: It contains a possible invitation messageType to display on the CashierInterface or the CustomerInterface, for removing the card. + * + *

Java class for CardReaderPowerOffRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CardReaderPowerOffRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DisplayOutput" type="{}DisplayOutput" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="MaxWaitingTime" type="{}MaxWaitingTime" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CardReaderPowerOffRequest", propOrder = { + "displayOutput" +}) +public class CardReaderPowerOffRequest { + + /** + * The Display output. + */ + @XmlElement(name = "DisplayOutput") + @Schema(description = "Information to display and the way to process the display.") + protected DisplayOutput displayOutput; + /** + * The Max waiting time. + */ + @XmlElement(name = "MaxWaitingTime") + @Schema(description = "Maximum time to wait for the request processing in seconds.") + protected BigInteger maxWaitingTime; + + /** + * Gets the value of the displayOutput property. + * + * @return possible object is {@link DisplayOutput } + */ + public DisplayOutput getDisplayOutput() { + return displayOutput; + } + + /** + * Sets the value of the displayOutput property. + * + * @param value allowed object is {@link DisplayOutput } + */ + public void setDisplayOutput(DisplayOutput value) { + this.displayOutput = value; + } + + /** + * Gets the value of the maxWaitingTime property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getMaxWaitingTime() { + return maxWaitingTime; + } + + /** + * Sets the value of the maxWaitingTime property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setMaxWaitingTime(BigInteger value) { + this.maxWaitingTime = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CardReaderPowerOffResponse.java b/src/main/java/com/adyen/model/nexo/CardReaderPowerOffResponse.java new file mode 100644 index 000000000..6e67f99fd --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CardReaderPowerOffResponse.java @@ -0,0 +1,61 @@ +package com.adyen.model.nexo; + +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 result of the processed command. + * + *

Java class for CardReaderPowerOffResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CardReaderPowerOffResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CardReaderPowerOffResponse", propOrder = { + "response" +}) +public class CardReaderPowerOffResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CardholderPIN.java b/src/main/java/com/adyen/model/nexo/CardholderPIN.java new file mode 100644 index 000000000..adf86303e --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CardholderPIN.java @@ -0,0 +1,111 @@ +package com.adyen.model.nexo; + +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 to get the encrypted PIN block. + * + *

Java class for CardholderPIN complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CardholderPIN">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="EncrPINBlock" type="{}ContentInformation"/>
+ *       </sequence>
+ *       <attribute name="PINFormat" use="required" type="{}PINFormatType" />
+ *       <attribute name="AdditionalInput" type="{}AdditionalInput" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CardholderPIN", propOrder = { + "encrPINBlock" +}) +public class CardholderPIN { + + /** + * The Encr pin block. + */ + @XmlElement(name = "EncrPINBlock", required = true) + @Schema(description = "Encrypted PIN") + protected ContentInformation encrPINBlock; + /** + * The Pin format. + */ + @XmlElement(name = "PINFormat", required = true) + @Schema(description = "Identify the format of the PIN before encryption.") + protected PINFormatType pinFormat; + /** + * The Additional input. + */ + @XmlElement(name = "AdditionalInput") + @Schema(description = "Additional information required to verify the PIN like part of the PAN, or driver ID.") + protected String additionalInput; + + /** + * Gets the value of the encrPINBlock property. + * + * @return possible object is {@link ContentInformation } + */ + public ContentInformation getEncrPINBlock() { + return encrPINBlock; + } + + /** + * Sets the value of the encrPINBlock property. + * + * @param value allowed object is {@link ContentInformation } + */ + public void setEncrPINBlock(ContentInformation value) { + this.encrPINBlock = value; + } + + /** + * Gets the value of the pinFormat property. + * + * @return possible object is {@link PINFormatType } + */ + public PINFormatType getPINFormat() { + return pinFormat; + } + + /** + * Sets the value of the pinFormat property. + * + * @param value allowed object is {@link PINFormatType } + */ + public void setPINFormat(PINFormatType value) { + this.pinFormat = value; + } + + /** + * Gets the value of the additionalInput property. + * + * @return possible object is {@link String } + */ + public String getAdditionalInput() { + return additionalInput; + } + + /** + * Sets the value of the additionalInput property. + * + * @param value allowed object is {@link String } + */ + public void setAdditionalInput(String value) { + this.additionalInput = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CashHandlingDevice.java b/src/main/java/com/adyen/model/nexo/CashHandlingDevice.java new file mode 100644 index 000000000..0101b1b4b --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CashHandlingDevice.java @@ -0,0 +1,124 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Status of cash handling device. -- Usage: Indicate the status and the remaining coins and bill in a cash handling device. + * + *

Java class for CashHandlingDevice complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CashHandlingDevice">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CoinsOrBills" type="{}CoinsOrBills" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="CashHandlingOKFlag" use="required" type="{}CashHandlingOKFlag" />
+ *       <attribute name="Currency" use="required" type="{}ISOCurrency3A" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CashHandlingDevice", propOrder = { + "coinsOrBills" +}) +public class CashHandlingDevice { + + /** + * The Coins or bills. + */ + @XmlElement(name = "CoinsOrBills", required = true) + @Schema(description = "Number of coins or bills of a given value.") + protected List coinsOrBills; + /** + * The Cash handling ok flag. + */ + @XmlElement(name = "CashHandlingOKFlag", required = true) + @Schema(description = "Indicates if the cash handling device is working and usable.") + protected boolean cashHandlingOKFlag; + /** + * The Currency. + */ + @XmlElement(name = "Currency", required = true) + @Schema(description = "Currency of a monetary amount.") + protected String currency; + + /** + * Gets the value of the coinsOrBills property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the coinsOrBills property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getCoinsOrBills().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link CoinsOrBills } + * + * @return the coins or bills + */ + public List getCoinsOrBills() { + if (coinsOrBills == null) { + coinsOrBills = new ArrayList<>(); + } + return this.coinsOrBills; + } + + /** + * Gets the value of the cashHandlingOKFlag property. + * + * @return the boolean + */ + public boolean isCashHandlingOKFlag() { + return cashHandlingOKFlag; + } + + /** + * Sets the value of the cashHandlingOKFlag property. + * + * @param value the value + */ + public void setCashHandlingOKFlag(boolean value) { + this.cashHandlingOKFlag = value; + } + + /** + * Gets the value of the currency property. + * + * @return possible object is {@link String } + */ + public String getCurrency() { + return currency; + } + + /** + * Sets the value of the currency property. + * + * @param value allowed object is {@link String } + */ + public void setCurrency(String value) { + this.currency = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CharacterHeightType.java b/src/main/java/com/adyen/model/nexo/CharacterHeightType.java new file mode 100644 index 000000000..1a85a7a04 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CharacterHeightType.java @@ -0,0 +1,70 @@ +package com.adyen.model.nexo; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for CharacterHeightType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="CharacterHeightType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="SingleHeight"/>
+ *     <enumeration value="DoubleHeight"/>
+ *     <enumeration value="HalfHeight"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "CharacterHeightType") +@XmlEnum +public enum CharacterHeightType { + + /** + * Single height character height type. + */ + @XmlEnumValue("SingleHeight") + SINGLE_HEIGHT("SingleHeight"), + /** + * Double height character height type. + */ + @XmlEnumValue("DoubleHeight") + DOUBLE_HEIGHT("DoubleHeight"), + /** + * Half height character height type. + */ + @XmlEnumValue("HalfHeight") + HALF_HEIGHT("HalfHeight"); + private final String value; + + CharacterHeightType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value character height type. + * + * @param v the v + * @return the character height type + */ + public static CharacterHeightType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CharacterStyleType.java b/src/main/java/com/adyen/model/nexo/CharacterStyleType.java new file mode 100644 index 000000000..fcc510d1d --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CharacterStyleType.java @@ -0,0 +1,76 @@ +package com.adyen.model.nexo; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for CharacterStyleType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="CharacterStyleType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Normal"/>
+ *     <enumeration value="Bold"/>
+ *     <enumeration value="Italic"/>
+ *     <enumeration value="Underlined"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "CharacterStyleType") +@XmlEnum +public enum CharacterStyleType { + + /** + * Normal character style type. + */ + @XmlEnumValue("Normal") + NORMAL("Normal"), + /** + * Bold character style type. + */ + @XmlEnumValue("Bold") + BOLD("Bold"), + /** + * Italic character style type. + */ + @XmlEnumValue("Italic") + ITALIC("Italic"), + /** + * Underlined character style type. + */ + @XmlEnumValue("Underlined") + UNDERLINED("Underlined"); + private final String value; + + CharacterStyleType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value character style type. + * + * @param v the v + * @return the character style type + */ + public static CharacterStyleType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CharacterWidthType.java b/src/main/java/com/adyen/model/nexo/CharacterWidthType.java new file mode 100644 index 000000000..1eff1f6be --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CharacterWidthType.java @@ -0,0 +1,64 @@ +package com.adyen.model.nexo; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for CharacterWidthType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="CharacterWidthType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="SingleWidth"/>
+ *     <enumeration value="DoubleWidth"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "CharacterWidthType") +@XmlEnum +public enum CharacterWidthType { + + /** + * Single width character width type. + */ + @XmlEnumValue("SingleWidth") + SINGLE_WIDTH("SingleWidth"), + /** + * Double width character width type. + */ + @XmlEnumValue("DoubleWidth") + DOUBLE_WIDTH("DoubleWidth"); + private final String value; + + CharacterWidthType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value character width type. + * + * @param v the v + * @return the character width type + */ + public static CharacterWidthType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CheckData.java b/src/main/java/com/adyen/model/nexo/CheckData.java new file mode 100644 index 000000000..da20fa5fa --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CheckData.java @@ -0,0 +1,219 @@ +package com.adyen.model.nexo; + +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 check information to be provided by the Sale System before requesting the payment, or stored by the Sale System after processing of the payment. + * + *

Java class for CheckData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CheckData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="BankID" type="{}BankID" minOccurs="0"/>
+ *         <element name="AccountNumber" type="{}AccountNumber" minOccurs="0"/>
+ *         <element name="CheckNumber" type="{}CheckNumber" minOccurs="0"/>
+ *         <element name="TrackData" type="{}TrackData" minOccurs="0"/>
+ *         <element name="CheckCardNumber" type="{}CheckCardNumber" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="TypeCode" type="{}CheckTypeCodeType" default="Personal" />
+ *       <attribute name="Country" type="{}ISOCountry3A" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CheckData", propOrder = { + "bankID", + "accountNumber", + "checkNumber", + "trackData", + "checkCardNumber" +}) +public class CheckData { + + /** + * The Bank id. + */ + @XmlElement(name = "BankID") + @Schema(description = "Identification of the bank. --Rule: Mandatory if TrackData absent") + protected String bankID; + /** + * The Account number. + */ + @XmlElement(name = "AccountNumber") + @Schema(description = "Identification of the customer account. --Rule: Mandatory if TrackData absent") + protected String accountNumber; + /** + * The Check number. + */ + @XmlElement(name = "CheckNumber") + @Schema(description = "Identification of the bank check. --Rule: Mandatory if TrackData absent") + protected String checkNumber; + /** + * The Track data. + */ + @XmlElement(name = "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") + @Schema(description = "Check guarantee card number. --Rule: If provided by the customer") + protected String checkCardNumber; + /** + * The Type code. + */ + @XmlElement(name = "TypeCode") + @Schema(description = "Type of bank check.") + protected CheckTypeCodeType typeCode; + /** + * The Country. + */ + @XmlElement(name = "Country") + @Schema(description = "Country of the bank check. --Rule: Absent if country of the Sale system") + protected String country; + + /** + * Gets the value of the bankID property. + * + * @return possible object is {@link String } + */ + public String getBankID() { + return bankID; + } + + /** + * Sets the value of the bankID property. + * + * @param value allowed object is {@link String } + */ + public void setBankID(String value) { + this.bankID = value; + } + + /** + * Gets the value of the accountNumber property. + * + * @return possible object is {@link String } + */ + public String getAccountNumber() { + return accountNumber; + } + + /** + * Sets the value of the accountNumber property. + * + * @param value allowed object is {@link String } + */ + public void setAccountNumber(String value) { + this.accountNumber = value; + } + + /** + * Gets the value of the checkNumber property. + * + * @return possible object is {@link String } + */ + public String getCheckNumber() { + return checkNumber; + } + + /** + * Sets the value of the checkNumber property. + * + * @param value allowed object is {@link String } + */ + public void setCheckNumber(String value) { + this.checkNumber = value; + } + + /** + * Gets the value of the trackData property. + * + * @return possible object is {@link TrackData } + */ + public TrackData getTrackData() { + return trackData; + } + + /** + * Sets the value of the trackData property. + * + * @param value allowed object is {@link TrackData } + */ + public void setTrackData(TrackData value) { + this.trackData = value; + } + + /** + * Gets the value of the checkCardNumber property. + * + * @return possible object is {@link String } + */ + public String getCheckCardNumber() { + return checkCardNumber; + } + + /** + * Sets the value of the checkCardNumber property. + * + * @param value allowed object is {@link String } + */ + public void setCheckCardNumber(String value) { + this.checkCardNumber = value; + } + + /** + * Gets the value of the type property. + * + * @return possible object is {@link CheckTypeCodeType } + */ + public CheckTypeCodeType getTypeCode() { + if (typeCode == null) { + return CheckTypeCodeType.PERSONAL; + } else { + return typeCode; + } + } + + /** + * Sets the value of the type property. + * + * @param value allowed object is {@link CheckTypeCodeType } + */ + public void setTypeCode(CheckTypeCodeType value) { + this.typeCode = value; + } + + /** + * Gets the value of the country property. + * + * @return possible object is {@link String } + */ + public String getCountry() { + return country; + } + + /** + * Sets the value of the country property. + * + * @param value allowed object is {@link String } + */ + public void setCountry(String value) { + this.country = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CheckTypeCodeType.java b/src/main/java/com/adyen/model/nexo/CheckTypeCodeType.java new file mode 100644 index 000000000..a93652603 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CheckTypeCodeType.java @@ -0,0 +1,64 @@ +package com.adyen.model.nexo; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for CheckTypeCodeType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="CheckTypeCodeType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Personal"/>
+ *     <enumeration value="Company"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "CheckTypeCodeType") +@XmlEnum +public enum CheckTypeCodeType { + + /** + * Personal check type code type. + */ + @XmlEnumValue("Personal") + PERSONAL("Personal"), + /** + * Company check type code type. + */ + @XmlEnumValue("Company") + COMPANY("Company"); + private final String value; + + CheckTypeCodeType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value check type code type. + * + * @param v the v + * @return the check type code type + */ + public static CheckTypeCodeType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CoinsOrBills.java b/src/main/java/com/adyen/model/nexo/CoinsOrBills.java new file mode 100644 index 000000000..3eaa590ee --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CoinsOrBills.java @@ -0,0 +1,84 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; +import java.math.BigInteger; + + +/** + * Definition: Number of coins or bills of a given value. -- Usage: Indicates the remaining number of coins or bills of a given value in a cash handling device. When the cash handling machine does not have any more coins or bills of a certain value, the number must be equal to 0. + * + *

Java class for CoinsOrBills complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CoinsOrBills">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="UnitValue" use="required" type="{}SimpleAmountType" />
+ *       <attribute name="Number" use="required" type="{}Number" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CoinsOrBills") +public class CoinsOrBills { + + /** + * The Unit value. + */ + @XmlElement(name = "UnitValue", required = true) + @Schema(description = "Value of a coin or bill.") + protected BigDecimal unitValue; + /** + * The Number. + */ + @XmlElement(name = "Number", required = true) + @Schema(description = "Number of elements") + protected BigInteger number; + + /** + * Gets the value of the unitValue property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getUnitValue() { + return unitValue; + } + + /** + * Sets the value of the unitValue property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setUnitValue(BigDecimal value) { + this.unitValue = value; + } + + /** + * Gets the value of the number property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getNumber() { + return number; + } + + /** + * Sets the value of the number property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setNumber(BigInteger value) { + this.number = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/ColorType.java b/src/main/java/com/adyen/model/nexo/ColorType.java new file mode 100644 index 000000000..56d83e416 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ColorType.java @@ -0,0 +1,100 @@ +package com.adyen.model.nexo; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for ColorType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="ColorType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="White"/>
+ *     <enumeration value="Black"/>
+ *     <enumeration value="Red"/>
+ *     <enumeration value="Green"/>
+ *     <enumeration value="Blue"/>
+ *     <enumeration value="Yellow"/>
+ *     <enumeration value="Magenta"/>
+ *     <enumeration value="Cyan"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "ColorType") +@XmlEnum +public enum ColorType { + + /** + * White color type. + */ + @XmlEnumValue("White") + WHITE("White"), + /** + * Black color type. + */ + @XmlEnumValue("Black") + BLACK("Black"), + /** + * Red color type. + */ + @XmlEnumValue("Red") + RED("Red"), + /** + * Green color type. + */ + @XmlEnumValue("Green") + GREEN("Green"), + /** + * Blue color type. + */ + @XmlEnumValue("Blue") + BLUE("Blue"), + /** + * Yellow color type. + */ + @XmlEnumValue("Yellow") + YELLOW("Yellow"), + /** + * Magenta color type. + */ + @XmlEnumValue("Magenta") + MAGENTA("Magenta"), + /** + * Cyan color type. + */ + @XmlEnumValue("Cyan") + CYAN("Cyan"); + private final String value; + + ColorType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value color type. + * + * @param v the v + * @return the color type + */ + public static ColorType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/ContentInformation.java b/src/main/java/com/adyen/model/nexo/ContentInformation.java new file mode 100644 index 000000000..cfaf24eb0 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ContentInformation.java @@ -0,0 +1,184 @@ +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; + + +/** + * Definition: General Cryptographic Message Syntax (CMS) data structure -- Reference: RFC 3852: Cryptographic Message Syntax (CMS) -- Usage: This data structure contains two data elements: The type of content of the CMS data structure The content itself These CMS data structures could be nested to allow a sequence of cryptographic processings on a part of a messageType (e.g. + * + *

Java class for ContentInformation complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ContentInformation">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <choice>
+ *           <element name="EnvelopedData" type="{}EnvelopedData"/>
+ *           <element name="AuthenticatedData" type="{}AuthenticatedData"/>
+ *           <element name="SignedData" type="{}SignedData"/>
+ *           <element name="DigestedData" type="{}DigestedData"/>
+ *           <element name="NamedKeyEncryptedData" type="{}NamedKeyEncryptedData"/>
+ *         </choice>
+ *       </sequence>
+ *       <attribute name="Content" use="required" type="{}ContentType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ContentInformation", propOrder = { + "envelopedData", + "authenticatedData", + "signedData", + "digestedData", + "namedKeyEncryptedData" +}) +public class ContentInformation { + + /** + * The Enveloped data. + */ + @XmlElement(name = "EnvelopedData") + protected EnvelopedData envelopedData; + /** + * The Authenticated data. + */ + @XmlElement(name = "AuthenticatedData") + protected AuthenticatedData authenticatedData; + /** + * The Signed data. + */ + @XmlElement(name = "SignedData") + protected SignedData signedData; + /** + * The Digested data. + */ + @XmlElement(name = "DigestedData") + protected DigestedData digestedData; + /** + * The Named key encrypted data. + */ + @XmlElement(name = "NamedKeyEncryptedData") + protected NamedKeyEncryptedData namedKeyEncryptedData; + /** + * The Content. + */ + @XmlElement(name = "ContentType", required = true) + protected ContentType contentType; + + /** + * Gets the value of the envelopedData property. + * + * @return possible object is {@link EnvelopedData } + */ + public EnvelopedData getEnvelopedData() { + return envelopedData; + } + + /** + * Sets the value of the envelopedData property. + * + * @param value allowed object is {@link EnvelopedData } + */ + public void setEnvelopedData(EnvelopedData value) { + this.envelopedData = value; + } + + /** + * Gets the value of the authenticatedData property. + * + * @return possible object is {@link AuthenticatedData } + */ + public AuthenticatedData getAuthenticatedData() { + return authenticatedData; + } + + /** + * Sets the value of the authenticatedData property. + * + * @param value allowed object is {@link AuthenticatedData } + */ + public void setAuthenticatedData(AuthenticatedData value) { + this.authenticatedData = value; + } + + /** + * Gets the value of the signedData property. + * + * @return possible object is {@link SignedData } + */ + public SignedData getSignedData() { + return signedData; + } + + /** + * Sets the value of the signedData property. + * + * @param value allowed object is {@link SignedData } + */ + public void setSignedData(SignedData value) { + this.signedData = value; + } + + /** + * Gets the value of the digestedData property. + * + * @return possible object is {@link DigestedData } + */ + public DigestedData getDigestedData() { + return digestedData; + } + + /** + * Sets the value of the digestedData property. + * + * @param value allowed object is {@link DigestedData } + */ + public void setDigestedData(DigestedData value) { + this.digestedData = value; + } + + /** + * Gets the value of the namedKeyEncryptedData property. + * + * @return possible object is {@link NamedKeyEncryptedData } + */ + public NamedKeyEncryptedData getNamedKeyEncryptedData() { + return namedKeyEncryptedData; + } + + /** + * Sets the value of the namedKeyEncryptedData property. + * + * @param value allowed object is {@link NamedKeyEncryptedData } + */ + public void setNamedKeyEncryptedData(NamedKeyEncryptedData value) { + this.namedKeyEncryptedData = value; + } + + /** + * Gets the value of the contentType property. + * + * @return possible object is {@link ContentType } + */ + public ContentType getContentType() { + return contentType; + } + + /** + * Sets the value of the contentType property. + * + * @param value allowed object is {@link ContentType } + */ + public void setContentType(ContentType value) { + this.contentType = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/ContentType.java b/src/main/java/com/adyen/model/nexo/ContentType.java new file mode 100644 index 000000000..07b203e69 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ContentType.java @@ -0,0 +1,94 @@ +package com.adyen.model.nexo; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for ContentType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="ContentType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="id-data"/>
+ *     <enumeration value="id-signedData"/>
+ *     <enumeration value="id-envelopedData"/>
+ *     <enumeration value="id-digestedData"/>
+ *     <enumeration value="id-encryptedData"/>
+ *     <enumeration value="id-ct-authData"/>
+ *   </restriction>
+ * </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") + 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") + 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") + 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") + 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") + 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") + ID_CT_AUTH_DATA("id-ct-authData"); + private final String value; + + ContentType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value content type. + * + * @param v the v + * @return the content type + */ + public static ContentType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CurrencyConversion.java b/src/main/java/com/adyen/model/nexo/CurrencyConversion.java new file mode 100644 index 000000000..e68687fdd --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CurrencyConversion.java @@ -0,0 +1,193 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; + + +/** + * Definition: Information related to a currency conversion -- Usage: A currency conversion occurred in the payment, and the merchant needs to know information related to this conversion (e.g. to print on the sale receipt) + * + *

Java class for CurrencyConversion complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CurrencyConversion">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ConvertedAmount" type="{}Amount"/>
+ *         <element name="Commission" type="{}SimpleAmountType" minOccurs="0"/>
+ *         <element name="Declaration" type="{}Declaration" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="CustomerApprovedFlag" type="{}CustomerApprovedFlag" default="true" />
+ *       <attribute name="Rate" type="{}Rate" />
+ *       <attribute name="Markup" type="{}Markup" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CurrencyConversion", propOrder = { + "convertedAmount", + "commission", + "declaration" +}) +public class CurrencyConversion { + + /** + * The Converted amount. + */ + @XmlElement(name = "ConvertedAmount", required = true) + @Schema(description = "Amount after a currency conversion.") + protected Amount convertedAmount; + /** + * The Commission. + */ + @XmlElement(name = "Commission") + @Schema(description = "Commission for a service. --Rule: Commission of the conversion.") + protected BigDecimal commission; + /** + * The Declaration. + */ + @XmlElement(name = "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") + @Schema(description = "Notify if the customer has approved something.") + protected Boolean customerApprovedFlag; + /** + * The Rate. + */ + @XmlElement(name = "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") + @Schema(description = "Markup of an amount in percentage. --Rule: Markup of the conversion.") + protected BigDecimal markup; + + /** + * Gets the value of the convertedAmount property. + * + * @return possible object is {@link Amount } + */ + public Amount getConvertedAmount() { + return convertedAmount; + } + + /** + * Sets the value of the convertedAmount property. + * + * @param value allowed object is {@link Amount } + */ + public void setConvertedAmount(Amount value) { + this.convertedAmount = value; + } + + /** + * Gets the value of the commission property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getCommission() { + return commission; + } + + /** + * Sets the value of the commission property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setCommission(BigDecimal value) { + this.commission = value; + } + + /** + * Gets the value of the declaration property. + * + * @return possible object is {@link String } + */ + public String getDeclaration() { + return declaration; + } + + /** + * Sets the value of the declaration property. + * + * @param value allowed object is {@link String } + */ + public void setDeclaration(String value) { + this.declaration = value; + } + + /** + * Gets the value of the customerApprovedFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isCustomerApprovedFlag() { + if (customerApprovedFlag == null) { + return true; + } else { + return customerApprovedFlag; + } + } + + /** + * Sets the value of the customerApprovedFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setCustomerApprovedFlag(Boolean value) { + this.customerApprovedFlag = value; + } + + /** + * Gets the value of the rate property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getRate() { + return rate; + } + + /** + * Sets the value of the rate property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setRate(BigDecimal value) { + this.rate = value; + } + + /** + * Gets the value of the markup property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getMarkup() { + return markup; + } + + /** + * Sets the value of the markup property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setMarkup(BigDecimal value) { + this.markup = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CustomerOrder.java b/src/main/java/com/adyen/model/nexo/CustomerOrder.java new file mode 100644 index 000000000..0b88d03f2 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CustomerOrder.java @@ -0,0 +1,267 @@ +package com.adyen.model.nexo; + +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; +import java.math.BigDecimal; + + +/** + * Definition: Customer order attached to a card, recorded in the POI system. -- Usage: Allows the management of customer orders by the POI, for instance in a multi-channel or a click and collect sale transaction. + * + *

Java class for CustomerOrder complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CustomerOrder">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="AdditionalInformation" type="{}AdditionalInformation" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="CustomerOrderID" use="required" type="{}CustomerOrderID" />
+ *       <attribute name="OpenOrderState" type="{}OpenOrderState" default="false" />
+ *       <attribute name="StartDate" use="required" type="{}StartDate" />
+ *       <attribute name="EndDate" type="{}EndDate" />
+ *       <attribute name="ForecastedAmount" use="required" type="{}SimpleAmountType" />
+ *       <attribute name="CurrentAmount" use="required" type="{}SimpleAmountType" />
+ *       <attribute name="Currency" type="{}ISOCurrency3A" />
+ *       <attribute name="AccessedBy" type="{}AccessedBy" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CustomerOrder", propOrder = { + "additionalInformation" +}) +public class CustomerOrder { + + /** + * The Additional information. + */ + @XmlElement(name = "AdditionalInformation") + @Schema(description = "Unqualified information. --Rule: If order process in progress.") + protected String additionalInformation; + /** + * The Customer order id. + */ + @XmlElement(name = "CustomerOrderID", required = true) + @Schema(description = "Identification of a customer order.") + protected String customerOrderID; + /** + * The Open order state. + */ + @XmlElement(name = "OpenOrderState") + @Schema(description = "State of a customer order.") + protected Boolean openOrderState; + /** + * The Start date. + */ + @XmlElement(name = "StartDate", required = true) + @Schema(description = "Date time of the beginning of an operation.") + protected XMLGregorianCalendar startDate; + /** + * The End date. + */ + @XmlElement(name = "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) + @Schema(description = "Amount of a transaction.") + protected BigDecimal forecastedAmount; + /** + * The Current amount. + */ + @XmlElement(name = "CurrentAmount", required = true) + @Schema(description = "Remaining amount to pay in a transaction.") + protected BigDecimal currentAmount; + /** + * The Currency. + */ + @XmlElement(name = "Currency") + @Schema(description = "Currency of a monetary amount.") + protected String currency; + /** + * The Accessed by. + */ + @XmlElement(name = "AccessedBy") + @Schema(description = "Identification of an entity accessing data to perform an operation. --Rule: If multiple currencies are allowed.") + protected String accessedBy; + + /** + * Gets the value of the additionalInformation property. + * + * @return possible object is {@link String } + */ + public String getAdditionalInformation() { + return additionalInformation; + } + + /** + * Sets the value of the additionalInformation property. + * + * @param value allowed object is {@link String } + */ + public void setAdditionalInformation(String value) { + this.additionalInformation = value; + } + + /** + * Gets the value of the customerOrderID property. + * + * @return possible object is {@link String } + */ + public String getCustomerOrderID() { + return customerOrderID; + } + + /** + * Sets the value of the customerOrderID property. + * + * @param value allowed object is {@link String } + */ + public void setCustomerOrderID(String value) { + this.customerOrderID = value; + } + + /** + * Gets the value of the openOrderState property. + * + * @return possible object is {@link Boolean } + */ + public boolean isOpenOrderState() { + if (openOrderState == null) { + return false; + } else { + return openOrderState; + } + } + + /** + * Sets the value of the openOrderState property. + * + * @param value allowed object is {@link Boolean } + */ + public void setOpenOrderState(Boolean value) { + this.openOrderState = value; + } + + /** + * Gets the value of the startDate property. + * + * @return possible object is {@link XMLGregorianCalendar } + */ + public XMLGregorianCalendar getStartDate() { + return startDate; + } + + /** + * Sets the value of the startDate property. + * + * @param value allowed object is {@link XMLGregorianCalendar } + */ + public void setStartDate(XMLGregorianCalendar value) { + this.startDate = value; + } + + /** + * Gets the value of the endDate property. + * + * @return possible object is {@link XMLGregorianCalendar } + */ + public XMLGregorianCalendar getEndDate() { + return endDate; + } + + /** + * Sets the value of the endDate property. + * + * @param value allowed object is {@link XMLGregorianCalendar } + */ + public void setEndDate(XMLGregorianCalendar value) { + this.endDate = value; + } + + /** + * Gets the value of the forecastedAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getForecastedAmount() { + return forecastedAmount; + } + + /** + * Sets the value of the forecastedAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setForecastedAmount(BigDecimal value) { + this.forecastedAmount = value; + } + + /** + * Gets the value of the currentAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getCurrentAmount() { + return currentAmount; + } + + /** + * Sets the value of the currentAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setCurrentAmount(BigDecimal value) { + this.currentAmount = value; + } + + /** + * Gets the value of the currency property. + * + * @return possible object is {@link String } + */ + public String getCurrency() { + return currency; + } + + /** + * Sets the value of the currency property. + * + * @param value allowed object is {@link String } + */ + public void setCurrency(String value) { + this.currency = value; + } + + /** + * Gets the value of the accessedBy property. + * + * @return possible object is {@link String } + */ + public String getAccessedBy() { + return accessedBy; + } + + /** + * Sets the value of the accessedBy property. + * + * @param value allowed object is {@link String } + */ + public void setAccessedBy(String value) { + this.accessedBy = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/CustomerOrderReqType.java b/src/main/java/com/adyen/model/nexo/CustomerOrderReqType.java new file mode 100644 index 000000000..6a5ecb149 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/CustomerOrderReqType.java @@ -0,0 +1,78 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for CustomerOrderReqType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="CustomerOrderReqType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Open"/>
+ *     <enumeration value="Closed"/>
+ *     <enumeration value="Both"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "CustomerOrderReqType") +@XmlEnum +public enum CustomerOrderReqType { + + + /** + * Customer order not completed. + */ + @XmlEnumValue("Open") + @Schema(description = "Customer order not completed.") + OPEN("Open"), + + /** + * Completed customer orders. + */ + @XmlEnumValue("Closed") + @Schema(description = "Completed customer orders.") + CLOSED("Closed"), + + /** + * All type of CustomerOrder should be listed + */ + @XmlEnumValue("Both") + @Schema(description = "All type of CustomerOrder should be listed") + BOTH("Both"); + private final String value; + + CustomerOrderReqType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value customer order req type. + * + * @param v the v + * @return the customer order req type + */ + public static CustomerOrderReqType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/DeviceType.java b/src/main/java/com/adyen/model/nexo/DeviceType.java new file mode 100644 index 000000000..cb75e1230 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/DeviceType.java @@ -0,0 +1,86 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for DeviceType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="DeviceType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="CashierDisplay"/>
+ *     <enumeration value="CustomerDisplay"/>
+ *     <enumeration value="CashierInput"/>
+ *     <enumeration value="CustomerInput"/>
+ *   </restriction>
+ * </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") + @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.") + CASHIER_DISPLAY("CashierDisplay"), + + /** + * 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") + @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.") + CUSTOMER_DISPLAY("CustomerDisplay"), + + /** + * 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") + @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") + CASHIER_INPUT("CashierInput"), + + /** + * 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") + @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"); + private final String value; + + DeviceType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value device type. + * + * @param v the v + * @return the device type + */ + public static DeviceType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/DiagnosisRequest.java b/src/main/java/com/adyen/model/nexo/DiagnosisRequest.java new file mode 100644 index 000000000..f5e0d1638 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/DiagnosisRequest.java @@ -0,0 +1,128 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Diagnosis Request messageType. -- Usage: It conveys Information related to the target POI for which the diagnosis is requested + * + *

Java class for DiagnosisRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DiagnosisRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="AcquirerID" type="{}AcquirerID" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="POIID" type="{}POIID" />
+ *       <attribute name="HostDiagnosisFlag" type="{}HostDiagnosisFlag" default="false" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DiagnosisRequest", propOrder = { + "acquirerID" +}) +public class DiagnosisRequest { + + /** + * The Acquirer id. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "Indicates if Host Diagnosis are required") + protected Boolean hostDiagnosisFlag; + + /** + * Gets the value of the acquirerID property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the acquirerID property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getAcquirerID().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * @return the acquirer id + */ + public List getAcquirerID() { + if (acquirerID == null) { + acquirerID = new ArrayList<>(); + } + return this.acquirerID; + } + + /** + * Gets the value of the poiid property. + * + * @return possible object is {@link String } + */ + public String getPOIID() { + return poiid; + } + + /** + * Sets the value of the poiid property. + * + * @param value allowed object is {@link String } + */ + public void setPOIID(String value) { + this.poiid = value; + } + + /** + * Gets the value of the hostDiagnosisFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isHostDiagnosisFlag() { + if (hostDiagnosisFlag == null) { + return false; + } else { + return hostDiagnosisFlag; + } + } + + /** + * Sets the value of the hostDiagnosisFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setHostDiagnosisFlag(Boolean value) { + this.hostDiagnosisFlag = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/DiagnosisResponse.java b/src/main/java/com/adyen/model/nexo/DiagnosisResponse.java new file mode 100644 index 000000000..22948226a --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/DiagnosisResponse.java @@ -0,0 +1,163 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Diagnosis Response messageType. -- Usage: It conveys the result of the requested diagnosis and a possible messageType to display on a logical device. + * + *

Java class for DiagnosisResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DiagnosisResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="LoggedSaleID" type="{}LoggedSaleID" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="POIStatus" type="{}POIStatus" minOccurs="0"/>
+ *         <element name="HostStatus" type="{}HostStatus" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DiagnosisResponse", propOrder = { + "response", + "loggedSaleID", + "poiStatus", + "hostStatus" +}) +public class DiagnosisResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Logged sale id. + */ + @XmlElement(name = "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") + @Schema(description = "State of a POI Terminal. --Rule: if Response.Result is Success") + protected POIStatus poiStatus; + /** + * The Host status. + */ + @XmlElement(name = "HostStatus") + @Schema(description = "State of a Host.") + protected List hostStatus; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the loggedSaleID property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the loggedSaleID property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getLoggedSaleID().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * @return the logged sale id + */ + public List getLoggedSaleID() { + if (loggedSaleID == null) { + loggedSaleID = new ArrayList<>(); + } + return this.loggedSaleID; + } + + /** + * Gets the value of the poiStatus property. + * + * @return possible object is {@link POIStatus } + */ + public POIStatus getPOIStatus() { + return poiStatus; + } + + /** + * Sets the value of the poiStatus property. + * + * @param value allowed object is {@link POIStatus } + */ + public void setPOIStatus(POIStatus value) { + this.poiStatus = value; + } + + /** + * Gets the value of the hostStatus property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the hostStatus property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getHostStatus().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link HostStatus } + * + * @return the host status + */ + public List getHostStatus() { + if (hostStatus == null) { + hostStatus = new ArrayList<>(); + } + return this.hostStatus; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/DigestedData.java b/src/main/java/com/adyen/model/nexo/DigestedData.java new file mode 100644 index 000000000..b3c4b6eb2 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/DigestedData.java @@ -0,0 +1,132 @@ +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; + + +/** + * Definition: Cryptographic Message Syntax (CMS) data structure containing digested data -- Reference: RFC 3852: Cryptographic Message Syntax (CMS) -- Usage: This data structure contains: the version of the data structure the identifiers of the messageType digest algorithms the encapsulated content the digested data + * + *

Java class for DigestedData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DigestedData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DigestAlgorithm" type="{}AlgorithmIdentifier"/>
+ *         <element name="EncapsulatedContent" type="{}EncapsulatedContent"/>
+ *         <element name="Digest" type="{}Digest"/>
+ *       </sequence>
+ *       <attribute name="Version" type="{}VersionType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DigestedData", propOrder = { + "digestAlgorithm", + "encapsulatedContent", + "digest" +}) +public class DigestedData { + + /** + * The Digest algorithm. + */ + @XmlElement(name = "DigestAlgorithm", required = true) + protected AlgorithmIdentifier digestAlgorithm; + /** + * The Encapsulated content. + */ + @XmlElement(name = "EncapsulatedContent", required = true) + protected EncapsulatedContent encapsulatedContent; + /** + * The Digest. + */ + @XmlElement(name = "Digest", required = true) + protected byte[] digest; + /** + * The Version. + */ + @XmlElement(name = "Version") + protected VersionType version; + + /** + * Gets the value of the digestAlgorithm property. + * + * @return possible object is {@link AlgorithmIdentifier } + */ + public AlgorithmIdentifier getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * Sets the value of the digestAlgorithm property. + * + * @param value allowed object is {@link AlgorithmIdentifier } + */ + public void setDigestAlgorithm(AlgorithmIdentifier value) { + this.digestAlgorithm = value; + } + + /** + * Gets the value of the encapsulatedContent property. + * + * @return possible object is {@link EncapsulatedContent } + */ + public EncapsulatedContent getEncapsulatedContent() { + return encapsulatedContent; + } + + /** + * Sets the value of the encapsulatedContent property. + * + * @param value allowed object is {@link EncapsulatedContent } + */ + public void setEncapsulatedContent(EncapsulatedContent value) { + this.encapsulatedContent = value; + } + + /** + * Gets the value of the digest property. + * + * @return possible object is byte[] + */ + public byte[] getDigest() { + return digest; + } + + /** + * Sets the value of the digest property. + * + * @param value allowed object is byte[] + */ + public void setDigest(byte[] value) { + this.digest = value; + } + + /** + * Gets the value of the version property. + * + * @return possible object is {@link VersionType } + */ + public VersionType getVersion() { + return version; + } + + /** + * Sets the value of the version property. + * + * @param value allowed object is {@link VersionType } + */ + public void setVersion(VersionType value) { + this.version = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/DisplayOutput.java b/src/main/java/com/adyen/model/nexo/DisplayOutput.java new file mode 100644 index 000000000..54bd4e87c --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/DisplayOutput.java @@ -0,0 +1,234 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Information to display and the way to process the display. -- Usage: It contains a complete display operation for a Display or an Input Device type. For the Input Devices, Diagnosis and EnableService, ResponseRequiredFlag and MinimumDisplayTime shall be absent. + * + *

Java class for DisplayOutput complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DisplayOutput">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="OutputContent" type="{}OutputContent"/>
+ *         <element name="MenuEntry" type="{}MenuEntry" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="OutputSignature" type="{}OutputSignature" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="ResponseRequiredFlag" type="{}ResponseRequiredFlag" default="true" />
+ *       <attribute name="MinimumDisplayTime" type="{}MinimumDisplayTime" default="0" />
+ *       <attribute name="Device" use="required" type="{}DeviceType" />
+ *       <attribute name="InfoQualify" use="required" type="{}InfoQualifyType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DisplayOutput", propOrder = { + "outputContent", + "menuEntry", + "outputSignature" +}) +public class DisplayOutput { + + /** + * The Output content. + */ + @XmlElement(name = "OutputContent", required = true) + @Schema(description = "Content to display or print.") + protected OutputContent outputContent; + /** + * The Menu entry. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "Request of a message response.") + protected Boolean responseRequiredFlag; + /** + * The Minimum display time. + */ + @XmlElement(name = "MinimumDisplayTime") + @Schema(description = "Number of seconds the message has to be displayed") + protected Integer minimumDisplayTime; + /** + * The Device. + */ + @XmlElement(name = "Device", required = true) + @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) + @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") + protected InfoQualifyType infoQualify; + + /** + * Gets the value of the outputContent property. + * + * @return possible object is {@link OutputContent } + */ + public OutputContent getOutputContent() { + return outputContent; + } + + /** + * Sets the value of the outputContent property. + * + * @param value allowed object is {@link OutputContent } + */ + public void setOutputContent(OutputContent value) { + this.outputContent = value; + } + + /** + * Gets the value of the menuEntry property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the menuEntry property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getMenuEntry().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link MenuEntry } + * + * @return the menu entry + */ + public List getMenuEntry() { + if (menuEntry == null) { + menuEntry = new ArrayList<>(); + } + return this.menuEntry; + } + + /** + * Gets the value of the outputSignature property. + * + * @return possible object is byte[] + */ + public byte[] getOutputSignature() { + return outputSignature; + } + + /** + * Sets the value of the outputSignature property. + * + * @param value allowed object is byte[] + */ + public void setOutputSignature(byte[] value) { + this.outputSignature = value; + } + + /** + * Gets the value of the responseRequiredFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isResponseRequiredFlag() { + if (responseRequiredFlag == null) { + return true; + } else { + return responseRequiredFlag; + } + } + + /** + * Sets the value of the responseRequiredFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setResponseRequiredFlag(Boolean value) { + this.responseRequiredFlag = value; + } + + /** + * Gets the value of the minimumDisplayTime property. + * + * @return possible object is {@link Integer } + */ + public int getMinimumDisplayTime() { + if (minimumDisplayTime == null) { + return 0; + } else { + return minimumDisplayTime; + } + } + + /** + * Sets the value of the minimumDisplayTime property. + * + * @param value allowed object is {@link Integer } + */ + public void setMinimumDisplayTime(Integer value) { + this.minimumDisplayTime = value; + } + + /** + * Gets the value of the device property. + * + * @return possible object is {@link DeviceType } + */ + public DeviceType getDevice() { + return device; + } + + /** + * Sets the value of the device property. + * + * @param value allowed object is {@link DeviceType } + */ + public void setDevice(DeviceType value) { + this.device = value; + } + + /** + * Gets the value of the infoQualify property. + * + * @return possible object is {@link InfoQualifyType } + */ + public InfoQualifyType getInfoQualify() { + return infoQualify; + } + + /** + * Sets the value of the infoQualify property. + * + * @param value allowed object is {@link InfoQualifyType } + */ + public void setInfoQualify(InfoQualifyType value) { + this.infoQualify = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/DisplayRequest.java b/src/main/java/com/adyen/model/nexo/DisplayRequest.java new file mode 100644 index 000000000..e54209f07 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/DisplayRequest.java @@ -0,0 +1,74 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Display Request messageType. -- Usage: It conveys the data to display and the way to process the display. It contains the complete content to display. It might contain an operation (the DisplayOutput element) per Display Device type. + * + *

Java class for DisplayRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DisplayRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DisplayOutput" type="{}DisplayOutput" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DisplayRequest", propOrder = { + "displayOutput" +}) +public class DisplayRequest { + + /** + * The Display output. + */ + @XmlElement(name = "DisplayOutput", required = true) + @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") + protected List displayOutput; + + /** + * Gets the value of the displayOutput property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the displayOutput property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getDisplayOutput().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link DisplayOutput } + * + * @return the display output + */ + public List getDisplayOutput() { + if (displayOutput == null) { + displayOutput = new ArrayList<>(); + } + return this.displayOutput; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/DisplayResponse.java b/src/main/java/com/adyen/model/nexo/DisplayResponse.java new file mode 100644 index 000000000..a5ab8cc6d --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/DisplayResponse.java @@ -0,0 +1,74 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Display Response messageType. -- Usage: It conveys the result of the display, parallel to the messageType request, except if response not required and absent. + * + *

Java class for DisplayResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DisplayResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="OutputResult" type="{}OutputResult" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DisplayResponse", propOrder = { + "outputResult" +}) +public class DisplayResponse { + + /** + * The Output result. + */ + @XmlElement(name = "OutputResult", required = true) + @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.") + protected List outputResult; + + /** + * Gets the value of the outputResult property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the outputResult property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getOutputResult().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link OutputResult } + * + * @return the output result + */ + public List getOutputResult() { + if (outputResult == null) { + outputResult = new ArrayList<>(); + } + return this.outputResult; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/DocumentQualifierType.java b/src/main/java/com/adyen/model/nexo/DocumentQualifierType.java new file mode 100644 index 000000000..30f2f5e3c --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/DocumentQualifierType.java @@ -0,0 +1,102 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for DocumentQualifierType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="DocumentQualifierType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="SaleReceipt"/>
+ *     <enumeration value="CashierReceipt"/>
+ *     <enumeration value="CustomerReceipt"/>
+ *     <enumeration value="Document"/>
+ *     <enumeration value="Voucher"/>
+ *     <enumeration value="Journal"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "DocumentQualifierType") +@XmlEnum +public enum DocumentQualifierType { + + + /** + * Where the POI system print the Sale receipt when requested by the Sale Terminal. + */ + @XmlEnumValue("SaleReceipt") + @Schema(description = "Where the POI system print the Sale receipt when requested by the Sale Terminal.") + SALE_RECEIPT("SaleReceipt"), + + /** + * Where the Sale system print the Cashier copy of the Payment receipt when requested by the POI Terminal. + */ + @XmlEnumValue("CashierReceipt") + @Schema(description = "Where the Sale system print the Cashier copy of the Payment receipt when requested by the POI Terminal.") + CASHIER_RECEIPT("CashierReceipt"), + + /** + * 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") + @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.") + CUSTOMER_RECEIPT("CustomerReceipt"), + + /** + * 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") + @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") + DOCUMENT("Document"), + + /** + * Coupons, voucher or special ticket generated by the POI or the Sale System and to be printed. + */ + @XmlEnumValue("Voucher") + @Schema(description = "Coupons, voucher or special ticket generated by the POI or the Sale System and to be printed.") + VOUCHER("Voucher"), + + /** + * 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") + @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") + JOURNAL("Journal"); + private final String value; + + DocumentQualifierType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value document qualifier type. + * + * @param v the v + * @return the document qualifier type + */ + public static DocumentQualifierType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/EnableServiceRequest.java b/src/main/java/com/adyen/model/nexo/EnableServiceRequest.java new file mode 100644 index 000000000..d950f4e7b --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/EnableServiceRequest.java @@ -0,0 +1,134 @@ +package com.adyen.model.nexo; + +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.XmlList; +import javax.xml.bind.annotation.XmlType; +import java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Enable Service Request messageType. -- Usage: It conveys the services that will be enabled for the POI Terminal without the request of the Sale System, and a possible invitation for the Customer to start the services. + * + *

Java class for EnableServiceRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="EnableServiceRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ServicesEnabled" type="{}ServicesEnabled" minOccurs="0"/>
+ *         <element name="DisplayOutput" type="{}DisplayOutput" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="TransactionAction" use="required" type="{}TransactionActionType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EnableServiceRequest", propOrder = { + "servicesEnabled", + "displayOutput" +}) +public class EnableServiceRequest { + + /** + * The Services enabled. + */ + @XmlList + @XmlElement(name = "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") + @Schema(description = "Information to display and the way to process the display.") + protected DisplayOutput displayOutput; + /** + * The Transaction action. + */ + @XmlElement(name = "TransactionAction", required = true) + @Schema(description = "Action to realise on a transaction.") + protected TransactionActionType transactionAction; + + /** + * Gets the value of the servicesEnabled property. + *

+ *

+ *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the servicesEnabled property. + *

+ *

+ *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getServicesEnabled().add(newItem);
+     * 
+ *

+ *

+ *

+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link ServicesEnabledType } + * + * @return the services enabled + */ + public List getServicesEnabled() { + if (servicesEnabled == null) { + servicesEnabled = new ArrayList<>(); + } + return this.servicesEnabled; + } + + /** + * Gets the value of the displayOutput property. + * + * @return possible object is {@link DisplayOutput } + */ + public DisplayOutput getDisplayOutput() { + return displayOutput; + } + + /** + * Sets the value of the displayOutput property. + * + * @param value allowed object is {@link DisplayOutput } + */ + public void setDisplayOutput(DisplayOutput value) { + this.displayOutput = value; + } + + /** + * Gets the value of the transactionAction property. + * + * @return possible object is {@link TransactionActionType } + */ + public TransactionActionType getTransactionAction() { + return transactionAction; + } + + /** + * Sets the value of the transactionAction property. + * + * @param value allowed object is {@link TransactionActionType } + */ + public void setTransactionAction(TransactionActionType value) { + this.transactionAction = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/EnableServiceResponse.java b/src/main/java/com/adyen/model/nexo/EnableServiceResponse.java new file mode 100644 index 000000000..102d8a73f --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/EnableServiceResponse.java @@ -0,0 +1,61 @@ +package com.adyen.model.nexo; + +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 of the Enable Service processing. + * + *

Java class for EnableServiceResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="EnableServiceResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EnableServiceResponse", propOrder = { + "response" +}) +public class EnableServiceResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/EncapsulatedContent.java b/src/main/java/com/adyen/model/nexo/EncapsulatedContent.java new file mode 100644 index 000000000..e764cfb38 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/EncapsulatedContent.java @@ -0,0 +1,82 @@ +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; + + +/** + * Definition: Cryptographic Message Syntax (CMS) data structure containing content to authenticate -- Reference: RFC 3852: Cryptographic Message Syntax (CMS) -- Usage: This data structure contains: the type of the encapsulated content, which is id-data for an application data or another CMS data structure the data to authenticate + * + *

Java class for EncapsulatedContent complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="EncapsulatedContent">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Content" type="{}Content" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="ContentType" use="required" type="{}ContentType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EncapsulatedContent", propOrder = { + "content" +}) +public class EncapsulatedContent { + + /** + * The Content. + */ + @XmlElement(name = "Content") + protected byte[] content; + /** + * The Content type. + */ + @XmlElement(name = "ContentType", required = true) + protected ContentType contentType; + + /** + * Gets the value of the content property. + * + * @return possible object is byte[] + */ + public byte[] getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value allowed object is byte[] + */ + public void setContent(byte[] value) { + this.content = value; + } + + /** + * Gets the value of the contentType property. + * + * @return possible object is {@link ContentType } + */ + public ContentType getContentType() { + return contentType; + } + + /** + * Sets the value of the contentType property. + * + * @param value allowed object is {@link ContentType } + */ + public void setContentType(ContentType value) { + this.contentType = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/EncryptedContent.java b/src/main/java/com/adyen/model/nexo/EncryptedContent.java new file mode 100644 index 000000000..e8ccd7476 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/EncryptedContent.java @@ -0,0 +1,107 @@ +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; + + +/** + * Definition: Cryptographic Message Syntax (CMS) data structure containing encrypted data with encryption key -- Reference: RFC 3852: Cryptographic Message Syntax (CMS) -- Usage: This data structure contains: the type of the encrypted content, which is id-data for an application data or another CMS data structure the protected encryption key for every recipient the encrypted data + * + *

Java class for EncryptedContent complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="EncryptedContent">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ContentEncryptionAlgorithm" type="{}AlgorithmIdentifier"/>
+ *         <element name="EncryptedData" type="{}EncryptedData"/>
+ *       </sequence>
+ *       <attribute name="Content" use="required" type="{}ContentType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EncryptedContent", propOrder = { + "contentEncryptionAlgorithm", + "encryptedData" +}) +public class EncryptedContent { + + /** + * The Content encryption algorithm. + */ + @XmlElement(name = "ContentEncryptionAlgorithm", required = true) + protected AlgorithmIdentifier contentEncryptionAlgorithm; + /** + * The Encrypted data. + */ + @XmlElement(name = "EncryptedData", required = true) + protected byte[] encryptedData; + /** + * The Content. + */ + @XmlElement(name = "ContentType", required = true) + protected ContentType contentType; + + /** + * Gets the value of the contentEncryptionAlgorithm property. + * + * @return possible object is {@link AlgorithmIdentifier } + */ + public AlgorithmIdentifier getContentEncryptionAlgorithm() { + return contentEncryptionAlgorithm; + } + + /** + * Sets the value of the contentEncryptionAlgorithm property. + * + * @param value allowed object is {@link AlgorithmIdentifier } + */ + public void setContentEncryptionAlgorithm(AlgorithmIdentifier value) { + this.contentEncryptionAlgorithm = value; + } + + /** + * Gets the value of the encryptedData property. + * + * @return possible object is byte[] + */ + public byte[] getEncryptedData() { + return encryptedData; + } + + /** + * Sets the value of the encryptedData property. + * + * @param value allowed object is byte[] + */ + public void setEncryptedData(byte[] value) { + this.encryptedData = value; + } + + /** + * Gets the value of the contentType property. + * + * @return possible object is {@link ContentType } + */ + public ContentType getContentType() { + return contentType; + } + + /** + * Sets the value of the contentType property. + * + * @param value allowed object is {@link ContentType } + */ + public void setContentType(ContentType value) { + this.contentType = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/EntryModeType.java b/src/main/java/com/adyen/model/nexo/EntryModeType.java new file mode 100644 index 000000000..36c18a8db --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/EntryModeType.java @@ -0,0 +1,138 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for EntryModeType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="EntryModeType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="RFID"/>
+ *     <enumeration value="Keyed"/>
+ *     <enumeration value="Manual"/>
+ *     <enumeration value="File"/>
+ *     <enumeration value="Scanned"/>
+ *     <enumeration value="MagStripe"/>
+ *     <enumeration value="ICC"/>
+ *     <enumeration value="SynchronousICC"/>
+ *     <enumeration value="Tapped"/>
+ *     <enumeration value="Contactless"/>
+ *     <enumeration value="Mobile"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "EntryModeType") +@XmlEnum +public enum EntryModeType { + + + /** + * Payment instrument information are taken from RFID + */ + RFID("RFID"), + + /** + * Manual key entry + */ + @XmlEnumValue("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") + @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") + @Schema(description = "Account data on file") + FILE("File"), + + /** + * Scanned by a bar code reader. + */ + @XmlEnumValue("Scanned") + @Schema(description = "Scanned by a bar code reader.") + SCANNED("Scanned"), + + /** + * Magnetic stripe card reader. + */ + @XmlEnumValue("MagStripe") + @Schema(description = "Magnetic stripe card reader.") + MAG_STRIPE("MagStripe"), + + /** + * Contact ICC (asynchronous) + */ + ICC("ICC"), + + /** + * Contact ICC (synchronous) + */ + @XmlEnumValue("SynchronousICC") + @Schema(description = "Contact ICC (synchronous)") + SYNCHRONOUS_ICC("SynchronousICC"), + + /** + * Contactless card reader Magnetic Stripe + */ + @XmlEnumValue("Tapped") + @Schema(description = "Contactless card reader Magnetic Stripe") + TAPPED("Tapped"), + + /** + * Contactless card reader conform to ISO 14443 + */ + @XmlEnumValue("Contactless") + @Schema(description = "Contactless card reader conform to ISO 14443") + CONTACTLESS("Contactless"), + + /** + * Mobile phone. + */ + @XmlEnumValue("Mobile") + @Schema(description = "Mobile phone.") + MOBILE("Mobile"); + private final String value; + + EntryModeType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value entry mode type. + * + * @param v the v + * @return the entry mode type + */ + public static EntryModeType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/EnvelopedData.java b/src/main/java/com/adyen/model/nexo/EnvelopedData.java new file mode 100644 index 000000000..4d6cb40c8 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/EnvelopedData.java @@ -0,0 +1,132 @@ +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.XmlElements; +import javax.xml.bind.annotation.XmlType; +import java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Cryptographic Message Syntax (CMS) data structure containing encrypted data with encryption key -- Reference: RFC 3852: Cryptographic Message Syntax (CMS) -- Usage: This data structure contains: the version of the data structure (which is v0 in EPAS protocol context) the protected encrytion key for every adressee (recipient) the encrypted data + * + *

Java class for EnvelopedData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="EnvelopedData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <choice maxOccurs="unbounded">
+ *           <element name="KeyTransport" type="{}KeyTransport"/>
+ *           <element name="KEK" type="{}KEK"/>
+ *         </choice>
+ *         <element name="EncryptedContent" type="{}EncryptedContent"/>
+ *       </sequence>
+ *       <attribute name="Version" type="{}VersionType" default="v0" />
+ *     </restriction>
+ *   </complexContent>
+ * </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) + }) + protected List keyTransportOrKEK; + /** + * The Encrypted content. + */ + @XmlElement(name = "EncryptedContent", required = true) + protected EncryptedContent encryptedContent; + /** + * The Version. + */ + @XmlElement(name = "Version") + protected VersionType version; + + /** + * Gets the value of the keyTransportOrKEK property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the keyTransportOrKEK property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getKeyTransportOrKEK().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link KeyTransport } + * {@link KEK } + * + * @return the key transport or kek + */ + public List getKeyTransportOrKEK() { + if (keyTransportOrKEK == null) { + keyTransportOrKEK = new ArrayList<>(); + } + return this.keyTransportOrKEK; + } + + /** + * Gets the value of the encryptedContent property. + * + * @return possible object is {@link EncryptedContent } + */ + public EncryptedContent getEncryptedContent() { + return encryptedContent; + } + + /** + * Sets the value of the encryptedContent property. + * + * @param value allowed object is {@link EncryptedContent } + */ + public void setEncryptedContent(EncryptedContent value) { + this.encryptedContent = value; + } + + /** + * Gets the value of the version property. + * + * @return possible object is {@link VersionType } + */ + public VersionType getVersion() { + if (version == null) { + return VersionType.V_0; + } else { + return version; + } + } + + /** + * Sets the value of the version property. + * + * @param value allowed object is {@link VersionType } + */ + public void setVersion(VersionType value) { + this.version = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/ErrorConditionType.java b/src/main/java/com/adyen/model/nexo/ErrorConditionType.java new file mode 100644 index 000000000..43c62ee9a --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ErrorConditionType.java @@ -0,0 +1,190 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for ErrorConditionType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="ErrorConditionType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Aborted"/>
+ *     <enumeration value="Busy"/>
+ *     <enumeration value="Cancel"/>
+ *     <enumeration value="DeviceOut"/>
+ *     <enumeration value="InsertedCard"/>
+ *     <enumeration value="InProgress"/>
+ *     <enumeration value="LoggedOut"/>
+ *     <enumeration value="MessageFormat"/>
+ *     <enumeration value="NotAllowed"/>
+ *     <enumeration value="NotFound"/>
+ *     <enumeration value="PaymentRestriction"/>
+ *     <enumeration value="Refusal"/>
+ *     <enumeration value="UnavailableDevice"/>
+ *     <enumeration value="UnavailableService"/>
+ *     <enumeration value="InvalidCard"/>
+ *     <enumeration value="UnreachableHost"/>
+ *     <enumeration value="WrongPIN"/>
+ *   </restriction>
+ * </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") + @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") + @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") + @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") + @Schema(description = "Device out of order") + DEVICE_OUT("DeviceOut"), + + /** + * 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") + @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") + @Schema(description = "The transaction is still in progress and then the command cannot be processed") + IN_PROGRESS("InProgress"), + + /** + * Not logged in + */ + @XmlEnumValue("LoggedOut") + @Schema(description = "Not logged in") + LOGGED_OUT("LoggedOut"), + + /** + * Error on the format of the messageType, AdditionalResponse shall contain the identification of the data, and the reason in clear text. + */ + @XmlEnumValue("MessageFormat") + @Schema(description = "Error on the format of the message, AdditionalResponse shall contain the identification of the data, and the reason in clear text.") + MESSAGE_FORMAT("MessageFormat"), + + /** + * 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") + @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") + @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") + @Schema(description = "Some sale items are not payable by the card proposed by the Customer.") + PAYMENT_RESTRICTION("PaymentRestriction"), + + /** + * The transaction is refused by the host or the rules associated to the card, and cannot be repeated. + */ + @XmlEnumValue("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") + @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") + @Schema(description = "The service is not available (not implemented, not configured, protocol version too old...)") + UNAVAILABLE_SERVICE("UnavailableService"), + + /** + * The card entered by the Customer cannot be processed by the POI because this card is not configured in the system + */ + @XmlEnumValue("InvalidCard") + @Schema(description = "The card entered by the Customer cannot be processed by the POI because this card is not configured in the system") + INVALID_CARD("InvalidCard"), + + /** + * 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") + @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") + @Schema(description = "The user has entered the PIN on the PED keyboard and the verification fails.") + WRONG_PIN("WrongPIN"); + private final String value; + + ErrorConditionType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value error condition type. + * + * @param v the v + * @return the error condition type + */ + public static ErrorConditionType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/EventNotification.java b/src/main/java/com/adyen/model/nexo/EventNotification.java new file mode 100644 index 000000000..f5e033f9c --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/EventNotification.java @@ -0,0 +1,218 @@ +package com.adyen.model.nexo; + +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; + + +/** + * Definition: Content of the EventNotification messageType. -- Usage: It conveys Information related to the event, and possible action (maintenance, messageType to display). + * + *

Java class for EventNotification complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="EventNotification">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="EventDetails" type="{}EventDetails" minOccurs="0"/>
+ *         <element name="RejectedMessage" type="{}RejectedMessage" minOccurs="0"/>
+ *         <element name="DisplayOutput" type="{}DisplayOutput" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="TimeStamp" use="required" type="{}TimeStamp" />
+ *       <attribute name="EventToNotify" use="required" type="{}EventToNotifyType" />
+ *       <attribute name="MaintenanceRequiredFlag" type="{}MaintenanceRequiredFlag" default="false" />
+ *       <attribute name="CustomerLanguage" type="{}ISOLanguage2A" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EventNotification", propOrder = { + "eventDetails", + "rejectedMessage", + "displayOutput" +}) +public class EventNotification { + + /** + * The Event details. + */ + @XmlElement(name = "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") + @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") + @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) + @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) + @Schema(description = "Event the POI notifies to the Sale System.") + protected EventToNotifyType eventToNotify; + /** + * The Maintenance required flag. + */ + @XmlElement(name = "MaintenanceRequiredFlag") + @Schema(description = "Indicates if the occurred event requires maintenance call or action.") + protected Boolean maintenanceRequiredFlag; + /** + * The Customer language. + */ + @XmlElement(name = "CustomerLanguage") + @Schema(description = "Language of the Customer --Rule: EventToNotify") + protected String customerLanguage; + + /** + * Gets the value of the eventDetails property. + * + * @return possible object is {@link String } + */ + public String getEventDetails() { + return eventDetails; + } + + /** + * Sets the value of the eventDetails property. + * + * @param value allowed object is {@link String } + */ + public void setEventDetails(String value) { + this.eventDetails = value; + } + + /** + * Gets the value of the rejectedMessage property. + * + * @return possible object is byte[] + */ + public byte[] getRejectedMessage() { + return rejectedMessage; + } + + /** + * Sets the value of the rejectedMessage property. + * + * @param value allowed object is byte[] + */ + public void setRejectedMessage(byte[] value) { + this.rejectedMessage = value; + } + + /** + * Gets the value of the displayOutput property. + * + * @return possible object is {@link DisplayOutput } + */ + public DisplayOutput getDisplayOutput() { + return displayOutput; + } + + /** + * Sets the value of the displayOutput property. + * + * @param value allowed object is {@link DisplayOutput } + */ + public void setDisplayOutput(DisplayOutput value) { + this.displayOutput = value; + } + + /** + * Gets the value of the timeStamp property. + * + * @return possible object is {@link XMLGregorianCalendar } + */ + public XMLGregorianCalendar getTimeStamp() { + return timeStamp; + } + + /** + * Sets the value of the timeStamp property. + * + * @param value allowed object is {@link XMLGregorianCalendar } + */ + public void setTimeStamp(XMLGregorianCalendar value) { + this.timeStamp = value; + } + + /** + * Gets the value of the eventToNotify property. + * + * @return possible object is {@link EventToNotifyType } + */ + public EventToNotifyType getEventToNotify() { + return eventToNotify; + } + + /** + * Sets the value of the eventToNotify property. + * + * @param value allowed object is {@link EventToNotifyType } + */ + public void setEventToNotify(EventToNotifyType value) { + this.eventToNotify = value; + } + + /** + * Gets the value of the maintenanceRequiredFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isMaintenanceRequiredFlag() { + if (maintenanceRequiredFlag == null) { + return false; + } else { + return maintenanceRequiredFlag; + } + } + + /** + * Sets the value of the maintenanceRequiredFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setMaintenanceRequiredFlag(Boolean value) { + this.maintenanceRequiredFlag = value; + } + + /** + * Gets the value of the customerLanguage property. + * + * @return possible object is {@link String } + */ + public String getCustomerLanguage() { + return customerLanguage; + } + + /** + * Sets the value of the customerLanguage property. + * + * @param value allowed object is {@link String } + */ + public void setCustomerLanguage(String value) { + this.customerLanguage = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/EventToNotifyType.java b/src/main/java/com/adyen/model/nexo/EventToNotifyType.java new file mode 100644 index 000000000..2aa9e5aaa --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/EventToNotifyType.java @@ -0,0 +1,182 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for EventToNotifyType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="EventToNotifyType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="BeginMaintenance"/>
+ *     <enumeration value="EndMaintenance"/>
+ *     <enumeration value="Shutdown"/>
+ *     <enumeration value="Initialised"/>
+ *     <enumeration value="OutOfOrder"/>
+ *     <enumeration value="Completed"/>
+ *     <enumeration value="Abort"/>
+ *     <enumeration value="SaleWakeUp"/>
+ *     <enumeration value="SaleAdmin"/>
+ *     <enumeration value="CustomerLanguage"/>
+ *     <enumeration value="KeyPressed"/>
+ *     <enumeration value="SecurityAlarm"/>
+ *     <enumeration value="StopAssistance"/>
+ *     <enumeration value="CardInserted"/>
+ *     <enumeration value="CardRemoved"/>
+ *     <enumeration value="Reject"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "EventToNotifyType") +@XmlEnum +public enum EventToNotifyType { + + + /** + * Begin of POI Maintenance + */ + @XmlEnumValue("BeginMaintenance") + @Schema(description = "Begin of POI Maintenance") + BEGIN_MAINTENANCE("BeginMaintenance"), + + /** + * End of POI Maintenance + */ + @XmlEnumValue("EndMaintenance") + @Schema(description = "End of POI Maintenance") + END_MAINTENANCE("EndMaintenance"), + + /** + * The POI Terminal or the POI System is shutting down + */ + @XmlEnumValue("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") + @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") + @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") + @Schema(description = "An Abort request has been sent to abort a message which is already completed.") + COMPLETED("Completed"), + + /** + * 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") + @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") + ABORT("Abort"), + + /** + * A POI terminal requests the payment of the transaction identified by the content of EventDetails in the Event notification. + */ + @XmlEnumValue("SaleWakeUp") + @Schema(description = "A POI terminal requests the payment of the transaction identified by the content of EventDetails in the Event notification.") + SALE_WAKE_UP("SaleWakeUp"), + + /** + * The POI has performed, or want to perform an automatic administrative process, e.g. the reports at the end of day. + */ + @XmlEnumValue("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") + @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") + @Schema(description = "The customer has pressed a specific key on the POI.") + KEY_PRESSED("KeyPressed"), + + /** + * Problem of security + */ + @XmlEnumValue("SecurityAlarm") + @Schema(description = "Problem of security") + SECURITY_ALARM("SecurityAlarm"), + + /** + * When the Customer assistance is stopped, because the Customer has completed its input. + */ + @XmlEnumValue("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") + @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") + @Schema(description = "A card is removed from the card reader.") + CARD_REMOVED("CardRemoved"), + + /** + * A messageType request is rejected. An error explanation and the messageType in error have to be put in the EventDetails data element. + */ + @XmlEnumValue("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"); + private final String value; + + EventToNotifyType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value event to notify type. + * + * @param v the v + * @return the event to notify type + */ + public static EventToNotifyType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/ForceEntryModeType.java b/src/main/java/com/adyen/model/nexo/ForceEntryModeType.java new file mode 100644 index 000000000..e8282293d --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ForceEntryModeType.java @@ -0,0 +1,138 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for ForceEntryModeType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="ForceEntryModeType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="RFID"/>
+ *     <enumeration value="Keyed"/>
+ *     <enumeration value="Manual"/>
+ *     <enumeration value="File"/>
+ *     <enumeration value="Scanned"/>
+ *     <enumeration value="MagStripe"/>
+ *     <enumeration value="ICC"/>
+ *     <enumeration value="SynchronousICC"/>
+ *     <enumeration value="Tapped"/>
+ *     <enumeration value="Contactless"/>
+ *     <enumeration value="CheckReader"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "ForceEntryModeType") +@XmlEnum +public enum ForceEntryModeType { + + + /** + * Payment instrument information are taken from RFID + */ + RFID("RFID"), + + /** + * Manual key entry + */ + @XmlEnumValue("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") + @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") + @Schema(description = "Account data on file") + FILE("File"), + + /** + * Scanned by a bar code reader. + */ + @XmlEnumValue("Scanned") + @Schema(description = "Scanned by a bar code reader.") + SCANNED("Scanned"), + + /** + * Magnetic stripe + */ + @XmlEnumValue("MagStripe") + @Schema(description = "Magnetic stripe ") + MAG_STRIPE("MagStripe"), + + /** + * Contact ICC (asynchronous) + */ + ICC("ICC"), + + /** + * Contact ICC (synchronous) + */ + @XmlEnumValue("SynchronousICC") + @Schema(description = "Contact ICC (synchronous)") + SYNCHRONOUS_ICC("SynchronousICC"), + + /** + * Contactless card reader Magnetic Stripe + */ + @XmlEnumValue("Tapped") + @Schema(description = "Contactless card reader Magnetic Stripe") + TAPPED("Tapped"), + + /** + * Contactless card reader conform to ISO 14443 + */ + @XmlEnumValue("Contactless") + @Schema(description = "Contactless card reader conform to ISO 14443") + CONTACTLESS("Contactless"), + + /** + * Check Reader + */ + @XmlEnumValue("CheckReader") + @Schema(description = "Check Reader") + CHECK_READER("CheckReader"); + private final String value; + + ForceEntryModeType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value force entry mode type. + * + * @param v the v + * @return the force entry mode type + */ + public static ForceEntryModeType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/GenericProfileType.java b/src/main/java/com/adyen/model/nexo/GenericProfileType.java new file mode 100644 index 000000000..b78f5ae37 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/GenericProfileType.java @@ -0,0 +1,78 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for GenericProfileType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="GenericProfileType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Basic"/>
+ *     <enumeration value="Standard"/>
+ *     <enumeration value="Extended"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "GenericProfileType") +@XmlEnum +public enum GenericProfileType { + + + /** + * Protocol services that needs to be implemented by all the Sale and POI + */ + @XmlEnumValue("Basic") + @Schema(description = "Protocol services that needs to be implemented by all the Sale and POI") + BASIC("Basic"), + + /** + * Protocol services involving interaction between Sale System and POI System as devices shared between the two Systems. + */ + @XmlEnumValue("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") + @Schema(description = "Complete Protocol services") + EXTENDED("Extended"); + private final String value; + + GenericProfileType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value generic profile type. + * + * @param v the v + * @return the generic profile type + */ + public static GenericProfileType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/GeographicCoordinates.java b/src/main/java/com/adyen/model/nexo/GeographicCoordinates.java new file mode 100644 index 000000000..975610bc4 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/GeographicCoordinates.java @@ -0,0 +1,87 @@ +package com.adyen.model.nexo; + +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 position. -- Usage: Identifies the geographic location of a mobile phone. + * + *

Java class for GeographicCoordinates complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="GeographicCoordinates">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Latitude" type="{}Latitude"/>
+ *         <element name="Longitude" type="{}Longitude"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "GeographicCoordinates", propOrder = { + "latitude", + "longitude" +}) +public class GeographicCoordinates { + + /** + * The Latitude. + */ + @XmlElement(name = "Latitude", required = true) + @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) + @Schema(description = "Angular measurement of the distance of a location on the earth east or west of the Greenwich observatory.") + protected String longitude; + + /** + * Gets the value of the latitude property. + * + * @return possible object is {@link String } + */ + public String getLatitude() { + return latitude; + } + + /** + * Sets the value of the latitude property. + * + * @param value allowed object is {@link String } + */ + public void setLatitude(String value) { + this.latitude = value; + } + + /** + * Gets the value of the longitude property. + * + * @return possible object is {@link String } + */ + public String getLongitude() { + return longitude; + } + + /** + * Sets the value of the longitude property. + * + * @param value allowed object is {@link String } + */ + public void setLongitude(String value) { + this.longitude = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/Geolocation.java b/src/main/java/com/adyen/model/nexo/Geolocation.java new file mode 100644 index 000000000..904b30ada --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/Geolocation.java @@ -0,0 +1,87 @@ +package com.adyen.model.nexo; + +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 the geographic location of a mobile phone. + * + *

Java class for Geolocation complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Geolocation">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="GeographicCoordinates" type="{}GeographicCoordinates" minOccurs="0"/>
+ *         <element name="UTMCoordinates" type="{}UTMCoordinates" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Geolocation", propOrder = { + "geographicCoordinates", + "utmCoordinates" +}) +public class Geolocation { + + /** + * The Geographic coordinates. + */ + @XmlElement(name = "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") + @Schema(description = "Location on the Earth specified by the Universal Transverse Mercator coordinate system.") + protected UTMCoordinates utmCoordinates; + + /** + * Gets the value of the geographicCoordinates property. + * + * @return possible object is {@link GeographicCoordinates } + */ + public GeographicCoordinates getGeographicCoordinates() { + return geographicCoordinates; + } + + /** + * Sets the value of the geographicCoordinates property. + * + * @param value allowed object is {@link GeographicCoordinates } + */ + public void setGeographicCoordinates(GeographicCoordinates value) { + this.geographicCoordinates = value; + } + + /** + * Gets the value of the utmCoordinates property. + * + * @return possible object is {@link UTMCoordinates } + */ + public UTMCoordinates getUTMCoordinates() { + return utmCoordinates; + } + + /** + * Sets the value of the utmCoordinates property. + * + * @param value allowed object is {@link UTMCoordinates } + */ + public void setUTMCoordinates(UTMCoordinates value) { + this.utmCoordinates = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/GetTotalsRequest.java b/src/main/java/com/adyen/model/nexo/GetTotalsRequest.java new file mode 100644 index 000000000..4a21e8761 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/GetTotalsRequest.java @@ -0,0 +1,102 @@ +package com.adyen.model.nexo; + +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.XmlList; +import javax.xml.bind.annotation.XmlType; +import java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Get Totals Request messageType. -- Usage: It conveys information from the Sale System related to the scope and the format of the totals to be computed by the POI System. + * + *

Java class for GetTotalsRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="GetTotalsRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="TotalDetails" type="{}TotalDetails" minOccurs="0"/>
+ *         <element name="TotalFilter" type="{}TotalFilter" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "GetTotalsRequest", propOrder = { + "totalDetails", + "totalFilter" +}) +public class GetTotalsRequest { + + /** + * The Total details. + */ + @XmlList + @XmlElement(name = "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") + @Schema(description = "Filter to compute the totals. --Rule: If structure is not empty") + protected TotalFilter totalFilter; + + /** + * Gets the value of the totalDetails property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the totalDetails property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getTotalDetails().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link TotalDetailsType } + * + * @return the total details + */ + public List getTotalDetails() { + if (totalDetails == null) { + totalDetails = new ArrayList<>(); + } + return this.totalDetails; + } + + /** + * Gets the value of the totalFilter property. + * + * @return possible object is {@link TotalFilter } + */ + public TotalFilter getTotalFilter() { + return totalFilter; + } + + /** + * Sets the value of the totalFilter property. + * + * @param value allowed object is {@link TotalFilter } + */ + public void setTotalFilter(TotalFilter value) { + this.totalFilter = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/GetTotalsResponse.java b/src/main/java/com/adyen/model/nexo/GetTotalsResponse.java new file mode 100644 index 000000000..1af895511 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/GetTotalsResponse.java @@ -0,0 +1,125 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Reconciliation Response messageType. -- Usage: It conveys Information related to the Reconciliation transaction processed by the POI System + * + *

Java class for GetTotalsResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="GetTotalsResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="TransactionTotals" type="{}TransactionTotals" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="POIReconciliationID" use="required" type="{}POIReconciliationID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "GetTotalsResponse", propOrder = { + "response", + "transactionTotals" +}) +public class GetTotalsResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Transaction totals. + */ + @XmlElement(name = "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) + @Schema(description = "Identification of the reconciliation period between Sale and POI. ") + protected String poiReconciliationID; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the transactionTotals property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the transactionTotals property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getTransactionTotals().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link TransactionTotals } + * + * @return the transaction totals + */ + public List getTransactionTotals() { + if (transactionTotals == null) { + transactionTotals = new ArrayList<>(); + } + return this.transactionTotals; + } + + /** + * Gets the value of the poiReconciliationID property. + * + * @return possible object is {@link String } + */ + public String getPOIReconciliationID() { + return poiReconciliationID; + } + + /** + * Sets the value of the poiReconciliationID property. + * + * @param value allowed object is {@link String } + */ + public void setPOIReconciliationID(String value) { + this.poiReconciliationID = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/GlobalStatusType.java b/src/main/java/com/adyen/model/nexo/GlobalStatusType.java new file mode 100644 index 000000000..7c4b7398b --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/GlobalStatusType.java @@ -0,0 +1,84 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for GlobalStatusType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="GlobalStatusType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="OK"/>
+ *     <enumeration value="Busy"/>
+ *     <enumeration value="Maintenance"/>
+ *     <enumeration value="Unreachable"/>
+ *   </restriction>
+ * </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") + @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") + @Schema(description = "The POI is in maintenance processing") + MAINTENANCE("Maintenance"), + + /** + * The POI is unreachable or not responding + */ + @XmlEnumValue("Unreachable") + @Schema(description = "The POI is unreachable or not responding") + UNREACHABLE("Unreachable"); + private final String value; + + GlobalStatusType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value global status type. + * + * @param v the v + * @return the global status type + */ + public static GlobalStatusType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/HostStatus.java b/src/main/java/com/adyen/model/nexo/HostStatus.java new file mode 100644 index 000000000..c06378ba7 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/HostStatus.java @@ -0,0 +1,86 @@ +package com.adyen.model.nexo; + +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. + * + *

Java class for HostStatus complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="HostStatus">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="AcquirerID" use="required" type="{}AcquirerID" />
+ *       <attribute name="IsReachableFlag" type="{}IsReachableFlag" default="true" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "HostStatus") +public class HostStatus { + + /** + * The Acquirer id. + */ + @XmlElement(name = "AcquirerID", required = true) + @Schema(description = "Identification of the Acquirer") + protected String acquirerID; + /** + * The Is reachable flag. + */ + @XmlElement(name = "IsReachableFlag") + @Schema(description = "Indicate if a Host is reachable") + protected Boolean isReachableFlag; + + /** + * Gets the value of the acquirerID property. + * + * @return possible object is {@link String } + */ + public String getAcquirerID() { + return acquirerID; + } + + /** + * Sets the value of the acquirerID property. + * + * @param value allowed object is {@link String } + */ + public void setAcquirerID(String value) { + this.acquirerID = value; + } + + /** + * Gets the value of the isReachableFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isIsReachableFlag() { + if (isReachableFlag == null) { + return true; + } else { + return isReachableFlag; + } + } + + /** + * Sets the value of the isReachableFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setIsReachableFlag(Boolean value) { + this.isReachableFlag = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/ICCResetData.java b/src/main/java/com/adyen/model/nexo/ICCResetData.java new file mode 100644 index 000000000..126a7dac1 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ICCResetData.java @@ -0,0 +1,82 @@ +package com.adyen.model.nexo; + +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 request + * + *

Java class for ICCResetData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ICCResetData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="ATRValue" type="{}ATRValue" />
+ *       <attribute name="CardStatusWords" type="{}CardStatusWords" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ICCResetData") +public class ICCResetData { + + /** + * The Atr value. + */ + @XmlElement(name = "ATRValue") + @Schema(description = "Value of the Answer To Reset of a chip card --Rule: if available", minLength = 1, maxLength = 100) + protected byte[] atrValue; + /** + * The Card status words. + */ + @XmlElement(name = "CardStatusWords") + @Schema(description = "Status of a smartcard response to a command (SW1-SW2) --Rule: if available", minLength = 2, maxLength = 2) + protected byte[] cardStatusWords; + + /** + * Gets the value of the atrValue property. + * + * @return possible object is byte[] + */ + public byte[] getATRValue() { + return atrValue; + } + + /** + * Sets the value of the atrValue property. + * + * @param value allowed object is byte[] + */ + public void setATRValue(byte[] value) { + this.atrValue = value; + } + + /** + * Gets the value of the cardStatusWords property. + * + * @return possible object is byte[] + */ + public byte[] getCardStatusWords() { + return cardStatusWords; + } + + /** + * Sets the value of the cardStatusWords property. + * + * @param value allowed object is byte[] + */ + public void setCardStatusWords(byte[] value) { + this.cardStatusWords = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/IdentificationSupportType.java b/src/main/java/com/adyen/model/nexo/IdentificationSupportType.java new file mode 100644 index 000000000..11ba73233 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/IdentificationSupportType.java @@ -0,0 +1,86 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for IdentificationSupportType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="IdentificationSupportType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="NoCard"/>
+ *     <enumeration value="LoyaltyCard"/>
+ *     <enumeration value="HybridCard"/>
+ *     <enumeration value="LinkedCard"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "IdentificationSupportType") +@XmlEnum +public enum IdentificationSupportType { + + + /** + * The identification is not found on a card + */ + @XmlEnumValue("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") + @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") + @Schema(description = "The identification is on a card which might be used both for the loyalty and the payment.") + HYBRID_CARD("HybridCard"), + + /** + * The loyalty account is implicitly attached to the payment card. This is usually detected by the loyalty Acquirer. + */ + @XmlEnumValue("LinkedCard") + @Schema(description = "The loyalty account is implicitly attached to the payment card. This is usually detected by the loyalty Acquirer.") + LINKED_CARD("LinkedCard"); + private final String value; + + IdentificationSupportType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value identification support type. + * + * @param v the v + * @return the identification support type + */ + public static IdentificationSupportType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/IdentificationType.java b/src/main/java/com/adyen/model/nexo/IdentificationType.java new file mode 100644 index 000000000..c41a43351 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/IdentificationType.java @@ -0,0 +1,92 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for IdentificationType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="IdentificationType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="PAN"/>
+ *     <enumeration value="ISOTrack2"/>
+ *     <enumeration value="BarCode"/>
+ *     <enumeration value="AccountNumber"/>
+ *     <enumeration value="PhoneNumber"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "IdentificationType") +@XmlEnum +public enum IdentificationType { + + + /** + * Standard card identification (card number) + */ + PAN("PAN"), + + /** + * ISO Track 2 including identification. + */ + @XmlEnumValue("ISOTrack2") + @Schema(description = "ISO Track 2 including identification.") + ISO_TRACK_2("ISOTrack2"), + + /** + * Bar-code with a specific form of identification + */ + @XmlEnumValue("BarCode") + @Schema(description = "Bar-code with a specific form of identification") + BAR_CODE("BarCode"), + + /** + * Account number + */ + @XmlEnumValue("AccountNumber") + @Schema(description = "Account number") + ACCOUNT_NUMBER("AccountNumber"), + + /** + * A phone number identifies the account on which the phone card is assigned. + */ + @XmlEnumValue("PhoneNumber") + @Schema(description = "A phone number identifies the account on which the phone card is assigned.") + PHONE_NUMBER("PhoneNumber"); + private final String value; + + IdentificationType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value identification type. + * + * @param v the v + * @return the identification type + */ + public static IdentificationType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/InfoQualifyType.java b/src/main/java/com/adyen/model/nexo/InfoQualifyType.java new file mode 100644 index 000000000..6dca4f4fc --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/InfoQualifyType.java @@ -0,0 +1,134 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for InfoQualifyType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="InfoQualifyType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Status"/>
+ *     <enumeration value="Error"/>
+ *     <enumeration value="Display"/>
+ *     <enumeration value="Sound"/>
+ *     <enumeration value="Input"/>
+ *     <enumeration value="POIReplication"/>
+ *     <enumeration value="CustomerAssistance"/>
+ *     <enumeration value="Receipt"/>
+ *     <enumeration value="Document"/>
+ *     <enumeration value="Voucher"/>
+ *   </restriction>
+ * </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") + @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") + @Schema(description = "The information is related to an error situation occurring on the message sender.") + ERROR("Error"), + + /** + * Standard display interface. + */ + @XmlEnumValue("Display") + @Schema(description = "Standard display interface.") + DISPLAY("Display"), + + /** + * Standard sound interface. + */ + @XmlEnumValue("Sound") + @Schema(description = "Standard sound interface.") + SOUND("Sound"), + + /** + * 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") + @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") + @Schema(description = "Information displayed on the Cardholder POI interface, replicated on the Cashier interface.") + POI_REPLICATION("POIReplication"), + + /** + * Input of the Cardholder POI interface which can be entered by the Cashier to assist the Customer. + */ + @XmlEnumValue("CustomerAssistance") + @Schema(description = "Input of the Cardholder POI interface which can be entered by the Cashier to assist the Customer.") + CUSTOMER_ASSISTANCE("CustomerAssistance"), + + /** + * 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") + @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.") + RECEIPT("Receipt"), + + /** + * 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") + @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") + DOCUMENT("Document"), + + /** + * Coupons, voucher or special ticket generated by the POI or the Sale System and to be printed. + */ + @XmlEnumValue("Voucher") + @Schema(description = "Coupons, voucher or special ticket generated by the POI or the Sale System and to be printed.") + VOUCHER("Voucher"); + private final String value; + + InfoQualifyType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value info qualify type. + * + * @param v the v + * @return the info qualify type + */ + public static InfoQualifyType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/Input.java b/src/main/java/com/adyen/model/nexo/Input.java new file mode 100644 index 000000000..622ca63e8 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/Input.java @@ -0,0 +1,216 @@ +package com.adyen.model.nexo; + +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 which contains data entered by the user on the requested device, depending on the requested InputCommand:GetConfirmation: the input is in ConfirmedFlag.GetAnyKey: there is no input.GetFunctionKey: the input is in + * + *

Java class for Input complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Input">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ConfirmedFlag" type="{}ConfirmedFlag" minOccurs="0"/>
+ *         <element name="FunctionKey" type="{}FunctionKey" minOccurs="0"/>
+ *         <element name="TextInput" type="{}TextInput" minOccurs="0"/>
+ *         <element name="DigitInput" type="{}DigitInput" minOccurs="0"/>
+ *         <element name="Password" type="{}ContentInformation" minOccurs="0"/>
+ *         <element name="MenuEntryNumber" type="{}MenuEntryNumber" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="InputCommand" use="required" type="{}InputCommandType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Input", propOrder = { + "confirmedFlag", + "functionKey", + "textInput", + "digitInput", + "password", + "menuEntryNumber" +}) +public class Input { + + /** + * The Confirmed flag. + */ + @XmlElement(name = "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") + @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") + @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") + @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") + @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") + @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) + @Schema(description = "Type of requested input --Rule: Copy") + protected InputCommandType inputCommand; + + /** + * Gets the value of the confirmedFlag property. + * + * @return possible object is {@link Boolean } + */ + public Boolean isConfirmedFlag() { + return confirmedFlag; + } + + /** + * Sets the value of the confirmedFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setConfirmedFlag(Boolean value) { + this.confirmedFlag = value; + } + + /** + * Gets the value of the functionKey property. + * + * @return possible object is {@link String } + */ + public String getFunctionKey() { + return functionKey; + } + + /** + * Sets the value of the functionKey property. + * + * @param value allowed object is {@link String } + */ + public void setFunctionKey(String value) { + this.functionKey = value; + } + + /** + * Gets the value of the textInput property. + * + * @return possible object is {@link String } + */ + public String getTextInput() { + return textInput; + } + + /** + * Sets the value of the textInput property. + * + * @param value allowed object is {@link String } + */ + public void setTextInput(String value) { + this.textInput = value; + } + + /** + * Gets the value of the digitInput property. + * + * @return possible object is {@link String } + */ + public String getDigitInput() { + return digitInput; + } + + /** + * Sets the value of the digitInput property. + * + * @param value allowed object is {@link String } + */ + public void setDigitInput(String value) { + this.digitInput = value; + } + + /** + * Gets the value of the password property. + * + * @return possible object is {@link ContentInformation } + */ + public ContentInformation getPassword() { + return password; + } + + /** + * Sets the value of the password property. + * + * @param value allowed object is {@link ContentInformation } + */ + public void setPassword(ContentInformation value) { + this.password = value; + } + + /** + * Gets the value of the menuEntryNumber property. + * + * @return possible object is Array of {@link Integer } + */ + public Integer[] getMenuEntryNumber() { + return menuEntryNumber; + } + + /** + * Sets the value of the menuEntryNumber property. + * + * @param value allowed object is Array of {@link Integer } + */ + public void setMenuEntryNumber(Integer[] value) { + this.menuEntryNumber = value; + } + + /** + * Gets the value of the inputCommand property. + * + * @return possible object is {@link InputCommandType } + */ + public InputCommandType getInputCommand() { + return inputCommand; + } + + /** + * Sets the value of the inputCommand property. + * + * @param value allowed object is {@link InputCommandType } + */ + public void setInputCommand(InputCommandType value) { + this.inputCommand = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/InputCommandType.java b/src/main/java/com/adyen/model/nexo/InputCommandType.java new file mode 100644 index 000000000..aef0893c5 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/InputCommandType.java @@ -0,0 +1,126 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for InputCommandType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="InputCommandType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="GetAnyKey"/>
+ *     <enumeration value="GetConfirmation"/>
+ *     <enumeration value="SiteManager"/>
+ *     <enumeration value="TextString"/>
+ *     <enumeration value="DigitString"/>
+ *     <enumeration value="DecimalString"/>
+ *     <enumeration value="GetFunctionKey"/>
+ *     <enumeration value="GetMenuEntry"/>
+ *     <enumeration value="Password"/>
+ *   </restriction>
+ * </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") + @Schema(description = "Wait for a key pressed on the Terminal, to be able to read the message displayed on the Terminal.") + GET_ANY_KEY("GetAnyKey"), + + /** + * 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") + @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") + @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") + @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") + @Schema(description = "Wait for a string of digit characters, the length range could be specified.") + DIGIT_STRING("DigitString"), + + /** + * Wait for a string of digit characters with a decimal point, the length range could be specified. + */ + @XmlEnumValue("DecimalString") + @Schema(description = "Wait for a string of digit characters with a decimal point, the length range could be specified.") + DECIMAL_STRING("DecimalString"), + + /** + * 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") + @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.") + GET_FUNCTION_KEY("GetFunctionKey"), + + /** + * To choose an entry among a list of entrys (all of them are not necessary selectable). The OutputFormat has to be MenuEntry. + */ + @XmlEnumValue("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") + @Schema(description = "Request to enter a password with masked characters while typing the password.") + PASSWORD("Password"); + private final String value; + + InputCommandType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value input command type. + * + * @param v the v + * @return the input command type + */ + public static InputCommandType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/InputData.java b/src/main/java/com/adyen/model/nexo/InputData.java new file mode 100644 index 000000000..34a252c17 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/InputData.java @@ -0,0 +1,582 @@ +package com.adyen.model.nexo; + +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 java.math.BigInteger; + + +/** + * Definition: Information related to an Input request. -- Usage: It conveys the target input logical device, the type of input command, and possible minimum and maximum length of the input. In addition, if the requestor might require to receive an Event Notification if a card is inserted in a card + * + *

Java class for InputData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InputData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DefaultInputString" type="{}DefaultInputString" minOccurs="0"/>
+ *         <element name="StringMask" type="{}StringMask" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Device" use="required" type="{}DeviceType" />
+ *       <attribute name="InfoQualify" use="required" type="{}InfoQualifyType" />
+ *       <attribute name="InputCommand" use="required" type="{}InputCommandType" />
+ *       <attribute name="NotifyCardInputFlag" type="{}NotifyCardInputFlag" default="false" />
+ *       <attribute name="MaxInputTime" type="{}MaxInputTime" />
+ *       <attribute name="ImmediateResponseFlag" type="{}ImmediateResponseFlag" default="false" />
+ *       <attribute name="MinLength" type="{}MinLength" />
+ *       <attribute name="MaxLength" type="{}MaxLength" />
+ *       <attribute name="MaxDecimalLength" type="{}MaxDecimalLength" />
+ *       <attribute name="WaitUserValidationFlag" type="{}WaitUserValidationFlag" default="true" />
+ *       <attribute name="FromRightToLeftFlag" type="{}FromRightToLeftFlag" default="false" />
+ *       <attribute name="MaskCharactersFlag" type="{}MaskCharactersFlag" default="false" />
+ *       <attribute name="BeepKeyFlag" type="{}BeepKeyFlag" default="false" />
+ *       <attribute name="GlobalCorrectionFlag" type="{}GlobalCorrectionFlag" default="false" />
+ *       <attribute name="DisableCancelFlag" type="{}DisableCancelFlag" default="false" />
+ *       <attribute name="DisableCorrectFlag" type="{}DisableCorrectFlag" default="false" />
+ *       <attribute name="DisableValidFlag" type="{}DisableValidFlag" default="false" />
+ *       <attribute name="MenuBackFlag" type="{}MenuBackFlag" default="false" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InputData", propOrder = { + "defaultInputString", + "stringMask" +}) +public class InputData { + + /** + * The Default input string. + */ + @XmlElement(name = "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") + @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) + @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) + @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) + @Schema(description = "Type of requested input") + protected InputCommandType inputCommand; + /** + * The Notify card input flag. + */ + @XmlElement(name = "NotifyCardInputFlag") + @Schema(description = "Request Notification of card entered in the POI card reader.") + protected Boolean notifyCardInputFlag; + /** + * The Max input time. + */ + @XmlElement(name = "MaxInputTime") + @Schema(description = "Maximum input time in seconds --Rule: If time limit for responding") + protected BigInteger maxInputTime; + /** + * The Immediate response flag. + */ + @XmlElement(name = "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") + @Schema(description = "Minimum input length --Rule: Not allowed if InputCommand is not TextString or DigitString") + protected BigInteger minLength; + /** + * The Max length. + */ + @XmlElement(name = "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") + @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") + @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") + @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") + @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") + @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") + @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") + @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") + @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") + @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") + @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.") + protected Boolean menuBackFlag; + + /** + * Gets the value of the defaultInputString property. + * + * @return possible object is {@link String } + */ + public String getDefaultInputString() { + return defaultInputString; + } + + /** + * Sets the value of the defaultInputString property. + * + * @param value allowed object is {@link String } + */ + public void setDefaultInputString(String value) { + this.defaultInputString = value; + } + + /** + * Gets the value of the stringMask property. + * + * @return possible object is {@link String } + */ + public String getStringMask() { + return stringMask; + } + + /** + * Sets the value of the stringMask property. + * + * @param value allowed object is {@link String } + */ + public void setStringMask(String value) { + this.stringMask = value; + } + + /** + * Gets the value of the device property. + * + * @return possible object is {@link DeviceType } + */ + public DeviceType getDevice() { + return device; + } + + /** + * Sets the value of the device property. + * + * @param value allowed object is {@link DeviceType } + */ + public void setDevice(DeviceType value) { + this.device = value; + } + + /** + * Gets the value of the infoQualify property. + * + * @return possible object is {@link InfoQualifyType } + */ + public InfoQualifyType getInfoQualify() { + return infoQualify; + } + + /** + * Sets the value of the infoQualify property. + * + * @param value allowed object is {@link InfoQualifyType } + */ + public void setInfoQualify(InfoQualifyType value) { + this.infoQualify = value; + } + + /** + * Gets the value of the inputCommand property. + * + * @return possible object is {@link InputCommandType } + */ + public InputCommandType getInputCommand() { + return inputCommand; + } + + /** + * Sets the value of the inputCommand property. + * + * @param value allowed object is {@link InputCommandType } + */ + public void setInputCommand(InputCommandType value) { + this.inputCommand = value; + } + + /** + * Gets the value of the notifyCardInputFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isNotifyCardInputFlag() { + if (notifyCardInputFlag == null) { + return false; + } else { + return notifyCardInputFlag; + } + } + + /** + * Sets the value of the notifyCardInputFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setNotifyCardInputFlag(Boolean value) { + this.notifyCardInputFlag = value; + } + + /** + * Gets the value of the maxInputTime property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getMaxInputTime() { + return maxInputTime; + } + + /** + * Sets the value of the maxInputTime property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setMaxInputTime(BigInteger value) { + this.maxInputTime = value; + } + + /** + * Gets the value of the immediateResponseFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isImmediateResponseFlag() { + if (immediateResponseFlag == null) { + return false; + } else { + return immediateResponseFlag; + } + } + + /** + * Sets the value of the immediateResponseFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setImmediateResponseFlag(Boolean value) { + this.immediateResponseFlag = value; + } + + /** + * Gets the value of the minLength property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getMinLength() { + return minLength; + } + + /** + * Sets the value of the minLength property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setMinLength(BigInteger value) { + this.minLength = value; + } + + /** + * Gets the value of the maxLength property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getMaxLength() { + return maxLength; + } + + /** + * Sets the value of the maxLength property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setMaxLength(BigInteger value) { + this.maxLength = value; + } + + /** + * Gets the value of the maxDecimalLength property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getMaxDecimalLength() { + return maxDecimalLength; + } + + /** + * Sets the value of the maxDecimalLength property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setMaxDecimalLength(BigInteger value) { + this.maxDecimalLength = value; + } + + /** + * Gets the value of the waitUserValidationFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isWaitUserValidationFlag() { + if (waitUserValidationFlag == null) { + return true; + } else { + return waitUserValidationFlag; + } + } + + /** + * Sets the value of the waitUserValidationFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setWaitUserValidationFlag(Boolean value) { + this.waitUserValidationFlag = value; + } + + /** + * Gets the value of the fromRightToLeftFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isFromRightToLeftFlag() { + if (fromRightToLeftFlag == null) { + return false; + } else { + return fromRightToLeftFlag; + } + } + + /** + * Sets the value of the fromRightToLeftFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setFromRightToLeftFlag(Boolean value) { + this.fromRightToLeftFlag = value; + } + + /** + * Gets the value of the maskCharactersFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isMaskCharactersFlag() { + if (maskCharactersFlag == null) { + return false; + } else { + return maskCharactersFlag; + } + } + + /** + * Sets the value of the maskCharactersFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setMaskCharactersFlag(Boolean value) { + this.maskCharactersFlag = value; + } + + /** + * Gets the value of the beepKeyFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isBeepKeyFlag() { + if (beepKeyFlag == null) { + return false; + } else { + return beepKeyFlag; + } + } + + /** + * Sets the value of the beepKeyFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setBeepKeyFlag(Boolean value) { + this.beepKeyFlag = value; + } + + /** + * Gets the value of the globalCorrectionFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isGlobalCorrectionFlag() { + if (globalCorrectionFlag == null) { + return false; + } else { + return globalCorrectionFlag; + } + } + + /** + * Sets the value of the globalCorrectionFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setGlobalCorrectionFlag(Boolean value) { + this.globalCorrectionFlag = value; + } + + /** + * Gets the value of the disableCancelFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isDisableCancelFlag() { + if (disableCancelFlag == null) { + return false; + } else { + return disableCancelFlag; + } + } + + /** + * Sets the value of the disableCancelFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setDisableCancelFlag(Boolean value) { + this.disableCancelFlag = value; + } + + /** + * Gets the value of the disableCorrectFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isDisableCorrectFlag() { + if (disableCorrectFlag == null) { + return false; + } else { + return disableCorrectFlag; + } + } + + /** + * Sets the value of the disableCorrectFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setDisableCorrectFlag(Boolean value) { + this.disableCorrectFlag = value; + } + + /** + * Gets the value of the disableValidFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isDisableValidFlag() { + if (disableValidFlag == null) { + return false; + } else { + return disableValidFlag; + } + } + + /** + * Sets the value of the disableValidFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setDisableValidFlag(Boolean value) { + this.disableValidFlag = value; + } + + /** + * Gets the value of the menuBackFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isMenuBackFlag() { + if (menuBackFlag == null) { + return false; + } else { + return menuBackFlag; + } + } + + /** + * Sets the value of the menuBackFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setMenuBackFlag(Boolean value) { + this.menuBackFlag = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/InputRequest.java b/src/main/java/com/adyen/model/nexo/InputRequest.java new file mode 100644 index 000000000..aad69593c --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/InputRequest.java @@ -0,0 +1,87 @@ +package com.adyen.model.nexo; + +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 the way to process the display, and contains the complete content to display. In addition to the display on the Input Device, it might contain an operation (the DisplayOutput element) per Display Device type. + * + *

Java class for InputRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InputRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DisplayOutput" type="{}DisplayOutput" minOccurs="0"/>
+ *         <element name="InputData" type="{}InputData"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InputRequest", propOrder = { + "displayOutput", + "inputData" +}) +public class InputRequest { + + /** + * The Display output. + */ + @XmlElement(name = "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) + @Schema(description = "Information related to an Input request.") + protected InputData inputData; + + /** + * Gets the value of the displayOutput property. + * + * @return possible object is {@link DisplayOutput } + */ + public DisplayOutput getDisplayOutput() { + return displayOutput; + } + + /** + * Sets the value of the displayOutput property. + * + * @param value allowed object is {@link DisplayOutput } + */ + public void setDisplayOutput(DisplayOutput value) { + this.displayOutput = value; + } + + /** + * Gets the value of the inputData property. + * + * @return possible object is {@link InputData } + */ + public InputData getInputData() { + return inputData; + } + + /** + * Sets the value of the inputData property. + * + * @param value allowed object is {@link InputData } + */ + public void setInputData(InputData value) { + this.inputData = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/InputResponse.java b/src/main/java/com/adyen/model/nexo/InputResponse.java new file mode 100644 index 000000000..50350a4e3 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/InputResponse.java @@ -0,0 +1,87 @@ +package com.adyen.model.nexo; + +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 outputs, parallel to the messageType request, except if response not required and absent.The result of the input + * + *

Java class for InputResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InputResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="OutputResult" type="{}OutputResult" minOccurs="0"/>
+ *         <element name="InputResult" type="{}InputResult"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InputResponse", propOrder = { + "outputResult", + "inputResult" +}) +public class InputResponse { + + /** + * The Output result. + */ + @XmlElement(name = "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) + @Schema(description = "Information related to the result the input.") + protected InputResult inputResult; + + /** + * Gets the value of the outputResult property. + * + * @return possible object is {@link OutputResult } + */ + public OutputResult getOutputResult() { + return outputResult; + } + + /** + * Sets the value of the outputResult property. + * + * @param value allowed object is {@link OutputResult } + */ + public void setOutputResult(OutputResult value) { + this.outputResult = value; + } + + /** + * Gets the value of the inputResult property. + * + * @return possible object is {@link InputResult } + */ + public InputResult getInputResult() { + return inputResult; + } + + /** + * Sets the value of the inputResult property. + * + * @param value allowed object is {@link InputResult } + */ + public void setInputResult(InputResult value) { + this.inputResult = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/InputResult.java b/src/main/java/com/adyen/model/nexo/InputResult.java new file mode 100644 index 000000000..cfae812ab --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/InputResult.java @@ -0,0 +1,137 @@ +package com.adyen.model.nexo; + +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, it contains the result and the content of the input. + * + *

Java class for InputResult complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InputResult">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="Input" type="{}Input" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Device" use="required" type="{}DeviceType" />
+ *       <attribute name="InfoQualify" use="required" type="{}InfoQualifyType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InputResult", propOrder = { + "response", + "input" +}) +public class InputResult { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Input. + */ + @XmlElement(name = "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) + @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) + @Schema(description = "Qualification of the information to sent to an output logical device, to display or print to the Cashier or the --Rule: Copy") + protected InfoQualifyType infoQualify; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the input property. + * + * @return possible object is {@link Input } + */ + public Input getInput() { + return input; + } + + /** + * Sets the value of the input property. + * + * @param value allowed object is {@link Input } + */ + public void setInput(Input value) { + this.input = value; + } + + /** + * Gets the value of the device property. + * + * @return possible object is {@link DeviceType } + */ + public DeviceType getDevice() { + return device; + } + + /** + * Sets the value of the device property. + * + * @param value allowed object is {@link DeviceType } + */ + public void setDevice(DeviceType value) { + this.device = value; + } + + /** + * Gets the value of the infoQualify property. + * + * @return possible object is {@link InfoQualifyType } + */ + public InfoQualifyType getInfoQualify() { + return infoQualify; + } + + /** + * Sets the value of the infoQualify property. + * + * @param value allowed object is {@link InfoQualifyType } + */ + public void setInfoQualify(InfoQualifyType value) { + this.infoQualify = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/InputUpdate.java b/src/main/java/com/adyen/model/nexo/InputUpdate.java new file mode 100644 index 000000000..94bba0077 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/InputUpdate.java @@ -0,0 +1,228 @@ +package com.adyen.model.nexo; + +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 java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Input Update messageType. -- Usage: It conveys update of the display of an Input request in progress. + * + *

Java class for InputUpdate complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InputUpdate">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MessageReference" type="{}MessageReference"/>
+ *         <element name="OutputContent" type="{}OutputContent"/>
+ *         <element name="MenuEntry" type="{}MenuEntry" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="OutputSignature" type="{}OutputSignature" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="MinLength" type="{}MinLength" />
+ *       <attribute name="MaxLength" type="{}MaxLength" />
+ *       <attribute name="MaxDecimalLength" type="{}MaxDecimalLength" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InputUpdate", propOrder = { + "messageReference", + "outputContent", + "menuEntry", + "outputSignature" +}) +public class InputUpdate { + + /** + * The Message reference. + */ + @XmlElement(name = "MessageReference", required = true) + @Schema(description = "Identification of a previous POI transaction.") + protected MessageReference messageReference; + /** + * The Output content. + */ + @XmlElement(name = "OutputContent", required = true) + @Schema(description = "Content to display or print.") + protected OutputContent outputContent; + /** + * The Menu entry. + */ + @XmlElement(name = "MenuEntry") + @Schema(description = "An entryof the menu to present to the Cashier") + protected List menuEntry; + /** + * The Output signature. + */ + @XmlElement(name = "OutputSignature") + @Schema(description = "Vendor specific signature of text message to display or print.") + protected byte[] outputSignature; + /** + * The Min length. + */ + @XmlElement(name = "MinLength") + @Schema(description = "Minimum input length --Rule: If present in the Input to update.") + protected BigInteger minLength; + /** + * The Max length. + */ + @XmlElement(name = "MaxLength") + @Schema(description = "Maximum input length --Rule: If present in the Input to update.") + protected BigInteger maxLength; + /** + * The Max decimal length. + */ + @XmlElement(name = "MaxDecimalLength") + @Schema(description = "Maximum input length of the decimal part (without decimal point) --Rule: If present in the Input to update.") + protected BigInteger maxDecimalLength; + + /** + * Gets the value of the messageReference property. + * + * @return possible object is {@link MessageReference } + */ + public MessageReference getMessageReference() { + return messageReference; + } + + /** + * Sets the value of the messageReference property. + * + * @param value allowed object is {@link MessageReference } + */ + public void setMessageReference(MessageReference value) { + this.messageReference = value; + } + + /** + * Gets the value of the outputContent property. + * + * @return possible object is {@link OutputContent } + */ + public OutputContent getOutputContent() { + return outputContent; + } + + /** + * Sets the value of the outputContent property. + * + * @param value allowed object is {@link OutputContent } + */ + public void setOutputContent(OutputContent value) { + this.outputContent = value; + } + + /** + * Gets the value of the menuEntry property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the menuEntry property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getMenuEntry().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link MenuEntry } + * + * @return the menu entry + */ + public List getMenuEntry() { + if (menuEntry == null) { + menuEntry = new ArrayList<>(); + } + return this.menuEntry; + } + + /** + * Gets the value of the outputSignature property. + * + * @return possible object is byte[] + */ + public byte[] getOutputSignature() { + return outputSignature; + } + + /** + * Sets the value of the outputSignature property. + * + * @param value allowed object is byte[] + */ + public void setOutputSignature(byte[] value) { + this.outputSignature = value; + } + + /** + * Gets the value of the minLength property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getMinLength() { + return minLength; + } + + /** + * Sets the value of the minLength property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setMinLength(BigInteger value) { + this.minLength = value; + } + + /** + * Gets the value of the maxLength property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getMaxLength() { + return maxLength; + } + + /** + * Sets the value of the maxLength property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setMaxLength(BigInteger value) { + this.maxLength = value; + } + + /** + * Gets the value of the maxDecimalLength property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getMaxDecimalLength() { + return maxDecimalLength; + } + + /** + * Sets the value of the maxDecimalLength property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setMaxDecimalLength(BigInteger value) { + this.maxDecimalLength = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/Instalment.java b/src/main/java/com/adyen/model/nexo/Instalment.java new file mode 100644 index 000000000..f3d7c2d14 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/Instalment.java @@ -0,0 +1,283 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; +import java.math.BigInteger; + + +/** + * Definition: Information related an instalment transaction. -- Usage: To request an instalment to the issuer, or to make individual instalments of a payment transaction. + * + *

Java class for Instalment complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Instalment">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="Instalment" type="{}InstalmentType" />
+ *       <attribute name="SequenceNumber" type="{}SequenceNumber" />
+ *       <attribute name="PlanID" type="{}PlanID" />
+ *       <attribute name="Period" type="{}Period" />
+ *       <attribute name="PeriodUnit" type="{}PeriodUnitType" />
+ *       <attribute name="FirstPaymentDate" type="{}ISODate" />
+ *       <attribute name="TotalNbOfPayments" type="{}TotalNbOfPayments" />
+ *       <attribute name="CumulativeAmount" type="{}SimpleAmountType" />
+ *       <attribute name="FirstAmount" type="{}SimpleAmountType" />
+ *       <attribute name="Charges" type="{}SimpleAmountType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Instalment") +public class Instalment { + + /** + * The Instalment type. + */ + @XmlElement(name = "InstalmentType") + @Schema(description = "Type of instalment transaction.") + protected InstalmentType instalmentType; + /** + * The Sequence number. + */ + @XmlElement(name = "SequenceNumber") + @Schema(description = "Sequence number of the instalment.") + protected BigInteger sequenceNumber; + /** + * The Plan id. + */ + @XmlElement(name = "PlanID") + @Schema(description = "Identification of an instalment plan.") + protected String planID; + /** + * The Period. + */ + @XmlElement(name = "Period") + @Schema(description = "Period of time with defined unit of time.") + protected BigInteger period; + /** + * The Period unit. + */ + @XmlElement(name = "PeriodUnit") + protected PeriodUnitType periodUnit; + /** + * The First payment date. + */ + @XmlElement(name = "FirstPaymentDate") + @Schema(description = "First date of a payment.") + protected String firstPaymentDate; + /** + * The Total nb of payments. + */ + @XmlElement(name = "TotalNbOfPayments") + @Schema(description = "Total number of payments.") + protected BigInteger totalNbOfPayments; + /** + * The Cumulative amount. + */ + @XmlElement(name = "CumulativeAmount") + @Schema(description = "Sum of a collection of amounts.") + protected BigDecimal cumulativeAmount; + /** + * The First amount. + */ + @XmlElement(name = "FirstAmount") + @Schema(description = "First amount of a payment.") + protected BigDecimal firstAmount; + /** + * The Charges. + */ + @XmlElement(name = "Charges") + @Schema(description = "Charges related to a transaction.") + protected BigDecimal charges; + + /** + * Gets the value of the instalment property. + * + * @return possible object is {@link InstalmentType } + */ + public InstalmentType getInstalmentType() { + return instalmentType; + } + + /** + * Sets the value of the instalmentType property. + * + * @param value allowed object is {@link InstalmentType } + */ + public void setInstalmentType(InstalmentType value) { + this.instalmentType = value; + } + + /** + * Gets the value of the sequenceNumber property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getSequenceNumber() { + return sequenceNumber; + } + + /** + * Sets the value of the sequenceNumber property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setSequenceNumber(BigInteger value) { + this.sequenceNumber = value; + } + + /** + * Gets the value of the planID property. + * + * @return possible object is {@link String } + */ + public String getPlanID() { + return planID; + } + + /** + * Sets the value of the planID property. + * + * @param value allowed object is {@link String } + */ + public void setPlanID(String value) { + this.planID = value; + } + + /** + * Gets the value of the period property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getPeriod() { + return period; + } + + /** + * Sets the value of the period property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setPeriod(BigInteger value) { + this.period = value; + } + + /** + * Gets the value of the periodUnit property. + * + * @return possible object is {@link PeriodUnitType } + */ + public PeriodUnitType getPeriodUnit() { + return periodUnit; + } + + /** + * Sets the value of the periodUnit property. + * + * @param value allowed object is {@link PeriodUnitType } + */ + public void setPeriodUnit(PeriodUnitType value) { + this.periodUnit = value; + } + + /** + * Gets the value of the firstPaymentDate property. + * + * @return possible object is {@link String } + */ + public String getFirstPaymentDate() { + return firstPaymentDate; + } + + /** + * Sets the value of the firstPaymentDate property. + * + * @param value allowed object is {@link String } + */ + public void setFirstPaymentDate(String value) { + this.firstPaymentDate = value; + } + + /** + * Gets the value of the totalNbOfPayments property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getTotalNbOfPayments() { + return totalNbOfPayments; + } + + /** + * Sets the value of the totalNbOfPayments property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setTotalNbOfPayments(BigInteger value) { + this.totalNbOfPayments = value; + } + + /** + * Gets the value of the cumulativeAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getCumulativeAmount() { + return cumulativeAmount; + } + + /** + * Sets the value of the cumulativeAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setCumulativeAmount(BigDecimal value) { + this.cumulativeAmount = value; + } + + /** + * Gets the value of the firstAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getFirstAmount() { + return firstAmount; + } + + /** + * Sets the value of the firstAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setFirstAmount(BigDecimal value) { + this.firstAmount = value; + } + + /** + * Gets the value of the charges property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getCharges() { + return charges; + } + + /** + * Sets the value of the charges property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setCharges(BigDecimal value) { + this.charges = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/InstalmentType.java b/src/main/java/com/adyen/model/nexo/InstalmentType.java new file mode 100644 index 000000000..8915efe87 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/InstalmentType.java @@ -0,0 +1,78 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for InstalmentType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="InstalmentType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="DeferredInstalments"/>
+ *     <enumeration value="EqualInstalments"/>
+ *     <enumeration value="InequalInstalments"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "InstalmentType") +@XmlEnum +public enum InstalmentType { + + + /** + * The payment of the service or goods is deferred. + */ + @XmlEnumValue("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") + @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") + @Schema(description = "The payment is split in several instalments of different amounts.") + INEQUAL_INSTALMENTS("InequalInstalments"); + private final String value; + + InstalmentType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value instalment type. + * + * @param v the v + * @return the instalment type + */ + public static InstalmentType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/Issuer.java b/src/main/java/com/adyen/model/nexo/Issuer.java new file mode 100644 index 000000000..59642f3d0 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/Issuer.java @@ -0,0 +1,71 @@ +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Certificate issuer name (see X.501-88) -- Reference: RFC 3880: Internet X.509 Public Key Infrastructure Certificate and Certificate -- Usage: The Issuer field identifies the entity that has signed and issued the certificate. It contains hierarchical name composed of attributes, such as country, organization, organizational-unit, common name. + * + *

Java class for Issuer complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Issuer">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="RelativeDistinguishedName" type="{}RelativeDistinguishedName" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Issuer", propOrder = { + "relativeDistinguishedName" +}) +public class Issuer { + + /** + * The Relative distinguished name. + */ + @XmlElement(name = "RelativeDistinguishedName", required = true) + protected List relativeDistinguishedName; + + /** + * Gets the value of the relativeDistinguishedName property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the relativeDistinguishedName property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getRelativeDistinguishedName().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link RelativeDistinguishedName } + * + * @return the relative distinguished name + */ + public List getRelativeDistinguishedName() { + if (relativeDistinguishedName == null) { + relativeDistinguishedName = new ArrayList<>(); + } + return this.relativeDistinguishedName; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/IssuerAndSerialNumber.java b/src/main/java/com/adyen/model/nexo/IssuerAndSerialNumber.java new file mode 100644 index 000000000..6524306eb --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/IssuerAndSerialNumber.java @@ -0,0 +1,84 @@ +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 java.math.BigInteger; + + +/** + * Definition: Cryptographic Message Syntax (CMS) data structure containing the issuer name and certificate serial number -- Reference: RFC 3852: Cryptographic Message Syntax (CMS) -- Usage: This data structure contains: the issuer name (see X.501-88) the certificate serial number (see X.509-97) This the value of input parameter sid. + * + *

Java class for IssuerAndSerialNumber complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="IssuerAndSerialNumber">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Issuer" type="{}Issuer"/>
+ *         <element name="SerialNumber" type="{}SerialNumber"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "IssuerAndSerialNumber", propOrder = { + "issuer", + "serialNumber" +}) +public class IssuerAndSerialNumber { + + /** + * The Issuer. + */ + @XmlElement(name = "Issuer", required = true) + protected Issuer issuer; + /** + * The Serial number. + */ + @XmlElement(name = "SerialNumber", required = true) + protected BigInteger serialNumber; + + /** + * Gets the value of the issuer property. + * + * @return possible object is {@link Issuer } + */ + public Issuer getIssuer() { + return issuer; + } + + /** + * Sets the value of the issuer property. + * + * @param value allowed object is {@link Issuer } + */ + public void setIssuer(Issuer value) { + this.issuer = value; + } + + /** + * Gets the value of the serialNumber property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getSerialNumber() { + return serialNumber; + } + + /** + * Sets the value of the serialNumber property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setSerialNumber(BigInteger value) { + this.serialNumber = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/KEK.java b/src/main/java/com/adyen/model/nexo/KEK.java new file mode 100644 index 000000000..c9e5c16be --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/KEK.java @@ -0,0 +1,135 @@ +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; + + +/** + * Definition: Encryption key using previously distributed symmetric key -- Reference: RFC 3852: Cryptographic Message Syntax (CMS) -- Usage: This data structure contains: the version of the data structure (v4) the key identifier the key encryption algorithm the encrypted key + * + *

Java class for KEK complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="KEK">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="KEKIdentifier" type="{}KEKIdentifier"/>
+ *         <element name="KeyEncryptionAlgorithm" type="{}AlgorithmIdentifier"/>
+ *       </sequence>
+ *       <attribute name="Version" type="{}VersionType" default="v4" />
+ *       <attribute name="EncryptedKey" use="required" type="{}EncryptedKey" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "KEK", propOrder = { + "kekIdentifier", + "keyEncryptionAlgorithm" +}) +public class KEK { + + /** + * The Kek identifier. + */ + @XmlElement(name = "KEKIdentifier", required = true) + protected KEKIdentifier kekIdentifier; + /** + * The Key encryption algorithm. + */ + @XmlElement(name = "KeyEncryptionAlgorithm", required = true) + protected AlgorithmIdentifier keyEncryptionAlgorithm; + /** + * The Version. + */ + @XmlElement(name = "Version") + protected VersionType version; + /** + * The Encrypted key. + */ + @XmlElement(name = "EncryptedKey", required = true) + protected byte[] encryptedKey; + + /** + * Gets the value of the kekIdentifier property. + * + * @return possible object is {@link KEKIdentifier } + */ + public KEKIdentifier getKEKIdentifier() { + return kekIdentifier; + } + + /** + * Sets the value of the kekIdentifier property. + * + * @param value allowed object is {@link KEKIdentifier } + */ + public void setKEKIdentifier(KEKIdentifier value) { + this.kekIdentifier = value; + } + + /** + * Gets the value of the keyEncryptionAlgorithm property. + * + * @return possible object is {@link AlgorithmIdentifier } + */ + public AlgorithmIdentifier getKeyEncryptionAlgorithm() { + return keyEncryptionAlgorithm; + } + + /** + * Sets the value of the keyEncryptionAlgorithm property. + * + * @param value allowed object is {@link AlgorithmIdentifier } + */ + public void setKeyEncryptionAlgorithm(AlgorithmIdentifier value) { + this.keyEncryptionAlgorithm = value; + } + + /** + * Gets the value of the version property. + * + * @return possible object is {@link VersionType } + */ + public VersionType getVersion() { + if (version == null) { + return VersionType.V_4; + } else { + return version; + } + } + + /** + * Sets the value of the version property. + * + * @param value allowed object is {@link VersionType } + */ + public void setVersion(VersionType value) { + this.version = value; + } + + /** + * Gets the value of the encryptedKey property. + * + * @return possible object is byte[] + */ + public byte[] getEncryptedKey() { + return encryptedKey; + } + + /** + * Sets the value of the encryptedKey property. + * + * @param value allowed object is byte[] + */ + public void setEncryptedKey(byte[] value) { + this.encryptedKey = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/KEKIdentifier.java b/src/main/java/com/adyen/model/nexo/KEKIdentifier.java new file mode 100644 index 000000000..f2e4cb778 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/KEKIdentifier.java @@ -0,0 +1,102 @@ +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; + + +/** + * Definition: Identification of a key encryption key (key management using previously distributed symmetric key) -- Reference: RFC 3852: Cryptographic Message Syntax (CMS) -- Usage: This data structure contains: the identification of the key the date of the key + * + *

Java class for KEKIdentifier complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="KEKIdentifier">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="KeyIdentifier" use="required" type="{}KeyIdentifier" />
+ *       <attribute name="KeyVersion" use="required" type="{}KeyVersion" />
+ *       <attribute name="DerivationIdentifier" type="{}DerivationIdentifier" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "KEKIdentifier") +public class KEKIdentifier { + + /** + * The Key identifier. + */ + @XmlElement(name = "KeyIdentifier", required = true) + protected String keyIdentifier; + /** + * The Key version. + */ + @XmlElement(name = "KeyVersion", required = true) + protected String keyVersion; + /** + * The Derivation identifier. + */ + @XmlElement(name = "DerivationIdentifier") + protected byte[] derivationIdentifier; + + /** + * Gets the value of the keyIdentifier property. + * + * @return possible object is {@link String } + */ + public String getKeyIdentifier() { + return keyIdentifier; + } + + /** + * Sets the value of the keyIdentifier property. + * + * @param value allowed object is {@link String } + */ + public void setKeyIdentifier(String value) { + this.keyIdentifier = value; + } + + /** + * Gets the value of the keyVersion property. + * + * @return possible object is {@link String } + */ + public String getKeyVersion() { + return keyVersion; + } + + /** + * Sets the value of the keyVersion property. + * + * @param value allowed object is {@link String } + */ + public void setKeyVersion(String value) { + this.keyVersion = value; + } + + /** + * Gets the value of the derivationIdentifier property. + * + * @return possible object is byte[] + */ + public byte[] getDerivationIdentifier() { + return derivationIdentifier; + } + + /** + * Sets the value of the derivationIdentifier property. + * + * @param value allowed object is byte[] + */ + public void setDerivationIdentifier(byte[] value) { + this.derivationIdentifier = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/KeyTransport.java b/src/main/java/com/adyen/model/nexo/KeyTransport.java new file mode 100644 index 000000000..45cf19bac --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/KeyTransport.java @@ -0,0 +1,135 @@ +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; + + +/** + * Definition: Encryption key using previously distributed asymmetric key -- Reference: RFC 3852: Cryptographic Message Syntax (CMS) -- Usage: This data structure contains: the version of the data structure (v0) the recipient identifier the key encryption algorithm the encrypted key + * + *

Java class for KeyTransport complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="KeyTransport">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="RecipientIdentifier" type="{}RecipientIdentifier"/>
+ *         <element name="KeyEncryptionAlgorithm" type="{}AlgorithmIdentifier"/>
+ *       </sequence>
+ *       <attribute name="Version" type="{}VersionType" default="v0" />
+ *       <attribute name="EncryptedKey" use="required" type="{}EncryptedKey" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "KeyTransport", propOrder = { + "recipientIdentifier", + "keyEncryptionAlgorithm" +}) +public class KeyTransport { + + /** + * The Recipient identifier. + */ + @XmlElement(name = "RecipientIdentifier", required = true) + protected RecipientIdentifier recipientIdentifier; + /** + * The Key encryption algorithm. + */ + @XmlElement(name = "KeyEncryptionAlgorithm", required = true) + protected AlgorithmIdentifier keyEncryptionAlgorithm; + /** + * The Version. + */ + @XmlElement(name = "Version") + protected VersionType version; + /** + * The Encrypted key. + */ + @XmlElement(name = "EncryptedKey", required = true) + protected byte[] encryptedKey; + + /** + * Gets the value of the recipientIdentifier property. + * + * @return possible object is {@link RecipientIdentifier } + */ + public RecipientIdentifier getRecipientIdentifier() { + return recipientIdentifier; + } + + /** + * Sets the value of the recipientIdentifier property. + * + * @param value allowed object is {@link RecipientIdentifier } + */ + public void setRecipientIdentifier(RecipientIdentifier value) { + this.recipientIdentifier = value; + } + + /** + * Gets the value of the keyEncryptionAlgorithm property. + * + * @return possible object is {@link AlgorithmIdentifier } + */ + public AlgorithmIdentifier getKeyEncryptionAlgorithm() { + return keyEncryptionAlgorithm; + } + + /** + * Sets the value of the keyEncryptionAlgorithm property. + * + * @param value allowed object is {@link AlgorithmIdentifier } + */ + public void setKeyEncryptionAlgorithm(AlgorithmIdentifier value) { + this.keyEncryptionAlgorithm = value; + } + + /** + * Gets the value of the version property. + * + * @return possible object is {@link VersionType } + */ + public VersionType getVersion() { + if (version == null) { + return VersionType.V_0; + } else { + return version; + } + } + + /** + * Sets the value of the version property. + * + * @param value allowed object is {@link VersionType } + */ + public void setVersion(VersionType value) { + this.version = value; + } + + /** + * Gets the value of the encryptedKey property. + * + * @return possible object is byte[] + */ + public byte[] getEncryptedKey() { + return encryptedKey; + } + + /** + * Sets the value of the encryptedKey property. + * + * @param value allowed object is byte[] + */ + public void setEncryptedKey(byte[] value) { + this.encryptedKey = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoginRequest.java b/src/main/java/com/adyen/model/nexo/LoginRequest.java new file mode 100644 index 000000000..e3fe5757e --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoginRequest.java @@ -0,0 +1,308 @@ +package com.adyen.model.nexo; + +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; +import java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Login Request messageType. -- Usage: It conveys Information related to the session (period between a Login and the following Logout) to process + * + *

Java class for LoginRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="LoginRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DateTime" type="{}DateTime"/>
+ *         <element name="SaleSoftware" type="{}SaleSoftware"/>
+ *         <element name="SaleTerminalData" type="{}SaleTerminalData" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="TrainingModeFlag" type="{}TrainingModeFlag" default="false" />
+ *       <attribute name="OperatorLanguage" use="required" type="{}ISOLanguage2A" />
+ *       <attribute name="OperatorID" type="{}OperatorID" />
+ *       <attribute name="ShiftNumber" type="{}ShiftNumber" />
+ *       <attribute name="TokenRequested" type="{}TokenRequestedType" />
+ *       <attribute name="CustomerOrderReq" type="{}CustomerOrderReq" />
+ *       <attribute name="POISerialNumber" type="{}POISerialNumber" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LoginRequest", propOrder = { + "dateTime", + "saleSoftware", + "saleTerminalData" +}) +public class LoginRequest { + + /** + * The Date time. + */ + @XmlElement(name = "DateTime", required = true) + @Schema(description = "Date and Time") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar dateTime; + /** + * The Sale software. + */ + @XmlElement(name = "SaleSoftware", required = true) + @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") + @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") + @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) + @Schema(description = "Language of the Cashier or Operator. --Rule: Default value for Device type displays") + protected String operatorLanguage; + /** + * The Operator id. + */ + @XmlElement(name = "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") + @Schema(description = "Shift number. --Rule: Same as OperatorID") + protected String shiftNumber; + /** + * The Token requested. + */ + @XmlElement(name = "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") + @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") + @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") + protected String poiSerialNumber; + + /** + * Gets the value of the dateTime property. + * + * @return possible object is {@link XMLGregorianCalendar } + */ + public XMLGregorianCalendar getDateTime() { + return dateTime; + } + + /** + * Sets the value of the dateTime property. + * + * @param value allowed object is {@link XMLGregorianCalendar } + */ + public void setDateTime(XMLGregorianCalendar value) { + this.dateTime = value; + } + + /** + * Gets the value of the saleSoftware property. + * + * @return possible object is {@link SaleSoftware } + */ + public SaleSoftware getSaleSoftware() { + return saleSoftware; + } + + /** + * Sets the value of the saleSoftware property. + * + * @param value allowed object is {@link SaleSoftware } + */ + public void setSaleSoftware(SaleSoftware value) { + this.saleSoftware = value; + } + + /** + * Gets the value of the saleTerminalData property. + * + * @return possible object is {@link SaleTerminalData } + */ + public SaleTerminalData getSaleTerminalData() { + return saleTerminalData; + } + + /** + * Sets the value of the saleTerminalData property. + * + * @param value allowed object is {@link SaleTerminalData } + */ + public void setSaleTerminalData(SaleTerminalData value) { + this.saleTerminalData = value; + } + + /** + * Gets the value of the trainingModeFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isTrainingModeFlag() { + if (trainingModeFlag == null) { + return false; + } else { + return trainingModeFlag; + } + } + + /** + * Sets the value of the trainingModeFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setTrainingModeFlag(Boolean value) { + this.trainingModeFlag = value; + } + + /** + * Gets the value of the operatorLanguage property. + * + * @return possible object is {@link String } + */ + public String getOperatorLanguage() { + return operatorLanguage; + } + + /** + * Sets the value of the operatorLanguage property. + * + * @param value allowed object is {@link String } + */ + public void setOperatorLanguage(String value) { + this.operatorLanguage = value; + } + + /** + * Gets the value of the operatorID property. + * + * @return possible object is {@link String } + */ + public String getOperatorID() { + return operatorID; + } + + /** + * Sets the value of the operatorID property. + * + * @param value allowed object is {@link String } + */ + public void setOperatorID(String value) { + this.operatorID = value; + } + + /** + * Gets the value of the shiftNumber property. + * + * @return possible object is {@link String } + */ + public String getShiftNumber() { + return shiftNumber; + } + + /** + * Sets the value of the shiftNumber property. + * + * @param value allowed object is {@link String } + */ + public void setShiftNumber(String value) { + this.shiftNumber = value; + } + + /** + * Gets the value of the tokenRequestedType property. + * + * @return possible object is {@link TokenRequestedType } + */ + public TokenRequestedType getTokenRequestedType() { + return tokenRequestedType; + } + + /** + * Sets the value of the tokenRequestedType property. + * + * @param value allowed object is {@link TokenRequestedType } + */ + public void setTokenRequestedType(TokenRequestedType value) { + this.tokenRequestedType = value; + } + + /** + * Gets the value of the customerOrderReq property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the customerOrderReq property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getCustomerOrderReq().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link CustomerOrderReqType } + * + * @return the customer order req + */ + public List getCustomerOrderReq() { + if (customerOrderReq == null) { + customerOrderReq = new ArrayList<>(); + } + return this.customerOrderReq; + } + + /** + * Gets the value of the poiSerialNumber property. + * + * @return possible object is {@link String } + */ + public String getPOISerialNumber() { + return poiSerialNumber; + } + + /** + * Sets the value of the poiSerialNumber property. + * + * @param value allowed object is {@link String } + */ + public void setPOISerialNumber(String value) { + this.poiSerialNumber = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoginResponse.java b/src/main/java/com/adyen/model/nexo/LoginResponse.java new file mode 100644 index 000000000..6b6b8d219 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoginResponse.java @@ -0,0 +1,87 @@ +package com.adyen.model.nexo; + +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 to the Login to process + * + *

Java class for LoginResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="LoginResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="POISystemData" type="{}POISystemData" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LoginResponse", propOrder = { + "response", + "poiSystemData" +}) +public class LoginResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Poi system data. + */ + @XmlElement(name = "POISystemData") + @Schema(description = "Information related to the POI System --Rule: if Response.Result is Success") + protected POISystemData poiSystemData; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the poiSystemData property. + * + * @return possible object is {@link POISystemData } + */ + public POISystemData getPOISystemData() { + return poiSystemData; + } + + /** + * Sets the value of the poiSystemData property. + * + * @param value allowed object is {@link POISystemData } + */ + public void setPOISystemData(POISystemData value) { + this.poiSystemData = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LogoutRequest.java b/src/main/java/com/adyen/model/nexo/LogoutRequest.java new file mode 100644 index 000000000..a0327b9eb --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LogoutRequest.java @@ -0,0 +1,61 @@ +package com.adyen.model.nexo; + +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 + * + *

Java class for LogoutRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="LogoutRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="MaintenanceAllowed" type="{}MaintenanceAllowed" default="false" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LogoutRequest") +public class LogoutRequest { + + /** + * The Maintenance allowed. + */ + @XmlElement(name = "MaintenanceAllowed") + @Schema(description = "Indicates that the POI terminal is able to (or have to) go to maintenance.") + protected Boolean maintenanceAllowed; + + /** + * Gets the value of the maintenanceAllowed property. + * + * @return possible object is {@link Boolean } + */ + public boolean isMaintenanceAllowed() { + if (maintenanceAllowed == null) { + return false; + } else { + return maintenanceAllowed; + } + } + + /** + * Sets the value of the maintenanceAllowed property. + * + * @param value allowed object is {@link Boolean } + */ + public void setMaintenanceAllowed(Boolean value) { + this.maintenanceAllowed = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LogoutResponse.java b/src/main/java/com/adyen/model/nexo/LogoutResponse.java new file mode 100644 index 000000000..39c4e3312 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LogoutResponse.java @@ -0,0 +1,61 @@ +package com.adyen.model.nexo; + +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 Logout. + * + *

Java class for LogoutResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="LogoutResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LogoutResponse", propOrder = { + "response" +}) +public class LogoutResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyAccount.java b/src/main/java/com/adyen/model/nexo/LoyaltyAccount.java new file mode 100644 index 000000000..60ad894aa --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoyaltyAccount.java @@ -0,0 +1,86 @@ +package com.adyen.model.nexo; + +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 structure conveys the identification of the account and the associated loyalty brand. + * + *

Java class for LoyaltyAccount complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="LoyaltyAccount">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="LoyaltyAccountID" type="{}LoyaltyAccountID"/>
+ *       </sequence>
+ *       <attribute name="LoyaltyBrand" type="{}LoyaltyBrand" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LoyaltyAccount", propOrder = { + "loyaltyAccountID" +}) +public class LoyaltyAccount { + + /** + * The Loyalty account id. + */ + @XmlElement(name = "LoyaltyAccountID", required = true) + @Schema(description = "Identification of a Loyalty account.") + protected LoyaltyAccountID loyaltyAccountID; + /** + * The Loyalty brand. + */ + @XmlElement(name = "LoyaltyBrand") + @Schema(description = "Identification of a Loyalty brand. --Rule: If a card is analysed") + protected String loyaltyBrand; + + /** + * Gets the value of the loyaltyAccountID property. + * + * @return possible object is {@link LoyaltyAccountID } + */ + public LoyaltyAccountID getLoyaltyAccountID() { + return loyaltyAccountID; + } + + /** + * Sets the value of the loyaltyAccountID property. + * + * @param value allowed object is {@link LoyaltyAccountID } + */ + public void setLoyaltyAccountID(LoyaltyAccountID value) { + this.loyaltyAccountID = value; + } + + /** + * Gets the value of the loyaltyBrand property. + * + * @return possible object is {@link String } + */ + public String getLoyaltyBrand() { + return loyaltyBrand; + } + + /** + * Sets the value of the loyaltyBrand property. + * + * @param value allowed object is {@link String } + */ + public void setLoyaltyBrand(String value) { + this.loyaltyBrand = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyAccountID.java b/src/main/java/com/adyen/model/nexo/LoyaltyAccountID.java new file mode 100644 index 000000000..9623a4319 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoyaltyAccountID.java @@ -0,0 +1,138 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Identification of a Loyalty account. -- Usage: In the Payment or the Loyalty Request message, it allows to identify the loyalty account by the Sale Terminal instead of the POI Terminal (e.g. because the account identification is a bar-code read by the Cashier on a scanner device). In + * + *

Java class for LoyaltyAccountID complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="LoyaltyAccountID">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="LoyaltyID" use="required" type="{}LoyaltyID" />
+ *       <attribute name="EntryMode" use="required" type="{}EntryMode" />
+ *       <attribute name="IdentificationType" use="required" type="{}IdentificationType" />
+ *       <attribute name="IdentificationSupport" type="{}IdentificationSupportType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LoyaltyAccountID") +public class LoyaltyAccountID { + + @XmlElement(name = "LoyaltyID", required = true) + @Schema(description = "Loyalty account identification") + protected String loyaltyID; + @XmlElement(name = "EntryMode", required = true) + @Schema(description = "Entry mode of the payment instrument information") + protected List entryMode; + @XmlElement(name = "IdentificationType", required = true) + @Schema(description = "Type of account identification") + protected IdentificationType identificationType; + + @XmlElement(name = "IdentificationSupport") + @Schema(description = "Support of the loyalty account identification --Rule: if PaymentResponse or LoyaltyResponse or BalanceInquiryResponse") + protected IdentificationSupportType identificationSupport; + + /** + * Gets the value of the loyaltyID property. + * + * @return possible object is + * {@link String } + */ + public String getLoyaltyID() { + return loyaltyID; + } + + /** + * Sets the value of the loyaltyID property. + * + * @param value allowed object is + * {@link String } + */ + public void setLoyaltyID(String value) { + this.loyaltyID = value; + } + + /** + * Gets the value of the entryMode property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the entryMode property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEntryMode().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EntryModeType } + */ + public List getEntryMode() { + if (entryMode == null) { + entryMode = new ArrayList<>(); + } + return this.entryMode; + } + + /** + * Gets the value of the identificationType property. + * + * @return possible object is + * {@link IdentificationType } + */ + public IdentificationType getIdentificationType() { + return identificationType; + } + + /** + * Sets the value of the identificationType property. + * + * @param value allowed object is + * {@link IdentificationType } + */ + public void setIdentificationType(IdentificationType value) { + this.identificationType = value; + } + + /** + * Gets the value of the identificationSupport property. + * + * @return possible object is + * {@link IdentificationSupportType } + */ + public IdentificationSupportType getIdentificationSupport() { + return identificationSupport; + } + + /** + * Sets the value of the identificationSupport property. + * + * @param value allowed object is + * {@link IdentificationSupportType } + */ + public void setIdentificationSupport(IdentificationSupportType value) { + this.identificationSupport = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyAccountReq.java b/src/main/java/com/adyen/model/nexo/LoyaltyAccountReq.java new file mode 100644 index 000000000..26c9014d2 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoyaltyAccountReq.java @@ -0,0 +1,87 @@ +package com.adyen.model.nexo; + +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 Inquiry Request messageType, the Sale Terminal sends the identification of the loyalty account to request the balance. + * + *

Java class for LoyaltyAccountReq complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="LoyaltyAccountReq">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CardAcquisitionReference" type="{}TransactionIdentification" minOccurs="0"/>
+ *         <element name="LoyaltyAccountID" type="{}LoyaltyAccountID" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LoyaltyAccountReq", propOrder = { + "cardAcquisitionReference", + "loyaltyAccountID" +}) +public class LoyaltyAccountReq { + + /** + * The Card acquisition reference. + */ + @XmlElement(name = "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") + @Schema(description = "Identification of a Loyalty account. --Rule: If loyalty identification of the loyalty account is realised by the Sale System") + protected LoyaltyAccountID loyaltyAccountID; + + /** + * Gets the value of the cardAcquisitionReference property. + * + * @return possible object is {@link TransactionIdentification } + */ + public TransactionIdentification getCardAcquisitionReference() { + return cardAcquisitionReference; + } + + /** + * Sets the value of the cardAcquisitionReference property. + * + * @param value allowed object is {@link TransactionIdentification } + */ + public void setCardAcquisitionReference(TransactionIdentification value) { + this.cardAcquisitionReference = value; + } + + /** + * Gets the value of the loyaltyAccountID property. + * + * @return possible object is {@link LoyaltyAccountID } + */ + public LoyaltyAccountID getLoyaltyAccountID() { + return loyaltyAccountID; + } + + /** + * Sets the value of the loyaltyAccountID property. + * + * @param value allowed object is {@link LoyaltyAccountID } + */ + public void setLoyaltyAccountID(LoyaltyAccountID value) { + this.loyaltyAccountID = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyAccountStatus.java b/src/main/java/com/adyen/model/nexo/LoyaltyAccountStatus.java new file mode 100644 index 000000000..b0faa6789 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoyaltyAccountStatus.java @@ -0,0 +1,141 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; + + +/** + * Definition: Data related to the result of a loyalty Balance Inquiry. -- Usage: In the Message Response, the result of each loyalty brand transaction. + * + *

Java class for LoyaltyAccountStatus complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="LoyaltyAccountStatus">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="LoyaltyAccount" type="{}LoyaltyAccount"/>
+ *       </sequence>
+ *       <attribute name="CurrentBalance" type="{}SimpleAmountType" />
+ *       <attribute name="LoyaltyUnit" type="{}LoyaltyUnitType" default="Point" />
+ *       <attribute name="Currency" type="{}ISOCurrency3A" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LoyaltyAccountStatus", propOrder = { + "loyaltyAccount" +}) +public class LoyaltyAccountStatus { + + /** + * The Loyalty account. + */ + @XmlElement(name = "LoyaltyAccount", required = true) + @Schema(description = "Data related to a loyalty account processed in the transaction.") + protected LoyaltyAccount loyaltyAccount; + /** + * The Current balance. + */ + @XmlElement(name = "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") + @Schema(description = "Unit of a loyalty amount.") + protected LoyaltyUnitType loyaltyUnit; + /** + * The Currency. + */ + @XmlElement(name = "Currency") + @Schema(description = "Currency of a monetary amount. --Rule: If Result is Success and If LoyaltyUnit is \"Monetary\"") + protected String currency; + + /** + * Gets the value of the loyaltyAccount property. + * + * @return possible object is {@link LoyaltyAccount } + */ + public LoyaltyAccount getLoyaltyAccount() { + return loyaltyAccount; + } + + /** + * Sets the value of the loyaltyAccount property. + * + * @param value allowed object is {@link LoyaltyAccount } + */ + public void setLoyaltyAccount(LoyaltyAccount value) { + this.loyaltyAccount = value; + } + + /** + * Gets the value of the currentBalance property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getCurrentBalance() { + return currentBalance; + } + + /** + * Sets the value of the currentBalance property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setCurrentBalance(BigDecimal value) { + this.currentBalance = value; + } + + /** + * Gets the value of the loyaltyUnit property. + * + * @return possible object is {@link LoyaltyUnitType } + */ + public LoyaltyUnitType getLoyaltyUnit() { + if (loyaltyUnit == null) { + return LoyaltyUnitType.POINT; + } else { + return loyaltyUnit; + } + } + + /** + * Sets the value of the loyaltyUnit property. + * + * @param value allowed object is {@link LoyaltyUnitType } + */ + public void setLoyaltyUnit(LoyaltyUnitType value) { + this.loyaltyUnit = value; + } + + /** + * Gets the value of the currency property. + * + * @return possible object is {@link String } + */ + public String getCurrency() { + return currency; + } + + /** + * Sets the value of the currency property. + * + * @param value allowed object is {@link String } + */ + public void setCurrency(String value) { + this.currency = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyAcquirerData.java b/src/main/java/com/adyen/model/nexo/LoyaltyAcquirerData.java new file mode 100644 index 000000000..3f264fb63 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoyaltyAcquirerData.java @@ -0,0 +1,137 @@ +package com.adyen.model.nexo; + +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: Information allowing the Sale System to characterise the transaction on the loyalty Acquirer host. + * + *

Java class for LoyaltyAcquirerData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="LoyaltyAcquirerData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ApprovalCode" type="{}ApprovalCode" minOccurs="0"/>
+ *         <element name="LoyaltyTransactionID" type="{}TransactionIdentification" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="LoyaltyAcquirerID" type="{}LoyaltyAcquirerID" />
+ *       <attribute name="HostReconciliationID" type="{}HostReconciliationID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LoyaltyAcquirerData", propOrder = { + "approvalCode", + "loyaltyTransactionID" +}) +public class LoyaltyAcquirerData { + + /** + * The Approval code. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "Identification of the loyalty Acquirer. --Rule: If available") + protected String loyaltyAcquirerID; + /** + * The Host reconciliation id. + */ + @XmlElement(name = "HostReconciliationID") + @Schema(description = "Identifier of a reconciliation period with a payment or loyalty host. --Rule: If provided by the Acquirer") + protected String hostReconciliationID; + + /** + * Gets the value of the approvalCode property. + * + * @return possible object is {@link String } + */ + public String getApprovalCode() { + return approvalCode; + } + + /** + * Sets the value of the approvalCode property. + * + * @param value allowed object is {@link String } + */ + public void setApprovalCode(String value) { + this.approvalCode = value; + } + + /** + * Gets the value of the loyaltyTransactionID property. + * + * @return possible object is {@link TransactionIdentification } + */ + public TransactionIdentification getLoyaltyTransactionID() { + return loyaltyTransactionID; + } + + /** + * Sets the value of the loyaltyTransactionID property. + * + * @param value allowed object is {@link TransactionIdentification } + */ + public void setLoyaltyTransactionID(TransactionIdentification value) { + this.loyaltyTransactionID = value; + } + + /** + * Gets the value of the loyaltyAcquirerID property. + * + * @return possible object is {@link String } + */ + public String getLoyaltyAcquirerID() { + return loyaltyAcquirerID; + } + + /** + * Sets the value of the loyaltyAcquirerID property. + * + * @param value allowed object is {@link String } + */ + public void setLoyaltyAcquirerID(String value) { + this.loyaltyAcquirerID = value; + } + + /** + * Gets the value of the hostReconciliationID property. + * + * @return possible object is {@link String } + */ + public String getHostReconciliationID() { + return hostReconciliationID; + } + + /** + * Sets the value of the hostReconciliationID property. + * + * @param value allowed object is {@link String } + */ + public void setHostReconciliationID(String value) { + this.hostReconciliationID = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyAmount.java b/src/main/java/com/adyen/model/nexo/LoyaltyAmount.java new file mode 100644 index 000000000..c8574c2db --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoyaltyAmount.java @@ -0,0 +1,112 @@ +package com.adyen.model.nexo; + +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.bind.annotation.XmlValue; +import java.math.BigDecimal; + + +/** + * Definition: Amount of a loyalty account. -- Usage: An awarded amount or an amount to redeem to the loyalty account might be sent in the Payment request messageType. The amount to apply on the requested loyalty service, if not computed from the TotalAmount of the Loyalty request messageType. The + * + *

Java class for LoyaltyAmount complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="LoyaltyAmount">
+ *   <simpleContent>
+ *     <extension base="Decimal">
+ *       <attribute name="LoyaltyUnit" type="{}LoyaltyUnitType" default="Point" />
+ *       <attribute name="Currency" type="{}ISOCurrency3A" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LoyaltyAmount", propOrder = { + "value" +}) +public class LoyaltyAmount { + + /** + * The Value. + */ + @XmlValue + protected BigDecimal value; + /** + * The Loyalty unit. + */ + @XmlElement(name = "LoyaltyUnit") + protected LoyaltyUnitType loyaltyUnit; + /** + * The Currency. + */ + @XmlElement(name = "Currency") + @Schema(description = "Currency of a monetary amount. --Rule: if LoyaltyUnit is Monetary") + protected String currency; + + /** + * Gets the value of the value property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setValue(BigDecimal value) { + this.value = value; + } + + /** + * Gets the value of the loyaltyUnit property. + * + * @return possible object is {@link LoyaltyUnitType } + */ + public LoyaltyUnitType getLoyaltyUnit() { + if (loyaltyUnit == null) { + return LoyaltyUnitType.POINT; + } else { + return loyaltyUnit; + } + } + + /** + * Sets the value of the loyaltyUnit property. + * + * @param value allowed object is {@link LoyaltyUnitType } + */ + public void setLoyaltyUnit(LoyaltyUnitType value) { + this.loyaltyUnit = value; + } + + /** + * Gets the value of the currency property. + * + * @return possible object is {@link String } + */ + public String getCurrency() { + return currency; + } + + /** + * Sets the value of the currency property. + * + * @param value allowed object is {@link String } + */ + public void setCurrency(String value) { + this.currency = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyData.java b/src/main/java/com/adyen/model/nexo/LoyaltyData.java new file mode 100644 index 000000000..c3fd1149b --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoyaltyData.java @@ -0,0 +1,113 @@ +package com.adyen.model.nexo; + +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 Balance Inquiry Request messageType, it allows the Sale Terminal to send the identification of the loyalty account or an awarded amount or an amount to redeem to the loyalty account. + * + *

Java class for LoyaltyData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="LoyaltyData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CardAcquisitionReference" type="{}TransactionIdentification" minOccurs="0"/>
+ *         <element name="LoyaltyAccountID" type="{}LoyaltyAccountID" minOccurs="0"/>
+ *         <element name="LoyaltyAmount" type="{}LoyaltyAmount" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LoyaltyData", propOrder = { + "cardAcquisitionReference", + "loyaltyAccountID", + "loyaltyAmount" +}) +public class LoyaltyData { + + /** + * The Card acquisition reference. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "Amount of a loyalty account. --Rule: When the Sale System want to award the Loyalty account (not for BalanceInquiryRequest)") + protected LoyaltyAmount loyaltyAmount; + + /** + * Gets the value of the cardAcquisitionReference property. + * + * @return possible object is {@link TransactionIdentification } + */ + public TransactionIdentification getCardAcquisitionReference() { + return cardAcquisitionReference; + } + + /** + * Sets the value of the cardAcquisitionReference property. + * + * @param value allowed object is {@link TransactionIdentification } + */ + public void setCardAcquisitionReference(TransactionIdentification value) { + this.cardAcquisitionReference = value; + } + + /** + * Gets the value of the loyaltyAccountID property. + * + * @return possible object is {@link LoyaltyAccountID } + */ + public LoyaltyAccountID getLoyaltyAccountID() { + return loyaltyAccountID; + } + + /** + * Sets the value of the loyaltyAccountID property. + * + * @param value allowed object is {@link LoyaltyAccountID } + */ + public void setLoyaltyAccountID(LoyaltyAccountID value) { + this.loyaltyAccountID = value; + } + + /** + * Gets the value of the loyaltyAmount property. + * + * @return possible object is {@link LoyaltyAmount } + */ + public LoyaltyAmount getLoyaltyAmount() { + return loyaltyAmount; + } + + /** + * Sets the value of the loyaltyAmount property. + * + * @param value allowed object is {@link LoyaltyAmount } + */ + public void setLoyaltyAmount(LoyaltyAmount value) { + this.loyaltyAmount = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyHandlingType.java b/src/main/java/com/adyen/model/nexo/LoyaltyHandlingType.java new file mode 100644 index 000000000..6a20da69a --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoyaltyHandlingType.java @@ -0,0 +1,94 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for LoyaltyHandlingType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="LoyaltyHandlingType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Forbidden"/>
+ *     <enumeration value="Processed"/>
+ *     <enumeration value="Allowed"/>
+ *     <enumeration value="Proposed"/>
+ *     <enumeration value="Required"/>
+ *   </restriction>
+ * </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") + @Schema(description = "No loyalty card to read and loyalty transaction to process. Any attempt to enter a pure loyalty card is rejected.") + FORBIDDEN("Forbidden"), + + /** + * The loyalty transaction is already processed, no loyalty card or loyalty transaction to process. + */ + @XmlEnumValue("Processed") + @Schema(description = "The loyalty transaction is already processed, no loyalty card or loyalty transaction to process.") + PROCESSED("Processed"), + + /** + * 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") + @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).") + ALLOWED("Allowed"), + + /** + * 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") + @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.") + PROPOSED("Proposed"), + + /** + * 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") + @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") + REQUIRED("Required"); + private final String value; + + LoyaltyHandlingType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value loyalty handling type. + * + * @param v the v + * @return the loyalty handling type + */ + public static LoyaltyHandlingType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyRequest.java b/src/main/java/com/adyen/model/nexo/LoyaltyRequest.java new file mode 100644 index 000000000..25f4edada --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoyaltyRequest.java @@ -0,0 +1,126 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Loyalty Request messageType. -- Usage: It conveys Information related to the Loyalty transaction to process + * + *

Java class for LoyaltyRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="LoyaltyRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SaleData" type="{}SaleData"/>
+ *         <element name="LoyaltyTransaction" type="{}LoyaltyTransaction"/>
+ *         <element name="LoyaltyData" type="{}LoyaltyData" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LoyaltyRequest", propOrder = { + "saleData", + "loyaltyTransaction", + "loyaltyData" +}) +public class LoyaltyRequest { + + /** + * The Sale data. + */ + @XmlElement(name = "SaleData", required = true) + @Schema(description = "Data related to the Sale System.") + protected SaleData saleData; + /** + * The Loyalty transaction. + */ + @XmlElement(name = "LoyaltyTransaction", required = true) + @Schema(description = "Data related to the loyalty transaction.") + protected LoyaltyTransaction loyaltyTransaction; + /** + * The Loyalty data. + */ + @XmlElement(name = "LoyaltyData") + @Schema(description = "Data related to a Loyalty program or account.") + protected List loyaltyData; + + /** + * Gets the value of the saleData property. + * + * @return possible object is {@link SaleData } + */ + public SaleData getSaleData() { + return saleData; + } + + /** + * Sets the value of the saleData property. + * + * @param value allowed object is {@link SaleData } + */ + public void setSaleData(SaleData value) { + this.saleData = value; + } + + /** + * Gets the value of the loyaltyTransaction property. + * + * @return possible object is {@link LoyaltyTransaction } + */ + public LoyaltyTransaction getLoyaltyTransaction() { + return loyaltyTransaction; + } + + /** + * Sets the value of the loyaltyTransaction property. + * + * @param value allowed object is {@link LoyaltyTransaction } + */ + public void setLoyaltyTransaction(LoyaltyTransaction value) { + this.loyaltyTransaction = value; + } + + /** + * Gets the value of the loyaltyData property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the loyaltyData property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getLoyaltyData().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link LoyaltyData } + * + * @return the loyalty data + */ + public List getLoyaltyData() { + if (loyaltyData == null) { + loyaltyData = new ArrayList<>(); + } + return this.loyaltyData; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyResponse.java b/src/main/java/com/adyen/model/nexo/LoyaltyResponse.java new file mode 100644 index 000000000..2a3cea833 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoyaltyResponse.java @@ -0,0 +1,189 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Loyalty Response messageType. -- Usage: It conveys Information related to the Loyalty transaction processed by the POI System. + * + *

Java class for LoyaltyResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="LoyaltyResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="SaleData" type="{}SaleData"/>
+ *         <element name="POIData" type="{}POIData"/>
+ *         <element name="LoyaltyResult" type="{}LoyaltyResult" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="PaymentReceipt" type="{}PaymentReceipt" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LoyaltyResponse", propOrder = { + "response", + "saleData", + "poiData", + "loyaltyResult", + "paymentReceipt" +}) +public class LoyaltyResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Sale data. + */ + @XmlElement(name = "SaleData", required = true) + @Schema(description = "Data related to the Sale System.") + protected SaleData saleData; + /** + * The Poi data. + */ + @XmlElement(name = "POIData", required = true) + @Schema(description = "Data related to the POI System.") + protected POIData poiData; + /** + * The Loyalty result. + */ + @XmlElement(name = "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") + @Schema(description = "Customer or Merchant payment receipt. --Rule: If Basic profile implementation with no printer on the POI.") + protected List paymentReceipt; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the saleData property. + * + * @return possible object is {@link SaleData } + */ + public SaleData getSaleData() { + return saleData; + } + + /** + * Sets the value of the saleData property. + * + * @param value allowed object is {@link SaleData } + */ + public void setSaleData(SaleData value) { + this.saleData = value; + } + + /** + * Gets the value of the poiData property. + * + * @return possible object is {@link POIData } + */ + public POIData getPOIData() { + return poiData; + } + + /** + * Sets the value of the poiData property. + * + * @param value allowed object is {@link POIData } + */ + public void setPOIData(POIData value) { + this.poiData = value; + } + + /** + * Gets the value of the loyaltyResult property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the loyaltyResult property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getLoyaltyResult().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link LoyaltyResult } + * + * @return the loyalty result + */ + public List getLoyaltyResult() { + if (loyaltyResult == null) { + loyaltyResult = new ArrayList<>(); + } + return this.loyaltyResult; + } + + /** + * Gets the value of the paymentReceipt property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the paymentReceipt property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getPaymentReceipt().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link PaymentReceipt } + * + * @return the payment receipt + */ + public List getPaymentReceipt() { + if (paymentReceipt == null) { + paymentReceipt = new ArrayList<>(); + } + return this.paymentReceipt; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyResult.java b/src/main/java/com/adyen/model/nexo/LoyaltyResult.java new file mode 100644 index 000000000..75a644463 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoyaltyResult.java @@ -0,0 +1,165 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; + + +/** + * Definition: Data related to the result of a processed loyalty transaction. -- Usage: In the Message Response, the result of each loyalty brand transaction. + * + *

Java class for LoyaltyResult complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="LoyaltyResult">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="LoyaltyAccount" type="{}LoyaltyAccount"/>
+ *         <element name="LoyaltyAmount" type="{}LoyaltyAmount" minOccurs="0"/>
+ *         <element name="LoyaltyAcquirerData" type="{}LoyaltyAcquirerData" minOccurs="0"/>
+ *         <element name="Rebates" type="{}Rebates" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="CurrentBalance" type="{}SimpleAmountType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LoyaltyResult", propOrder = { + "loyaltyAccount", + "loyaltyAmount", + "loyaltyAcquirerData", + "rebates" +}) +public class LoyaltyResult { + + /** + * The Loyalty account. + */ + @XmlElement(name = "LoyaltyAccount", required = true) + @Schema(description = "Data related to a loyalty account processed in the transaction.") + protected LoyaltyAccount loyaltyAccount; + /** + * The Loyalty amount. + */ + @XmlElement(name = "LoyaltyAmount") + @Schema(description = "Amount of a loyalty account. --Rule: If awarded amount") + protected LoyaltyAmount loyaltyAmount; + /** + * The Loyalty acquirer data. + */ + @XmlElement(name = "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") + @Schema(description = "Rebate form to an award; --Rule: if rebates awarded") + protected Rebates rebates; + /** + * The Current balance. + */ + @XmlElement(name = "CurrentBalance") + @Schema(description = "Balance of an account. --Rule: if known (provided by the card or an external host)") + protected BigDecimal currentBalance; + + /** + * Gets the value of the loyaltyAccount property. + * + * @return possible object is {@link LoyaltyAccount } + */ + public LoyaltyAccount getLoyaltyAccount() { + return loyaltyAccount; + } + + /** + * Sets the value of the loyaltyAccount property. + * + * @param value allowed object is {@link LoyaltyAccount } + */ + public void setLoyaltyAccount(LoyaltyAccount value) { + this.loyaltyAccount = value; + } + + /** + * Gets the value of the loyaltyAmount property. + * + * @return possible object is {@link LoyaltyAmount } + */ + public LoyaltyAmount getLoyaltyAmount() { + return loyaltyAmount; + } + + /** + * Sets the value of the loyaltyAmount property. + * + * @param value allowed object is {@link LoyaltyAmount } + */ + public void setLoyaltyAmount(LoyaltyAmount value) { + this.loyaltyAmount = value; + } + + /** + * Gets the value of the loyaltyAcquirerData property. + * + * @return possible object is {@link LoyaltyAcquirerData } + */ + public LoyaltyAcquirerData getLoyaltyAcquirerData() { + return loyaltyAcquirerData; + } + + /** + * Sets the value of the loyaltyAcquirerData property. + * + * @param value allowed object is {@link LoyaltyAcquirerData } + */ + public void setLoyaltyAcquirerData(LoyaltyAcquirerData value) { + this.loyaltyAcquirerData = value; + } + + /** + * Gets the value of the rebates property. + * + * @return possible object is {@link Rebates } + */ + public Rebates getRebates() { + return rebates; + } + + /** + * Sets the value of the rebates property. + * + * @param value allowed object is {@link Rebates } + */ + public void setRebates(Rebates value) { + this.rebates = value; + } + + /** + * Gets the value of the currentBalance property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getCurrentBalance() { + return currentBalance; + } + + /** + * Sets the value of the currentBalance property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setCurrentBalance(BigDecimal value) { + this.currentBalance = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyTotals.java b/src/main/java/com/adyen/model/nexo/LoyaltyTotals.java new file mode 100644 index 000000000..d45e95059 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoyaltyTotals.java @@ -0,0 +1,109 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; +import java.math.BigInteger; + + +/** + * Definition: Totals of the loyalty transaction during the reconciliation period. + * + *

Java class for LoyaltyTotals complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="LoyaltyTotals">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="Transaction" use="required" type="{}TransactionType" />
+ *       <attribute name="TransactionCount" use="required" type="{}TransactionCount" />
+ *       <attribute name="TransactionAmount" use="required" type="{}SimpleAmountType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LoyaltyTotals") +public class LoyaltyTotals { + + /** + * The Transaction. + */ + @XmlElement(name = "TransactionType", required = true) + @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) + @Schema(description = "Number of processed transaction during the period.") + protected BigInteger transactionCount; + /** + * The Transaction amount. + */ + @XmlElement(name = "TransactionAmount", required = true) + @Schema(description = "Sum of amount of processed transaction during the period.") + protected BigDecimal transactionAmount; + + /** + * Gets the value of the transactionType property. + * + * @return possible object is {@link TransactionType } + */ + public TransactionType getTransactionType() { + return transactionType; + } + + /** + * Sets the value of the transactionType property. + * + * @param value allowed object is {@link TransactionType } + */ + public void setTransactionType(TransactionType value) { + this.transactionType = value; + } + + /** + * Gets the value of the transactionCount property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getTransactionCount() { + return transactionCount; + } + + /** + * Sets the value of the transactionCount property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setTransactionCount(BigInteger value) { + this.transactionCount = value; + } + + /** + * Gets the value of the transactionAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getTransactionAmount() { + return transactionAmount; + } + + /** + * Sets the value of the transactionAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setTransactionAmount(BigDecimal value) { + this.transactionAmount = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyTransaction.java b/src/main/java/com/adyen/model/nexo/LoyaltyTransaction.java new file mode 100644 index 000000000..9ec0816b0 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoyaltyTransaction.java @@ -0,0 +1,202 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Data related to the loyalty transaction. + * + *

Java class for LoyaltyTransaction complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="LoyaltyTransaction">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="OriginalPOITransaction" type="{}OriginalPOITransaction" minOccurs="0"/>
+ *         <element name="TransactionConditions" type="{}TransactionConditions" minOccurs="0"/>
+ *         <element name="SaleItem" type="{}SaleItem" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="LoyaltyTransaction" use="required" type="{}LoyaltyTransactionType" />
+ *       <attribute name="Currency" type="{}ISOCurrency3A" />
+ *       <attribute name="TotalAmount" type="{}SimpleAmountType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LoyaltyTransaction", propOrder = { + "originalPOITransaction", + "transactionConditions", + "saleItem" +}) +public class LoyaltyTransaction { + + /** + * The Original poi transaction. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "Sale items of a transaction.") + protected List saleItem; + /** + * The Loyalty transaction. + */ + @XmlElement(name = "LoyaltyTransactionType", required = true) + @Schema(description = "Type of loyalty transaction.") + protected LoyaltyTransactionType loyaltyTransactionType; + /** + * The Currency. + */ + @XmlElement(name = "Currency") + @Schema(description = "Currency of a monetary amount.") + protected String currency; + /** + * The Total amount. + */ + @XmlElement(name = "TotalAmount") + @Schema(description = "Amount of a transaction.") + protected BigDecimal totalAmount; + + /** + * Gets the value of the originalPOITransaction property. + * + * @return possible object is {@link OriginalPOITransaction } + */ + public OriginalPOITransaction getOriginalPOITransaction() { + return originalPOITransaction; + } + + /** + * Sets the value of the originalPOITransaction property. + * + * @param value allowed object is {@link OriginalPOITransaction } + */ + public void setOriginalPOITransaction(OriginalPOITransaction value) { + this.originalPOITransaction = value; + } + + /** + * Gets the value of the transactionConditions property. + * + * @return possible object is {@link TransactionConditions } + */ + public TransactionConditions getTransactionConditions() { + return transactionConditions; + } + + /** + * Sets the value of the transactionConditions property. + * + * @param value allowed object is {@link TransactionConditions } + */ + public void setTransactionConditions(TransactionConditions value) { + this.transactionConditions = value; + } + + /** + * Gets the value of the saleItem property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the saleItem property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getSaleItem().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link SaleItem } + * + * @return the sale item + */ + public List getSaleItem() { + if (saleItem == null) { + saleItem = new ArrayList<>(); + } + return this.saleItem; + } + + /** + * Gets the value of the loyaltyTransactionType property. + * + * @return possible object is {@link LoyaltyTransactionType } + */ + public LoyaltyTransactionType getLoyaltyTransactionType() { + return loyaltyTransactionType; + } + + /** + * Sets the value of the loyaltyTransactionType property. + * + * @param value allowed object is {@link LoyaltyTransactionType } + */ + public void setLoyaltyTransactionType(LoyaltyTransactionType value) { + this.loyaltyTransactionType = value; + } + + /** + * Gets the value of the currency property. + * + * @return possible object is {@link String } + */ + public String getCurrency() { + return currency; + } + + /** + * Sets the value of the currency property. + * + * @param value allowed object is {@link String } + */ + public void setCurrency(String value) { + this.currency = value; + } + + /** + * Gets the value of the totalAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getTotalAmount() { + return totalAmount; + } + + /** + * Sets the value of the totalAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setTotalAmount(BigDecimal value) { + this.totalAmount = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyTransactionType.java b/src/main/java/com/adyen/model/nexo/LoyaltyTransactionType.java new file mode 100644 index 000000000..da6b5ba8e --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoyaltyTransactionType.java @@ -0,0 +1,102 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for LoyaltyTransactionType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="LoyaltyTransactionType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Award"/>
+ *     <enumeration value="Rebate"/>
+ *     <enumeration value="Redemption"/>
+ *     <enumeration value="AwardRefund"/>
+ *     <enumeration value="RebateRefund"/>
+ *     <enumeration value="RedemptionRefund"/>
+ *   </restriction>
+ * </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") + @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") + @Schema(description = "Rebate on a total amount, sale item amount, or sale items") + REBATE("Rebate"), + + /** + * Redemption on a loyalty account. + */ + @XmlEnumValue("Redemption") + @Schema(description = "Redemption on a loyalty account.") + REDEMPTION("Redemption"), + + /** + * Refund of a loyalty award transaction. + */ + @XmlEnumValue("AwardRefund") + @Schema(description = "Refund of a loyalty award transaction.") + AWARD_REFUND("AwardRefund"), + + /** + * Refund of a loyalty rebate transaction. + */ + @XmlEnumValue("RebateRefund") + @Schema(description = "Refund of a loyalty rebate transaction.") + REBATE_REFUND("RebateRefund"), + + /** + * Refund of a loyalty redemption transaction. + */ + @XmlEnumValue("RedemptionRefund") + @Schema(description = "Refund of a loyalty redemption transaction.") + REDEMPTION_REFUND("RedemptionRefund"); + private final String value; + + LoyaltyTransactionType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value loyalty transaction type. + * + * @param v the v + * @return the loyalty transaction type + */ + public static LoyaltyTransactionType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/LoyaltyUnitType.java b/src/main/java/com/adyen/model/nexo/LoyaltyUnitType.java new file mode 100644 index 000000000..854a08505 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/LoyaltyUnitType.java @@ -0,0 +1,70 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for LoyaltyUnitType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="LoyaltyUnitType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Point"/>
+ *     <enumeration value="Monetary"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "LoyaltyUnitType") +@XmlEnum +public enum LoyaltyUnitType { + + + /** + * The amount is expressed in point. + */ + @XmlEnumValue("Point") + @Schema(description = "The amount is expressed in point.") + POINT("Point"), + + /** + * The amount is expressed in a monetary value in a currency. + */ + @XmlEnumValue("Monetary") + @Schema(description = "The amount is expressed in a monetary value in a currency.") + MONETARY("Monetary"); + private final String value; + + LoyaltyUnitType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value loyalty unit type. + * + * @param v the v + * @return the loyalty unit type + */ + public static LoyaltyUnitType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/MenuEntry.java b/src/main/java/com/adyen/model/nexo/MenuEntry.java new file mode 100644 index 000000000..54c88b1f7 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/MenuEntry.java @@ -0,0 +1,209 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: An entryof the menu to present to the Cashier -- Usage: It conveys messageType text and parameters of the menu entry. This output data could be only provided for an input command, in order to choose an entryof the menu. + * + *

Java class for MenuEntry complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="MenuEntry">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="PredefinedContent" type="{}PredefinedContent" minOccurs="0"/>
+ *         <element name="OutputText" type="{}OutputText" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="OutputXHTML" type="{}OutputXHTML" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="MenuEntryTag" type="{}MenuEntryTagType" default="Selectable" />
+ *       <attribute name="OutputFormat" use="required" type="{}OutputFormatType" />
+ *       <attribute name="DefaultSelectedFlag" type="{}DefaultSelectedFlag" default="false" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MenuEntry", propOrder = { + "predefinedContent", + "outputText", + "outputXHTML" +}) +public class MenuEntry { + + /** + * The Predefined content. + */ + @XmlElement(name = "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") + @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") + @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") + @Schema(description = "Characteristics related to the selection of a menu entry") + protected MenuEntryTagType menuEntryTag; + /** + * The Output format. + */ + @XmlElement(name = "OutputFormat", required = true) + @Schema(description = "Format of the content to display or print --Rule: MessageRef, Text, XHTML") + protected OutputFormatType outputFormat; + /** + * The Default selected flag. + */ + @XmlElement(name = "DefaultSelectedFlag") + @Schema(description = "Selection of a menu entry to be displayed.") + protected Boolean defaultSelectedFlag; + + /** + * Gets the value of the predefinedContent property. + * + * @return possible object is {@link PredefinedContent } + */ + public PredefinedContent getPredefinedContent() { + return predefinedContent; + } + + /** + * Sets the value of the predefinedContent property. + * + * @param value allowed object is {@link PredefinedContent } + */ + public void setPredefinedContent(PredefinedContent value) { + this.predefinedContent = value; + } + + /** + * Gets the value of the outputText property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the outputText property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getOutputText().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link OutputText } + * + * @return the output text + */ + public List getOutputText() { + if (outputText == null) { + outputText = new ArrayList<>(); + } + return this.outputText; + } + + /** + * Gets the value of the outputXHTML property. + * + * @return possible object is byte[] + */ + public byte[] getOutputXHTML() { + return outputXHTML; + } + + /** + * Sets the value of the outputXHTML property. + * + * @param value allowed object is byte[] + */ + public void setOutputXHTML(byte[] value) { + this.outputXHTML = value; + } + + /** + * Gets the value of the menuEntryTag property. + * + * @return possible object is {@link MenuEntryTagType } + */ + public MenuEntryTagType getMenuEntryTag() { + if (menuEntryTag == null) { + return MenuEntryTagType.SELECTABLE; + } else { + return menuEntryTag; + } + } + + /** + * Sets the value of the menuEntryTag property. + * + * @param value allowed object is {@link MenuEntryTagType } + */ + public void setMenuEntryTag(MenuEntryTagType value) { + this.menuEntryTag = value; + } + + /** + * Gets the value of the outputFormat property. + * + * @return possible object is {@link OutputFormatType } + */ + public OutputFormatType getOutputFormat() { + return outputFormat; + } + + /** + * Sets the value of the outputFormat property. + * + * @param value allowed object is {@link OutputFormatType } + */ + public void setOutputFormat(OutputFormatType value) { + this.outputFormat = value; + } + + /** + * Gets the value of the defaultSelectedFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isDefaultSelectedFlag() { + if (defaultSelectedFlag == null) { + return false; + } else { + return defaultSelectedFlag; + } + } + + /** + * Sets the value of the defaultSelectedFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setDefaultSelectedFlag(Boolean value) { + this.defaultSelectedFlag = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/MenuEntryTagType.java b/src/main/java/com/adyen/model/nexo/MenuEntryTagType.java new file mode 100644 index 000000000..3a2fc419b --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/MenuEntryTagType.java @@ -0,0 +1,86 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for MenuEntryTagType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="MenuEntryTagType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Selectable"/>
+ *     <enumeration value="NonSelectable"/>
+ *     <enumeration value="SubMenu"/>
+ *     <enumeration value="NonSelectableSubMenu"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "MenuEntryTagType") +@XmlEnum +public enum MenuEntryTagType { + + + /** + * The Cashier may select this entryof the menu + */ + @XmlEnumValue("Selectable") + @Schema(description = "The Cashier may select this entryof the menu") + SELECTABLE("Selectable"), + + /** + * The Cashier cannot select this entryof the menu + */ + @XmlEnumValue("NonSelectable") + @Schema(description = "The Cashier cannot select this entryof the menu") + NON_SELECTABLE("NonSelectable"), + + /** + * 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") + @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") + @Schema(description = "The menu entry is a submenu, but cannot be selected.") + NON_SELECTABLE_SUB_MENU("NonSelectableSubMenu"); + private final String value; + + MenuEntryTagType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value menu entry tag type. + * + * @param v the v + * @return the menu entry tag type + */ + public static MenuEntryTagType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/MessageCategoryType.java b/src/main/java/com/adyen/model/nexo/MessageCategoryType.java new file mode 100644 index 000000000..63d30c47f --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/MessageCategoryType.java @@ -0,0 +1,268 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for MessageCategoryType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="MessageCategoryType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Abort"/>
+ *     <enumeration value="Admin"/>
+ *     <enumeration value="BalanceInquiry"/>
+ *     <enumeration value="Batch"/>
+ *     <enumeration value="CardAcquisition"/>
+ *     <enumeration value="CardReaderAPDU"/>
+ *     <enumeration value="CardReaderInit"/>
+ *     <enumeration value="CardReaderPowerOff"/>
+ *     <enumeration value="Diagnosis"/>
+ *     <enumeration value="Display"/>
+ *     <enumeration value="EnableService"/>
+ *     <enumeration value="Event"/>
+ *     <enumeration value="GetTotals"/>
+ *     <enumeration value="Input"/>
+ *     <enumeration value="InputUpdate"/>
+ *     <enumeration value="Login"/>
+ *     <enumeration value="Logout"/>
+ *     <enumeration value="Loyalty"/>
+ *     <enumeration value="Payment"/>
+ *     <enumeration value="PIN"/>
+ *     <enumeration value="Print"/>
+ *     <enumeration value="Reconciliation"/>
+ *     <enumeration value="Reversal"/>
+ *     <enumeration value="Sound"/>
+ *     <enumeration value="StoredValue"/>
+ *     <enumeration value="TransactionStatus"/>
+ *     <enumeration value="Transmit"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "MessageCategoryType") +@XmlEnum +public enum MessageCategoryType { + + + /** + * Abort messageType request + */ + @XmlEnumValue("Abort") + @Schema(description = "Abort message request") + ABORT("Abort"), + + /** + * Admin request or response + */ + @XmlEnumValue("Admin") + @Schema(description = "Admin request or response") + ADMIN("Admin"), + + /** + * Balance Inquiry request or response + */ + @XmlEnumValue("BalanceInquiry") + @Schema(description = "Balance Inquiry request or response") + BALANCE_INQUIRY("BalanceInquiry"), + + /** + * Batch request or response + */ + @XmlEnumValue("Batch") + @Schema(description = "Batch request or response") + BATCH("Batch"), + + /** + * Card Acquisition request or response + */ + @XmlEnumValue("CardAcquisition") + @Schema(description = "Card Acquisition request or response") + CARD_ACQUISITION("CardAcquisition"), + + /** + * Card Reader APDU request or response + */ + @XmlEnumValue("CardReaderAPDU") + @Schema(description = "Card Reader APDU request or response") + CARD_READER_APDU("CardReaderAPDU"), + + /** + * Card Reader Init request or response + */ + @XmlEnumValue("CardReaderInit") + @Schema(description = "Card Reader Init request or response") + CARD_READER_INIT("CardReaderInit"), + + /** + * Card Reader Power-Off request or response + */ + @XmlEnumValue("CardReaderPowerOff") + @Schema(description = "Card Reader Power-Off request or response") + CARD_READER_POWER_OFF("CardReaderPowerOff"), + + /** + * Diagnosis request or response + */ + @XmlEnumValue("Diagnosis") + @Schema(description = "Diagnosis request or response") + DIAGNOSIS("Diagnosis"), + + /** + * Display messageType request or response + */ + @XmlEnumValue("Display") + @Schema(description = "Display message request or response") + DISPLAY("Display"), + + /** + * Enable Service messageType request or response + */ + @XmlEnumValue("EnableService") + @Schema(description = "Enable Service message request or response") + ENABLE_SERVICE("EnableService"), + + /** + * Event Notification messageType + */ + @XmlEnumValue("Event") + @Schema(description = "Event Notification message") + EVENT("Event"), + + /** + * GetTotals messageType request or response + */ + @XmlEnumValue("GetTotals") + @Schema(description = "GetTotals message request or response") + GET_TOTALS("GetTotals"), + + /** + * Input messageType request or response + */ + @XmlEnumValue("Input") + @Schema(description = "Input message request or response") + INPUT("Input"), + + /** + * Input Update messageType + */ + @XmlEnumValue("InputUpdate") + @Schema(description = "Input Update message") + INPUT_UPDATE("InputUpdate"), + + /** + * Login messageType request or response + */ + @XmlEnumValue("Login") + @Schema(description = "Login message request or response") + LOGIN("Login"), + + /** + * Logout messageType request or response + */ + @XmlEnumValue("Logout") + @Schema(description = "Logout message request or response") + LOGOUT("Logout"), + + /** + * Loyalty messageType request or response + */ + @XmlEnumValue("Loyalty") + @Schema(description = "Loyalty message request or response") + LOYALTY("Loyalty"), + + /** + * Payment messageType request or response + */ + @XmlEnumValue("Payment") + @Schema(description = "Payment message request or response") + PAYMENT("Payment"), + + /** + * PIN messageType request or response + */ + PIN("PIN"), + + /** + * Print messageType request or response + */ + @XmlEnumValue("Print") + @Schema(description = "Print message request or response") + PRINT("Print"), + + /** + * Reconciliation messageType request or response + */ + @XmlEnumValue("Reconciliation") + @Schema(description = "Reconciliation message request or response") + RECONCILIATION("Reconciliation"), + + /** + * Reversal messageType request or response + */ + @XmlEnumValue("Reversal") + @Schema(description = "Reversal message request or response") + REVERSAL("Reversal"), + + /** + * Sound messageType request or response + */ + @XmlEnumValue("Sound") + @Schema(description = "Sound message request or response") + SOUND("Sound"), + + /** + * Stored Value messageType request or response + */ + @XmlEnumValue("StoredValue") + @Schema(description = "Stored Value message request or response") + STORED_VALUE("StoredValue"), + + /** + * TransactionStatus messageType request or response + */ + @XmlEnumValue("TransactionStatus") + @Schema(description = "TransactionStatus message request or response") + TRANSACTION_STATUS("TransactionStatus"), + + /** + * Transmit messageType request or response + */ + @XmlEnumValue("Transmit") + @Schema(description = "Transmit message request or response") + TRANSMIT("Transmit"); + private final String value; + + MessageCategoryType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value message category type. + * + * @param v the v + * @return the message category type + */ + public static MessageCategoryType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/MessageClassType.java b/src/main/java/com/adyen/model/nexo/MessageClassType.java new file mode 100644 index 000000000..899f143a3 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/MessageClassType.java @@ -0,0 +1,78 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for MessageClassType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="MessageClassType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Service"/>
+ *     <enumeration value="Device"/>
+ *     <enumeration value="Event"/>
+ *   </restriction>
+ * </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") + @Schema(description = "A transaction message pair initiated by the Sale System, and requested to the POI System.") + SERVICE("Service"), + + /** + * 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") + @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") + @Schema(description = "An unsolicited event notification by the POI System to the Sale System.") + EVENT("Event"); + private final String value; + + MessageClassType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value message class type. + * + * @param v the v + * @return the message class type + */ + public static MessageClassType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/MessageHeader.java b/src/main/java/com/adyen/model/nexo/MessageHeader.java new file mode 100644 index 000000000..ed7729b6c --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/MessageHeader.java @@ -0,0 +1,232 @@ +package com.adyen.model.nexo; + +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 Information related to the Sale to POI protocol management + * + *

Java class for MessageHeader complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="MessageHeader">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="ProtocolVersion" type="{}ProtocolVersion" />
+ *       <attribute name="MessageClass" use="required" type="{}MessageClassType" />
+ *       <attribute name="MessageCategory" use="required" type="{}MessageCategoryType" />
+ *       <attribute name="Message" use="required" type="{}MessageType" />
+ *       <attribute name="ServiceID" type="{}ServiceID" />
+ *       <attribute name="DeviceID" type="{}DeviceID" />
+ *       <attribute name="SaleID" use="required" type="{}SaleID" />
+ *       <attribute name="POIID" use="required" type="{}POIID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MessageHeader") +public class MessageHeader { + + /** + * The Protocol version. + */ + @XmlElement(name = "ProtocolVersion") + @Schema(description = ">--Rule:If MessageCategory is Login or Diagnosis") + protected String protocolVersion; + /** + * The Message class. + */ + @XmlElement(name = "MessageClass", required = true) + @Schema(description = "Class of the message") + protected MessageClassType messageClass; + /** + * The Message category. + */ + @XmlElement(name = "MessageCategory", required = true) + @Schema(description = "Category of message.") + protected MessageCategoryType messageCategory; + /** + * The Message type. + */ + @XmlElement(name = "MessageType", required = true) + @Schema(description = "Type of message of the Sale to POI protocol") + protected MessageType messageType; + /** + * The Service id. + */ + @XmlElement(name = "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.", minLength = 1, maxLength = 10) + protected String serviceID; + /** + * The Device id. + */ + @XmlElement(name = "DeviceID") + @Schema(description = "Identification of a device message pair --Rule: If \"Device\" MessageClass") + protected String deviceID; + /** + * The Sale id. + */ + @XmlElement(name = "SaleID", required = true) + @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) + @Schema(description = "Identification of a POI System or a POI Terminal for the Sale to POI protocol") + protected String poiid; + + /** + * Gets the value of the protocolVersion property. + * + * @return possible object is {@link String } + */ + public String getProtocolVersion() { + return protocolVersion; + } + + /** + * Sets the value of the protocolVersion property. + * + * @param value allowed object is {@link String } + */ + public void setProtocolVersion(String value) { + this.protocolVersion = value; + } + + /** + * Gets the value of the messageClass property. + * + * @return possible object is {@link MessageClassType } + */ + public MessageClassType getMessageClass() { + return messageClass; + } + + /** + * Sets the value of the messageClass property. + * + * @param value allowed object is {@link MessageClassType } + */ + public void setMessageClass(MessageClassType value) { + this.messageClass = value; + } + + /** + * Gets the value of the messageCategory property. + * + * @return possible object is {@link MessageCategoryType } + */ + public MessageCategoryType getMessageCategory() { + return messageCategory; + } + + /** + * Sets the value of the messageCategory property. + * + * @param value allowed object is {@link MessageCategoryType } + */ + public void setMessageCategory(MessageCategoryType value) { + this.messageCategory = value; + } + + /** + * Gets the value of the messageType property. + * + * @return possible object is {@link MessageType } + */ + public MessageType getMessageType() { + return messageType; + } + + /** + * Sets the value of the messageType property. + * + * @param value allowed object is {@link MessageType } + */ + public void setMessageType(MessageType value) { + this.messageType = value; + } + + /** + * Gets the value of the serviceID property. + * + * @return possible object is {@link String } + */ + public String getServiceID() { + return serviceID; + } + + /** + * Sets the value of the serviceID property. + * + * @param value allowed object is {@link String } + */ + public void setServiceID(String value) { + this.serviceID = value; + } + + /** + * Gets the value of the deviceID property. + * + * @return possible object is {@link String } + */ + public String getDeviceID() { + return deviceID; + } + + /** + * Sets the value of the deviceID property. + * + * @param value allowed object is {@link String } + */ + public void setDeviceID(String value) { + this.deviceID = value; + } + + /** + * Gets the value of the saleID property. + * + * @return possible object is {@link String } + */ + public String getSaleID() { + return saleID; + } + + /** + * Sets the value of the saleID property. + * + * @param value allowed object is {@link String } + */ + public void setSaleID(String value) { + this.saleID = value; + } + + /** + * Gets the value of the poiid property. + * + * @return possible object is {@link String } + */ + public String getPOIID() { + return poiid; + } + + /** + * Sets the value of the poiid property. + * + * @param value allowed object is {@link String } + */ + public void setPOIID(String value) { + this.poiid = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/MessageReference.java b/src/main/java/com/adyen/model/nexo/MessageReference.java new file mode 100644 index 000000000..2a59ae769 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/MessageReference.java @@ -0,0 +1,157 @@ +package com.adyen.model.nexo; + +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 progress or to request the status of a transaction from which no response has been received. It identifies the messageType header of the messageType request to abort or request the status. The Abort or TransactionStatus + * + *

Java class for MessageReference complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="MessageReference">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="MessageCategory" type="{}MessageCategoryType" />
+ *       <attribute name="ServiceID" type="{}ServiceID" />
+ *       <attribute name="DeviceID" type="{}DeviceID" />
+ *       <attribute name="SaleID" type="{}SaleID" />
+ *       <attribute name="POIID" type="{}POIID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MessageReference") +public class MessageReference { + + /** + * The Message category. + */ + @XmlElement(name = "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") + @Schema(description = "Identification of a message pair, which processes a transaction") + protected String serviceID; + /** + * The Device id. + */ + @XmlElement(name = "DeviceID") + @Schema(description = "Identification of a device message pair", minLength = 1, maxLength = 10) + protected String deviceID; + /** + * The Sale id. + */ + @XmlElement(name = "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") + @Schema(description = "Identification of a POI System or a POI Terminal for the Sale to POI protocol --Rule: default MessageHeader.POIID") + protected String poiid; + + /** + * Gets the value of the messageCategory property. + * + * @return possible object is {@link MessageCategoryType } + */ + public MessageCategoryType getMessageCategory() { + return messageCategory; + } + + /** + * Sets the value of the messageCategory property. + * + * @param value allowed object is {@link MessageCategoryType } + */ + public void setMessageCategory(MessageCategoryType value) { + this.messageCategory = value; + } + + /** + * Gets the value of the serviceID property. + * + * @return possible object is {@link String } + */ + public String getServiceID() { + return serviceID; + } + + /** + * Sets the value of the serviceID property. + * + * @param value allowed object is {@link String } + */ + public void setServiceID(String value) { + this.serviceID = value; + } + + /** + * Gets the value of the deviceID property. + * + * @return possible object is {@link String } + */ + public String getDeviceID() { + return deviceID; + } + + /** + * Sets the value of the deviceID property. + * + * @param value allowed object is {@link String } + */ + public void setDeviceID(String value) { + this.deviceID = value; + } + + /** + * Gets the value of the saleID property. + * + * @return possible object is {@link String } + */ + public String getSaleID() { + return saleID; + } + + /** + * Sets the value of the saleID property. + * + * @param value allowed object is {@link String } + */ + public void setSaleID(String value) { + this.saleID = value; + } + + /** + * Gets the value of the poiid property. + * + * @return possible object is {@link String } + */ + public String getPOIID() { + return poiid; + } + + /** + * Sets the value of the poiid property. + * + * @param value allowed object is {@link String } + */ + public void setPOIID(String value) { + this.poiid = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/MessageType.java b/src/main/java/com/adyen/model/nexo/MessageType.java new file mode 100644 index 000000000..42cda9eb4 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/MessageType.java @@ -0,0 +1,78 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for MessageType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="MessageType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Request"/>
+ *     <enumeration value="Response"/>
+ *     <enumeration value="Notification"/>
+ *   </restriction>
+ * </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") + @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") + @Schema(description = "Response message, sent to answer to a request message.") + RESPONSE("Response"), + + /** + * Unsollicited notification messageType that does not require an answer. + */ + @XmlEnumValue("Notification") + @Schema(description = "Unsollicited notification message that does not require an answer.") + NOTIFICATION("Notification"); + private final String value; + + MessageType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value message type. + * + * @param v the v + * @return the message type + */ + public static MessageType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/MobileData.java b/src/main/java/com/adyen/model/nexo/MobileData.java new file mode 100644 index 000000000..d393bb262 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/MobileData.java @@ -0,0 +1,189 @@ +package com.adyen.model.nexo; + +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 is used as a payment instrument for the transaction. + * + *

Java class for MobileData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="MobileData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MobileCountryCode" type="{}MobileCountryCode" minOccurs="0"/>
+ *         <element name="Geolocation" type="{}Geolocation" minOccurs="0"/>
+ *         <element name="ProtectedMobileData" type="{}ContentInformation" minOccurs="0"/>
+ *         <element name="SensitiveMobileData" type="{}SensitiveMobileData" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="MobileNetworkCode" type="{}MobileNetworkCode" />
+ *       <attribute name="MaskedMSISDN" type="{}MaskedMSISDN" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MobileData", propOrder = { + "mobileCountryCode", + "geolocation", + "protectedMobileData", + "sensitiveMobileData" +}) +public class MobileData { + + /** + * The Mobile country code. + */ + @XmlElement(name = "MobileCountryCode") + @Schema(description = "Identifies the country of a mobile phone operator. --Rule: If data available", minLength = 3, maxLength = 3) + protected String mobileCountryCode; + /** + * The Geolocation. + */ + @XmlElement(name = "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") + @Schema(description = "Sensitive information related to the mobile phone, protected by CMS. --Rule: SensitiveMobileData") + protected ContentInformation protectedMobileData; + /** + * The Sensitive mobile data. + */ + @XmlElement(name = "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") + @Schema(description = "Identifies the mobile phone operator inside a country. --Rule: If data available", minLength = 2, maxLength = 3) + protected String mobileNetworkCode; + /** + * The Masked msisdn. + */ + @XmlElement(name = "MaskedMSISDN") + @Schema(description = "Masked Mobile Subscriber Integrated Service Digital Network. --Rule: If data available") + protected String maskedMSISDN; + + /** + * Gets the value of the mobileCountryCode property. + * + * @return possible object is {@link String } + */ + public String getMobileCountryCode() { + return mobileCountryCode; + } + + /** + * Sets the value of the mobileCountryCode property. + * + * @param value allowed object is {@link String } + */ + public void setMobileCountryCode(String value) { + this.mobileCountryCode = value; + } + + /** + * Gets the value of the geolocation property. + * + * @return possible object is {@link Geolocation } + */ + public Geolocation getGeolocation() { + return geolocation; + } + + /** + * Sets the value of the geolocation property. + * + * @param value allowed object is {@link Geolocation } + */ + public void setGeolocation(Geolocation value) { + this.geolocation = value; + } + + /** + * Gets the value of the protectedMobileData property. + * + * @return possible object is {@link ContentInformation } + */ + public ContentInformation getProtectedMobileData() { + return protectedMobileData; + } + + /** + * Sets the value of the protectedMobileData property. + * + * @param value allowed object is {@link ContentInformation } + */ + public void setProtectedMobileData(ContentInformation value) { + this.protectedMobileData = value; + } + + /** + * Gets the value of the sensitiveMobileData property. + * + * @return possible object is {@link SensitiveMobileData } + */ + public SensitiveMobileData getSensitiveMobileData() { + return sensitiveMobileData; + } + + /** + * Sets the value of the sensitiveMobileData property. + * + * @param value allowed object is {@link SensitiveMobileData } + */ + public void setSensitiveMobileData(SensitiveMobileData value) { + this.sensitiveMobileData = value; + } + + /** + * Gets the value of the mobileNetworkCode property. + * + * @return possible object is {@link String } + */ + public String getMobileNetworkCode() { + return mobileNetworkCode; + } + + /** + * Sets the value of the mobileNetworkCode property. + * + * @param value allowed object is {@link String } + */ + public void setMobileNetworkCode(String value) { + this.mobileNetworkCode = value; + } + + /** + * Gets the value of the maskedMSISDN property. + * + * @return possible object is {@link String } + */ + public String getMaskedMSISDN() { + return maskedMSISDN; + } + + /** + * Sets the value of the maskedMSISDN property. + * + * @param value allowed object is {@link String } + */ + public void setMaskedMSISDN(String value) { + this.maskedMSISDN = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/NamedKeyEncryptedData.java b/src/main/java/com/adyen/model/nexo/NamedKeyEncryptedData.java new file mode 100644 index 000000000..4bf05fabe --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/NamedKeyEncryptedData.java @@ -0,0 +1,111 @@ +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; + + +/** + * Definition: Cryptographic Message Syntax (CMS) data structure containing encrypted data and integrated optional data filed keyName. -- Reference: RFC 3852: Cryptographic Message Syntax (CMS) -- Usage: This data structure contains: the version of the data structure (which is v0 in EPAS protocol context) the keyName the encrypred content info including the encrypted data + * + *

Java class for NamedKeyEncryptedData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="NamedKeyEncryptedData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="KeyName" type="{}KeyName" minOccurs="0"/>
+ *         <element name="EncryptedContent" type="{}EncryptedContent"/>
+ *       </sequence>
+ *       <attribute name="Version" type="{}VersionType" default="v0" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "NamedKeyEncryptedData", propOrder = { + "keyName", + "encryptedContent" +}) +public class NamedKeyEncryptedData { + + /** + * The Key name. + */ + @XmlElement(name = "KeyName") + protected String keyName; + /** + * The Encrypted content. + */ + @XmlElement(name = "EncryptedContent", required = true) + protected EncryptedContent encryptedContent; + /** + * The Version. + */ + @XmlElement(name = "Version") + protected VersionType version; + + /** + * Gets the value of the keyName property. + * + * @return possible object is {@link String } + */ + public String getKeyName() { + return keyName; + } + + /** + * Sets the value of the keyName property. + * + * @param value allowed object is {@link String } + */ + public void setKeyName(String value) { + this.keyName = value; + } + + /** + * Gets the value of the encryptedContent property. + * + * @return possible object is {@link EncryptedContent } + */ + public EncryptedContent getEncryptedContent() { + return encryptedContent; + } + + /** + * Sets the value of the encryptedContent property. + * + * @param value allowed object is {@link EncryptedContent } + */ + public void setEncryptedContent(EncryptedContent value) { + this.encryptedContent = value; + } + + /** + * Gets the value of the version property. + * + * @return possible object is {@link VersionType } + */ + public VersionType getVersion() { + if (version == null) { + return VersionType.V_0; + } else { + return version; + } + } + + /** + * Sets the value of the version property. + * + * @param value allowed object is {@link VersionType } + */ + public void setVersion(VersionType value) { + this.version = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/ObjectFactory.java b/src/main/java/com/adyen/model/nexo/ObjectFactory.java new file mode 100644 index 000000000..b88e9c329 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ObjectFactory.java @@ -0,0 +1,1449 @@ +package com.adyen.model.nexo; + +import javax.xml.bind.annotation.XmlRegistry; + + +/** + * The type Object factory. + */ +@XmlRegistry +public class ObjectFactory { + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.adyen.model.nexo + */ + public ObjectFactory() { + } + + /** + * Create sale to poi request sale to poi request. + * + * @return the sale to poi request + */ + public SaleToPOIRequest createSaleToPOIRequest() { + return new SaleToPOIRequest(); + } + + /** + * Create an instance of {@link MessageHeader } + * + * @return the message header + */ + public MessageHeader createMessageHeader() { + return new MessageHeader(); + } + + /** + * Create an instance of {@link AbortRequest } + * + * @return the abort request + */ + public AbortRequest createAbortRequest() { + return new AbortRequest(); + } + + /** + * Create an instance of {@link BalanceInquiryRequest } + * + * @return the balance inquiry request + */ + public BalanceInquiryRequest createBalanceInquiryRequest() { + return new BalanceInquiryRequest(); + } + + /** + * Create an instance of {@link BatchRequest } + * + * @return the batch request + */ + public BatchRequest createBatchRequest() { + return new BatchRequest(); + } + + /** + * Create an instance of {@link CardAcquisitionRequest } + * + * @return the card acquisition request + */ + public CardAcquisitionRequest createCardAcquisitionRequest() { + return new CardAcquisitionRequest(); + } + + /** + * Create an instance of {@link AdminRequest } + * + * @return the admin request + */ + public AdminRequest createAdminRequest() { + return new AdminRequest(); + } + + /** + * Create an instance of {@link DiagnosisRequest } + * + * @return the diagnosis request + */ + public DiagnosisRequest createDiagnosisRequest() { + return new DiagnosisRequest(); + } + + /** + * Create an instance of {@link DisplayRequest } + * + * @return the display request + */ + public DisplayRequest createDisplayRequest() { + return new DisplayRequest(); + } + + /** + * Create an instance of {@link EnableServiceRequest } + * + * @return the enable service request + */ + public EnableServiceRequest createEnableServiceRequest() { + return new EnableServiceRequest(); + } + + /** + * Create an instance of {@link EventNotification } + * + * @return the event notification + */ + public EventNotification createEventNotification() { + return new EventNotification(); + } + + /** + * Create an instance of {@link GetTotalsRequest } + * + * @return the get totals request + */ + public GetTotalsRequest createGetTotalsRequest() { + return new GetTotalsRequest(); + } + + /** + * Create an instance of {@link InputRequest } + * + * @return the input request + */ + public InputRequest createInputRequest() { + return new InputRequest(); + } + + /** + * Create an instance of {@link InputUpdate } + * + * @return the input update + */ + public InputUpdate createInputUpdate() { + return new InputUpdate(); + } + + /** + * Create an instance of {@link LoginRequest } + * + * @return the login request + */ + public LoginRequest createLoginRequest() { + return new LoginRequest(); + } + + /** + * Create an instance of {@link LogoutRequest } + * + * @return the logout request + */ + public LogoutRequest createLogoutRequest() { + return new LogoutRequest(); + } + + /** + * Create an instance of {@link LoyaltyRequest } + * + * @return the loyalty request + */ + public LoyaltyRequest createLoyaltyRequest() { + return new LoyaltyRequest(); + } + + /** + * Create an instance of {@link PaymentRequest } + * + * @return the payment request + */ + public PaymentRequest createPaymentRequest() { + return new PaymentRequest(); + } + + /** + * Create an instance of {@link PINRequest } + * + * @return the pin request + */ + public PINRequest createPINRequest() { + return new PINRequest(); + } + + /** + * Create an instance of {@link PrintRequest } + * + * @return the print request + */ + public PrintRequest createPrintRequest() { + return new PrintRequest(); + } + + /** + * Create an instance of {@link CardReaderInitRequest } + * + * @return the card reader init request + */ + public CardReaderInitRequest createCardReaderInitRequest() { + return new CardReaderInitRequest(); + } + + /** + * Create an instance of {@link CardReaderAPDURequest } + * + * @return the card reader apdu request + */ + public CardReaderAPDURequest createCardReaderAPDURequest() { + return new CardReaderAPDURequest(); + } + + /** + * Create an instance of {@link CardReaderPowerOffRequest } + * + * @return the card reader power off request + */ + public CardReaderPowerOffRequest createCardReaderPowerOffRequest() { + return new CardReaderPowerOffRequest(); + } + + /** + * Create an instance of {@link ReconciliationRequest } + * + * @return the reconciliation request + */ + public ReconciliationRequest createReconciliationRequest() { + return new ReconciliationRequest(); + } + + /** + * Create an instance of {@link ReversalRequest } + * + * @return the reversal request + */ + public ReversalRequest createReversalRequest() { + return new ReversalRequest(); + } + + /** + * Create an instance of {@link SoundRequest } + * + * @return the sound request + */ + public SoundRequest createSoundRequest() { + return new SoundRequest(); + } + + /** + * Create an instance of {@link StoredValueRequest } + * + * @return the stored value request + */ + public StoredValueRequest createStoredValueRequest() { + return new StoredValueRequest(); + } + + /** + * Create an instance of {@link TransactionStatusRequest } + * + * @return the transaction status request + */ + public TransactionStatusRequest createTransactionStatusRequest() { + return new TransactionStatusRequest(); + } + + /** + * Create an instance of {@link TransmitRequest } + * + * @return the transmit request + */ + public TransmitRequest createTransmitRequest() { + return new TransmitRequest(); + } + + /** + * Create an instance of {@link ContentInformation } + * + * @return the content information + */ + public ContentInformation createContentInformation() { + return new ContentInformation(); + } + + /** + * Create an instance of {@link SaleToPOIResponse } + * + * @return the sale to poi response + */ + public SaleToPOIResponse createSaleToPOIResponse() { + return new SaleToPOIResponse(); + } + + /** + * Create an instance of {@link BalanceInquiryResponse } + * + * @return the balance inquiry response + */ + public BalanceInquiryResponse createBalanceInquiryResponse() { + return new BalanceInquiryResponse(); + } + + /** + * Create an instance of {@link BatchResponse } + * + * @return the batch response + */ + public BatchResponse createBatchResponse() { + return new BatchResponse(); + } + + /** + * Create an instance of {@link CardAcquisitionResponse } + * + * @return the card acquisition response + */ + public CardAcquisitionResponse createCardAcquisitionResponse() { + return new CardAcquisitionResponse(); + } + + /** + * Create an instance of {@link AdminResponse } + * + * @return the admin response + */ + public AdminResponse createAdminResponse() { + return new AdminResponse(); + } + + /** + * Create an instance of {@link DiagnosisResponse } + * + * @return the diagnosis response + */ + public DiagnosisResponse createDiagnosisResponse() { + return new DiagnosisResponse(); + } + + /** + * Create an instance of {@link DisplayResponse } + * + * @return the display response + */ + public DisplayResponse createDisplayResponse() { + return new DisplayResponse(); + } + + /** + * Create an instance of {@link EnableServiceResponse } + * + * @return the enable service response + */ + public EnableServiceResponse createEnableServiceResponse() { + return new EnableServiceResponse(); + } + + /** + * Create an instance of {@link GetTotalsResponse } + * + * @return the get totals response + */ + public GetTotalsResponse createGetTotalsResponse() { + return new GetTotalsResponse(); + } + + /** + * Create an instance of {@link InputResponse } + * + * @return the input response + */ + public InputResponse createInputResponse() { + return new InputResponse(); + } + + /** + * Create an instance of {@link LoginResponse } + * + * @return the login response + */ + public LoginResponse createLoginResponse() { + return new LoginResponse(); + } + + /** + * Create an instance of {@link LogoutResponse } + * + * @return the logout response + */ + public LogoutResponse createLogoutResponse() { + return new LogoutResponse(); + } + + /** + * Create an instance of {@link LoyaltyResponse } + * + * @return the loyalty response + */ + public LoyaltyResponse createLoyaltyResponse() { + return new LoyaltyResponse(); + } + + /** + * Create an instance of {@link PaymentResponse } + * + * @return the payment response + */ + public PaymentResponse createPaymentResponse() { + return new PaymentResponse(); + } + + /** + * Create an instance of {@link PINResponse } + * + * @return the pin response + */ + public PINResponse createPINResponse() { + return new PINResponse(); + } + + /** + * Create an instance of {@link PrintResponse } + * + * @return the print response + */ + public PrintResponse createPrintResponse() { + return new PrintResponse(); + } + + /** + * Create an instance of {@link CardReaderInitResponse } + * + * @return the card reader init response + */ + public CardReaderInitResponse createCardReaderInitResponse() { + return new CardReaderInitResponse(); + } + + /** + * Create an instance of {@link CardReaderAPDUResponse } + * + * @return the card reader apdu response + */ + public CardReaderAPDUResponse createCardReaderAPDUResponse() { + return new CardReaderAPDUResponse(); + } + + /** + * Create an instance of {@link CardReaderPowerOffResponse } + * + * @return the card reader power off response + */ + public CardReaderPowerOffResponse createCardReaderPowerOffResponse() { + return new CardReaderPowerOffResponse(); + } + + /** + * Create an instance of {@link ReconciliationResponse } + * + * @return the reconciliation response + */ + public ReconciliationResponse createReconciliationResponse() { + return new ReconciliationResponse(); + } + + /** + * Create an instance of {@link ReversalResponse } + * + * @return the reversal response + */ + public ReversalResponse createReversalResponse() { + return new ReversalResponse(); + } + + /** + * Create an instance of {@link SoundResponse } + * + * @return the sound response + */ + public SoundResponse createSoundResponse() { + return new SoundResponse(); + } + + /** + * Create an instance of {@link StoredValueResponse } + * + * @return the stored value response + */ + public StoredValueResponse createStoredValueResponse() { + return new StoredValueResponse(); + } + + /** + * Create an instance of {@link TransactionStatusResponse } + * + * @return the transaction status response + */ + public TransactionStatusResponse createTransactionStatusResponse() { + return new TransactionStatusResponse(); + } + + /** + * Create an instance of {@link TransmitResponse } + * + * @return the transmit response + */ + public TransmitResponse createTransmitResponse() { + return new TransmitResponse(); + } + + /** + * Create an instance of {@link PaymentReceipt } + * + * @return the payment receipt + */ + public PaymentReceipt createPaymentReceipt() { + return new PaymentReceipt(); + } + + /** + * Create an instance of {@link POITerminalData } + * + * @return the poi terminal data + */ + public POITerminalData createPOITerminalData() { + return new POITerminalData(); + } + + /** + * Create an instance of {@link POIProfile } + * + * @return the poi profile + */ + public POIProfile createPOIProfile() { + return new POIProfile(); + } + + /** + * Create an instance of {@link SaleToIssuerData } + * + * @return the sale to issuer data + */ + public SaleToIssuerData createSaleToIssuerData() { + return new SaleToIssuerData(); + } + + /** + * Create an instance of {@link SoundContent } + * + * @return the sound content + */ + public SoundContent createSoundContent() { + return new SoundContent(); + } + + /** + * Create an instance of {@link PaymentAcquirerData } + * + * @return the payment acquirer data + */ + public PaymentAcquirerData createPaymentAcquirerData() { + return new PaymentAcquirerData(); + } + + /** + * Create an instance of {@link SaleProfile } + * + * @return the sale profile + */ + public SaleProfile createSaleProfile() { + return new SaleProfile(); + } + + /** + * Create an instance of {@link PaymentToken } + * + * @return the payment token + */ + public PaymentToken createPaymentToken() { + return new PaymentToken(); + } + + /** + * Create an instance of {@link LoyaltyAccountID } + * + * @return the loyalty account id + */ + public LoyaltyAccountID createLoyaltyAccountID() { + return new LoyaltyAccountID(); + } + + /** + * Create an instance of {@link PaymentInstrumentData } + * + * @return the payment instrument data + */ + public PaymentInstrumentData createPaymentInstrumentData() { + return new PaymentInstrumentData(); + } + + /** + * Create an instance of {@link Parameter } + * + * @return the parameter + */ + public Parameter createParameter() { + return new Parameter(); + } + + /** + * Create an instance of {@link EnvelopedData } + * + * @return the enveloped data + */ + public EnvelopedData createEnvelopedData() { + return new EnvelopedData(); + } + + /** + * Create an instance of {@link SignerIdentifier } + * + * @return the signer identifier + */ + public SignerIdentifier createSignerIdentifier() { + return new SignerIdentifier(); + } + + /** + * Create an instance of {@link MessageReference } + * + * @return the message reference + */ + public MessageReference createMessageReference() { + return new MessageReference(); + } + + /** + * Create an instance of {@link PaymentAccountStatus } + * + * @return the payment account status + */ + public PaymentAccountStatus createPaymentAccountStatus() { + return new PaymentAccountStatus(); + } + + /** + * Create an instance of {@link IssuerAndSerialNumber } + * + * @return the issuer and serial number + */ + public IssuerAndSerialNumber createIssuerAndSerialNumber() { + return new IssuerAndSerialNumber(); + } + + /** + * Create an instance of {@link StoredValueAccountID } + * + * @return the stored value account id + */ + public StoredValueAccountID createStoredValueAccountID() { + return new StoredValueAccountID(); + } + + /** + * Create an instance of {@link Signer } + * + * @return the signer + */ + public Signer createSigner() { + return new Signer(); + } + + /** + * Create an instance of {@link TransactionConditions } + * + * @return the transaction conditions + */ + public TransactionConditions createTransactionConditions() { + return new TransactionConditions(); + } + + /** + * Create an instance of {@link EncryptedContent } + * + * @return the encrypted content + */ + public EncryptedContent createEncryptedContent() { + return new EncryptedContent(); + } + + /** + * Create an instance of {@link OriginalPOITransaction } + * + * @return the original poi transaction + */ + public OriginalPOITransaction createOriginalPOITransaction() { + return new OriginalPOITransaction(); + } + + /** + * Create an instance of {@link AlgorithmIdentifier } + * + * @return the algorithm identifier + */ + public AlgorithmIdentifier createAlgorithmIdentifier() { + return new AlgorithmIdentifier(); + } + + /** + * Create an instance of {@link RecipientIdentifier } + * + * @return the recipient identifier + */ + public RecipientIdentifier createRecipientIdentifier() { + return new RecipientIdentifier(); + } + + /** + * Create an instance of {@link PaymentData } + * + * @return the payment data + */ + public PaymentData createPaymentData() { + return new PaymentData(); + } + + /** + * Create an instance of {@link KEKIdentifier } + * + * @return the kek identifier + */ + public KEKIdentifier createKEKIdentifier() { + return new KEKIdentifier(); + } + + /** + * Create an instance of {@link PrintOutput } + * + * @return the print output + */ + public PrintOutput createPrintOutput() { + return new PrintOutput(); + } + + /** + * Create an instance of {@link AmountsResp } + * + * @return the amounts resp + */ + public AmountsResp createAmountsResp() { + return new AmountsResp(); + } + + /** + * Create an instance of {@link LoyaltyAccountStatus } + * + * @return the loyalty account status + */ + public LoyaltyAccountStatus createLoyaltyAccountStatus() { + return new LoyaltyAccountStatus(); + } + + /** + * Create an instance of {@link TransactionToPerform } + * + * @return the transaction to perform + */ + public TransactionToPerform createTransactionToPerform() { + return new TransactionToPerform(); + } + + /** + * Create an instance of {@link MenuEntry } + * + * @return the menu entry + */ + public MenuEntry createMenuEntry() { + return new MenuEntry(); + } + + /** + * Create an instance of {@link DisplayOutput } + * + * @return the display output + */ + public DisplayOutput createDisplayOutput() { + return new DisplayOutput(); + } + + /** + * Create an instance of {@link SignedData } + * + * @return the signed data + */ + public SignedData createSignedData() { + return new SignedData(); + } + + /** + * Create an instance of {@link Amount } + * + * @return the amount + */ + public Amount createAmount() { + return new Amount(); + } + + /** + * Create an instance of {@link PaymentTotals } + * + * @return the payment totals + */ + public PaymentTotals createPaymentTotals() { + return new PaymentTotals(); + } + + /** + * Create an instance of {@link CurrencyConversion } + * + * @return the currency conversion + */ + public CurrencyConversion createCurrencyConversion() { + return new CurrencyConversion(); + } + + /** + * Create an instance of {@link SensitiveMobileData } + * + * @return the sensitive mobile data + */ + public SensitiveMobileData createSensitiveMobileData() { + return new SensitiveMobileData(); + } + + /** + * Create an instance of {@link Instalment } + * + * @return the instalment + */ + public Instalment createInstalment() { + return new Instalment(); + } + + /** + * Create an instance of {@link LoyaltyAccount } + * + * @return the loyalty account + */ + public LoyaltyAccount createLoyaltyAccount() { + return new LoyaltyAccount(); + } + + /** + * Create an instance of {@link TrackData } + * + * @return the track data + */ + public TrackData createTrackData() { + return new TrackData(); + } + + /** + * Create an instance of {@link PaymentAccountReq } + * + * @return the payment account req + */ + public PaymentAccountReq createPaymentAccountReq() { + return new PaymentAccountReq(); + } + + /** + * Create an instance of {@link GeographicCoordinates } + * + * @return the geographic coordinates + */ + public GeographicCoordinates createGeographicCoordinates() { + return new GeographicCoordinates(); + } + + /** + * Create an instance of {@link LoyaltyResult } + * + * @return the loyalty result + */ + public LoyaltyResult createLoyaltyResult() { + return new LoyaltyResult(); + } + + /** + * Create an instance of {@link CardData } + * + * @return the card data + */ + public CardData createCardData() { + return new CardData(); + } + + /** + * Create an instance of {@link LoyaltyAmount } + * + * @return the loyalty amount + */ + public LoyaltyAmount createLoyaltyAmount() { + return new LoyaltyAmount(); + } + + /** + * Create an instance of {@link SensitiveCardData } + * + * @return the sensitive card data + */ + public SensitiveCardData createSensitiveCardData() { + return new SensitiveCardData(); + } + + /** + * Create an instance of {@link Issuer } + * + * @return the issuer + */ + public Issuer createIssuer() { + return new Issuer(); + } + + /** + * Create an instance of {@link NamedKeyEncryptedData } + * + * @return the named key encrypted data + */ + public NamedKeyEncryptedData createNamedKeyEncryptedData() { + return new NamedKeyEncryptedData(); + } + + /** + * Create an instance of {@link POISoftware } + * + * @return the poi software + */ + public POISoftware createPOISoftware() { + return new POISoftware(); + } + + /** + * Create an instance of {@link PerformedTransaction } + * + * @return the performed transaction + */ + public PerformedTransaction createPerformedTransaction() { + return new PerformedTransaction(); + } + + /** + * Create an instance of {@link ICCResetData } + * + * @return the icc reset data + */ + public ICCResetData createICCResetData() { + return new ICCResetData(); + } + + /** + * Create an instance of {@link CardholderPIN } + * + * @return the cardholder pin + */ + public CardholderPIN createCardholderPIN() { + return new CardholderPIN(); + } + + /** + * Create an instance of {@link StoredValueResult } + * + * @return the stored value result + */ + public StoredValueResult createStoredValueResult() { + return new StoredValueResult(); + } + + /** + * Create an instance of {@link POIData } + * + * @return the poi data + */ + public POIData createPOIData() { + return new POIData(); + } + + /** + * Create an instance of {@link KEK } + * + * @return the kek + */ + public KEK createKEK() { + return new KEK(); + } + + /** + * Create an instance of {@link DigestedData } + * + * @return the digested data + */ + public DigestedData createDigestedData() { + return new DigestedData(); + } + + /** + * Create an instance of {@link SignaturePoint } + * + * @return the signature point + */ + public SignaturePoint createSignaturePoint() { + return new SignaturePoint(); + } + + /** + * Create an instance of {@link AmountsReq } + * + * @return the amounts req + */ + public AmountsReq createAmountsReq() { + return new AmountsReq(); + } + + /** + * Create an instance of {@link TransactionTotals } + * + * @return the transaction totals + */ + public TransactionTotals createTransactionTotals() { + return new TransactionTotals(); + } + + /** + * Create an instance of {@link RepeatedMessageResponse } + * + * @return the repeated message response + */ + public RepeatedMessageResponse createRepeatedMessageResponse() { + return new RepeatedMessageResponse(); + } + + /** + * Create an instance of {@link SponsoredMerchant } + * + * @return the sponsored merchant + */ + public SponsoredMerchant createSponsoredMerchant() { + return new SponsoredMerchant(); + } + + /** + * Create an instance of {@link UTMCoordinates } + * + * @return the utm coordinates + */ + public UTMCoordinates createUTMCoordinates() { + return new UTMCoordinates(); + } + + /** + * Create an instance of {@link Geolocation } + * + * @return the geolocation + */ + public Geolocation createGeolocation() { + return new Geolocation(); + } + + /** + * Create an instance of {@link SaleSoftware } + * + * @return the sale software + */ + public SaleSoftware createSaleSoftware() { + return new SaleSoftware(); + } + + /** + * Create an instance of {@link LoyaltyData } + * + * @return the loyalty data + */ + public LoyaltyData createLoyaltyData() { + return new LoyaltyData(); + } + + /** + * Create an instance of {@link Rebates } + * + * @return the rebates + */ + public Rebates createRebates() { + return new Rebates(); + } + + /** + * Create an instance of {@link InputResult } + * + * @return the input result + */ + public InputResult createInputResult() { + return new InputResult(); + } + + /** + * Create an instance of {@link AreaSize } + * + * @return the area size + */ + public AreaSize createAreaSize() { + return new AreaSize(); + } + + /** + * Create an instance of {@link CapturedSignature } + * + * @return the captured signature + */ + public CapturedSignature createCapturedSignature() { + return new CapturedSignature(); + } + + /** + * Create an instance of {@link LoyaltyAccountReq } + * + * @return the loyalty account req + */ + public LoyaltyAccountReq createLoyaltyAccountReq() { + return new LoyaltyAccountReq(); + } + + /** + * Create an instance of {@link AllowedProduct } + * + * @return the allowed product + */ + public AllowedProduct createAllowedProduct() { + return new AllowedProduct(); + } + + /** + * Create an instance of {@link HostStatus } + * + * @return the host status + */ + public HostStatus createHostStatus() { + return new HostStatus(); + } + + /** + * Create an instance of {@link RelativeDistinguishedName } + * + * @return the relative distinguished name + */ + public RelativeDistinguishedName createRelativeDistinguishedName() { + return new RelativeDistinguishedName(); + } + + /** + * Create an instance of {@link POIStatus } + * + * @return the poi status + */ + public POIStatus createPOIStatus() { + return new POIStatus(); + } + + /** + * Create an instance of {@link TransactionIdentification } + * + * @return the transaction identification + */ + public TransactionIdentification createTransactionIdentification() { + return new TransactionIdentification(); + } + + /** + * Create an instance of {@link CustomerOrder } + * + * @return the customer order + */ + public CustomerOrder createCustomerOrder() { + return new CustomerOrder(); + } + + /** + * Create an instance of {@link StoredValueData } + * + * @return the stored value data + */ + public StoredValueData createStoredValueData() { + return new StoredValueData(); + } + + /** + * Create an instance of {@link OutputText } + * + * @return the output text + */ + public OutputText createOutputText() { + return new OutputText(); + } + + /** + * Create an instance of {@link OutputBarcode } + * + * @return the output barcode + */ + public OutputBarcode createOutputBarcode() { + return new OutputBarcode(); + } + + /** + * Create an instance of {@link SaleItem } + * + * @return the sale item + */ + public SaleItem createSaleItem() { + return new SaleItem(); + } + + /** + * Create an instance of {@link LoyaltyTransaction } + * + * @return the loyalty transaction + */ + public LoyaltyTransaction createLoyaltyTransaction() { + return new LoyaltyTransaction(); + } + + /** + * Create an instance of {@link LoyaltyAcquirerData } + * + * @return the loyalty acquirer data + */ + public LoyaltyAcquirerData createLoyaltyAcquirerData() { + return new LoyaltyAcquirerData(); + } + + /** + * Create an instance of {@link StoredValueAccountStatus } + * + * @return the stored value account status + */ + public StoredValueAccountStatus createStoredValueAccountStatus() { + return new StoredValueAccountStatus(); + } + + /** + * Create an instance of {@link LoyaltyTotals } + * + * @return the loyalty totals + */ + public LoyaltyTotals createLoyaltyTotals() { + return new LoyaltyTotals(); + } + + /** + * Create an instance of {@link POISystemData } + * + * @return the poi system data + */ + public POISystemData createPOISystemData() { + return new POISystemData(); + } + + /** + * Create an instance of {@link CardAcquisitionTransaction } + * + * @return the card acquisition transaction + */ + public CardAcquisitionTransaction createCardAcquisitionTransaction() { + return new CardAcquisitionTransaction(); + } + + /** + * Create an instance of {@link CoinsOrBills } + * + * @return the coins or bills + */ + public CoinsOrBills createCoinsOrBills() { + return new CoinsOrBills(); + } + + /** + * Create an instance of {@link InputData } + * + * @return the input data + */ + public InputData createInputData() { + return new InputData(); + } + + /** + * Create an instance of {@link SaleItemRebate } + * + * @return the sale item rebate + */ + public SaleItemRebate createSaleItemRebate() { + return new SaleItemRebate(); + } + + /** + * Create an instance of {@link AuthenticatedData } + * + * @return the authenticated data + */ + public AuthenticatedData createAuthenticatedData() { + return new AuthenticatedData(); + } + + /** + * Create an instance of {@link TotalFilter } + * + * @return the total filter + */ + public TotalFilter createTotalFilter() { + return new TotalFilter(); + } + + /** + * Create an instance of {@link SaleData } + * + * @return the sale data + */ + public SaleData createSaleData() { + return new SaleData(); + } + + /** + * Create an instance of {@link PredefinedContent } + * + * @return the predefined content + */ + public PredefinedContent createPredefinedContent() { + return new PredefinedContent(); + } + + /** + * Create an instance of {@link Input } + * + * @return the input + */ + public Input createInput() { + return new Input(); + } + + /** + * Create an instance of {@link KeyTransport } + * + * @return the key transport + */ + public KeyTransport createKeyTransport() { + return new KeyTransport(); + } + + /** + * Create an instance of {@link CheckData } + * + * @return the check data + */ + public CheckData createCheckData() { + return new CheckData(); + } + + /** + * Create an instance of {@link SaleTerminalData } + * + * @return the sale terminal data + */ + public SaleTerminalData createSaleTerminalData() { + return new SaleTerminalData(); + } + + /** + * Create an instance of {@link PaymentTransaction } + * + * @return the payment transaction + */ + public PaymentTransaction createPaymentTransaction() { + return new PaymentTransaction(); + } + + /** + * Create an instance of {@link OutputContent } + * + * @return the output content + */ + public OutputContent createOutputContent() { + return new OutputContent(); + } + + /** + * Create an instance of {@link PaymentResult } + * + * @return the payment result + */ + public PaymentResult createPaymentResult() { + return new PaymentResult(); + } + + /** + * Create an instance of {@link MobileData } + * + * @return the mobile data + */ + public MobileData createMobileData() { + return new MobileData(); + } + + /** + * Create an instance of {@link OutputResult } + * + * @return the output result + */ + public OutputResult createOutputResult() { + return new OutputResult(); + } + + /** + * Create an instance of {@link CashHandlingDevice } + * + * @return the cash handling device + */ + public CashHandlingDevice createCashHandlingDevice() { + return new CashHandlingDevice(); + } + + /** + * Create an instance of {@link Response } + * + * @return the response + */ + public Response createResponse() { + return new Response(); + } + + /** + * Create an instance of {@link EncapsulatedContent } + * + * @return the encapsulated content + */ + public EncapsulatedContent createEncapsulatedContent() { + return new EncapsulatedContent(); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/OriginalPOITransaction.java b/src/main/java/com/adyen/model/nexo/OriginalPOITransaction.java new file mode 100644 index 000000000..d571bc6bc --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/OriginalPOITransaction.java @@ -0,0 +1,242 @@ +package com.adyen.model.nexo; + +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 Request messageType, it allows using the card of a previous CardAcquisition or Payment/Loyalty request. To reverse a Payment or the Loyalty transaction. By default, the reversal is requested from the same Sale + * + *

Java class for OriginalPOITransaction complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="OriginalPOITransaction">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="POITransactionID" type="{}TransactionIdentification" minOccurs="0"/>
+ *         <element name="ApprovalCode" type="{}ApprovalCode" minOccurs="0"/>
+ *         <element name="HostTransactionID" type="{}TransactionIdentification" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="SaleID" type="{}SaleID" />
+ *       <attribute name="POIID" type="{}POIID" />
+ *       <attribute name="ReuseCardDataFlag" type="{}ReuseCardDataFlag" default="true" />
+ *       <attribute name="CustomerLanguage" type="{}ISOLanguage2A" />
+ *       <attribute name="AcquirerID" type="{}AcquirerID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OriginalPOITransaction", propOrder = { + "poiTransactionID", + "approvalCode", + "hostTransactionID" +}) +public class OriginalPOITransaction { + + /** + * The Poi transaction id. + */ + @XmlElement(name = "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") + @Schema(description = "Code assigned to a transaction approval by the Acquirer. --Rule: If referral") + protected String approvalCode; + /** + * The Host transaction id. + */ + @XmlElement(name = "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") + @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") + @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") + @Schema(description = "Indicate if the card data has to be got from a previous transaction.") + protected Boolean reuseCardDataFlag; + /** + * The Customer language. + */ + @XmlElement(name = "CustomerLanguage") + @Schema(description = "Language of the Customer --Rule: Optional for Reversal, otherwise absent.") + protected String customerLanguage; + /** + * The Acquirer id. + */ + @XmlElement(name = "AcquirerID") + @Schema(description = "Identification of the Acquirer --Rule: Optional for Reversal, otherwise absent.") + protected String acquirerID; + + /** + * Gets the value of the poiTransactionID property. + * + * @return possible object is {@link TransactionIdentification } + */ + public TransactionIdentification getPOITransactionID() { + return poiTransactionID; + } + + /** + * Sets the value of the poiTransactionID property. + * + * @param value allowed object is {@link TransactionIdentification } + */ + public void setPOITransactionID(TransactionIdentification value) { + this.poiTransactionID = value; + } + + /** + * Gets the value of the approvalCode property. + * + * @return possible object is {@link String } + */ + public String getApprovalCode() { + return approvalCode; + } + + /** + * Sets the value of the approvalCode property. + * + * @param value allowed object is {@link String } + */ + public void setApprovalCode(String value) { + this.approvalCode = value; + } + + /** + * Gets the value of the hostTransactionID property. + * + * @return possible object is {@link TransactionIdentification } + */ + public TransactionIdentification getHostTransactionID() { + return hostTransactionID; + } + + /** + * Sets the value of the hostTransactionID property. + * + * @param value allowed object is {@link TransactionIdentification } + */ + public void setHostTransactionID(TransactionIdentification value) { + this.hostTransactionID = value; + } + + /** + * Gets the value of the saleID property. + * + * @return possible object is {@link String } + */ + public String getSaleID() { + return saleID; + } + + /** + * Sets the value of the saleID property. + * + * @param value allowed object is {@link String } + */ + public void setSaleID(String value) { + this.saleID = value; + } + + /** + * Gets the value of the poiid property. + * + * @return possible object is {@link String } + */ + public String getPOIID() { + return poiid; + } + + /** + * Sets the value of the poiid property. + * + * @param value allowed object is {@link String } + */ + public void setPOIID(String value) { + this.poiid = value; + } + + /** + * Gets the value of the reuseCardDataFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isReuseCardDataFlag() { + if (reuseCardDataFlag == null) { + return true; + } else { + return reuseCardDataFlag; + } + } + + /** + * Sets the value of the reuseCardDataFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setReuseCardDataFlag(Boolean value) { + this.reuseCardDataFlag = value; + } + + /** + * Gets the value of the customerLanguage property. + * + * @return possible object is {@link String } + */ + public String getCustomerLanguage() { + return customerLanguage; + } + + /** + * Sets the value of the customerLanguage property. + * + * @param value allowed object is {@link String } + */ + public void setCustomerLanguage(String value) { + this.customerLanguage = value; + } + + /** + * Gets the value of the acquirerID property. + * + * @return possible object is {@link String } + */ + public String getAcquirerID() { + return acquirerID; + } + + /** + * Sets the value of the acquirerID property. + * + * @param value allowed object is {@link String } + */ + public void setAcquirerID(String value) { + this.acquirerID = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/OutputBarcode.java b/src/main/java/com/adyen/model/nexo/OutputBarcode.java new file mode 100644 index 000000000..df7f38962 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/OutputBarcode.java @@ -0,0 +1,85 @@ +package com.adyen.model.nexo; + +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 + * + * + *

Java class for OutputBarcode complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="OutputBarcode">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="BarcodeValue" use="required" type="{}BarcodeValue" />
+ *       <attribute name="BarcodeType" type="{}BarcodeType" default="EAN13" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OutputBarcode") +public class OutputBarcode { + + @XmlElement(name = "BarcodeValue", required = true) + @Schema(description = "Value with a BarCode coding.") + protected String barcodeValue; + @XmlElement(name = "BarcodeType") + @Schema(description = "Type of BarCode coding.") + protected BarcodeType barcodeType; + + /** + * Gets the value of the barcodeValue property. + * + * @return possible object is + * {@link String } + */ + public String getBarcodeValue() { + return barcodeValue; + } + + /** + * Sets the value of the barcodeValue property. + * + * @param value allowed object is + * {@link String } + */ + public void setBarcodeValue(String value) { + this.barcodeValue = value; + } + + /** + * Gets the value of the barcodeType property. + * + * @return possible object is + * {@link BarcodeType } + */ + public BarcodeType getBarcodeType() { + if (barcodeType == null) { + return BarcodeType.EAN_13; + } else { + return barcodeType; + } + } + + /** + * Sets the value of the barcodeType property. + * + * @param value allowed object is + * {@link BarcodeType } + */ + public void setBarcodeType(BarcodeType value) { + this.barcodeType = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/OutputContent.java b/src/main/java/com/adyen/model/nexo/OutputContent.java new file mode 100644 index 000000000..d83824816 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/OutputContent.java @@ -0,0 +1,177 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content to display or print. -- Usage: This is a sequence of elements if they have different formats. + * + *

Java class for OutputContent complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="OutputContent">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="PredefinedContent" type="{}PredefinedContent" minOccurs="0"/>
+ *         <element name="OutputText" type="{}OutputText" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="OutputXHTML" type="{}OutputXHTML" minOccurs="0"/>
+ *         <element name="OutputBarcode" type="{}OutputBarcode" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="OutputFormat" use="required" type="{}OutputFormatType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OutputContent", propOrder = { + "predefinedContent", + "outputText", + "outputXHTML", + "outputBarcode" +}) +public class OutputContent { + + /** + * The Predefined content. + */ + @XmlElement(name = "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") + @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") + @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") + @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) + @Schema(description = "Format of the content to display or print") + protected OutputFormatType outputFormat; + + /** + * Gets the value of the predefinedContent property. + * + * @return possible object is {@link PredefinedContent } + */ + public PredefinedContent getPredefinedContent() { + return predefinedContent; + } + + /** + * Sets the value of the predefinedContent property. + * + * @param value allowed object is {@link PredefinedContent } + */ + public void setPredefinedContent(PredefinedContent value) { + this.predefinedContent = value; + } + + /** + * Gets the value of the outputText property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the outputText property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getOutputText().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link OutputText } + * + * @return the output text + */ + public List getOutputText() { + if (outputText == null) { + outputText = new ArrayList<>(); + } + return this.outputText; + } + + /** + * Gets the value of the outputXHTML property. + * + * @return possible object is byte[] + */ + public byte[] getOutputXHTML() { + return outputXHTML; + } + + /** + * Sets the value of the outputXHTML property. + * + * @param value allowed object is byte[] + */ + public void setOutputXHTML(byte[] value) { + this.outputXHTML = value; + } + + /** + * Gets the value of the outputBarcode property. + * + * @return possible object is {@link OutputBarcode } + */ + public OutputBarcode getOutputBarcode() { + return outputBarcode; + } + + /** + * Sets the value of the outputBarcode property. + * + * @param value allowed object is {@link OutputBarcode } + */ + public void setOutputBarcode(OutputBarcode value) { + this.outputBarcode = value; + } + + /** + * Gets the value of the outputFormat property. + * + * @return possible object is {@link OutputFormatType } + */ + public OutputFormatType getOutputFormat() { + return outputFormat; + } + + /** + * Sets the value of the outputFormat property. + * + * @param value allowed object is {@link OutputFormatType } + */ + public void setOutputFormat(OutputFormatType value) { + this.outputFormat = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/OutputFormatType.java b/src/main/java/com/adyen/model/nexo/OutputFormatType.java new file mode 100644 index 000000000..88b50962e --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/OutputFormatType.java @@ -0,0 +1,86 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for OutputFormatType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="OutputFormatType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="MessageRef"/>
+ *     <enumeration value="Text"/>
+ *     <enumeration value="XHTML"/>
+ *     <enumeration value="BarCode"/>
+ *   </restriction>
+ * </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") + @Schema(description = "Predefined message (of any format) on the POI or the Sale. The output is then a PredefinedContent data structure. ") + MESSAGE_REF("MessageRef"), + + /** + * Text messageType including control characters prefixed by an escape character. The DisplayOutput is then an OutputText data structure. + */ + @XmlEnumValue("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") + @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") + @Schema(description = "Barcode type to print The output is then a OutputBarCode data structure.") + BAR_CODE("BarCode"); + private final String value; + + OutputFormatType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value output format type. + * + * @param v the v + * @return the output format type + */ + public static OutputFormatType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/OutputResult.java b/src/main/java/com/adyen/model/nexo/OutputResult.java new file mode 100644 index 000000000..ab8df1ed8 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/OutputResult.java @@ -0,0 +1,111 @@ +package com.adyen.model.nexo; + +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 the messageType response, it contains the result of the output, if required in the messageType request. + * + *

Java class for OutputResult complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="OutputResult">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *       </sequence>
+ *       <attribute name="Device" use="required" type="{}DeviceType" />
+ *       <attribute name="InfoQualify" use="required" type="{}InfoQualifyType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OutputResult", propOrder = { + "response" +}) +public class OutputResult { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Device. + */ + @XmlElement(name = "Device", required = true) + @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) + @Schema(description = "Qualification of the information to sent to an output logical device, to display or print to the Cashier or the --Rule: Copy") + protected InfoQualifyType infoQualify; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the device property. + * + * @return possible object is {@link DeviceType } + */ + public DeviceType getDevice() { + return device; + } + + /** + * Sets the value of the device property. + * + * @param value allowed object is {@link DeviceType } + */ + public void setDevice(DeviceType value) { + this.device = value; + } + + /** + * Gets the value of the infoQualify property. + * + * @return possible object is {@link InfoQualifyType } + */ + public InfoQualifyType getInfoQualify() { + return infoQualify; + } + + /** + * Sets the value of the infoQualify property. + * + * @param value allowed object is {@link InfoQualifyType } + */ + public void setInfoQualify(InfoQualifyType value) { + this.infoQualify = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/OutputText.java b/src/main/java/com/adyen/model/nexo/OutputText.java new file mode 100644 index 000000000..f9dbfd1d6 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/OutputText.java @@ -0,0 +1,306 @@ +package com.adyen.model.nexo; + +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 to the content of the text message and its format. All the data elements related to the format of the text to display or print are parameters valid for the whole Text content. + * + *

Java class for OutputText complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="OutputText">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="Text" use="required" type="{}Text" />
+ *       <attribute name="CharacterSet" type="{}CharacterSet" />
+ *       <attribute name="Font" type="{}Font" />
+ *       <attribute name="StartRow" type="{}StartRow" />
+ *       <attribute name="StartColumn" type="{}StartColumn" />
+ *       <attribute name="Color" type="{}ColorType" />
+ *       <attribute name="CharacterWidth" type="{}CharacterWidthType" />
+ *       <attribute name="CharacterHeight" type="{}CharacterHeightType" />
+ *       <attribute name="CharacterStyle" type="{}CharacterStyleType" />
+ *       <attribute name="Alignment" type="{}AlignmentType" />
+ *       <attribute name="EndOfLineFlag" type="{}EndOfLineFlag" default="true" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OutputText") +public class OutputText { + + @XmlElement(name = "Text", required = true) + @Schema(description = "Content of text message to display, print or play.") + protected String text; + + @XmlElement(name = "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") + @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") + @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") + @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") + @Schema(description = "Color of the text string to display or print. --Rule: If not present, default colourused ") + protected ColorType color; + + @XmlElement(name = "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") + @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") + @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") + @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") + @Schema(description = "Text is at the end of a line.") + protected Boolean endOfLineFlag; + + /** + * Gets the value of the text property. + * + * @return possible object is + * {@link String } + */ + public String getText() { + return text; + } + + /** + * Sets the value of the text property. + * + * @param value allowed object is + * {@link String } + */ + public void setText(String value) { + this.text = value; + } + + /** + * Gets the value of the characterSet property. + * + * @return possible object is + * {@link Integer } + */ + public Integer getCharacterSet() { + return characterSet; + } + + /** + * Sets the value of the characterSet property. + * + * @param value allowed object is + * {@link Integer } + */ + public void setCharacterSet(Integer value) { + this.characterSet = value; + } + + /** + * Gets the value of the font property. + * + * @return possible object is + * {@link String } + */ + public String getFont() { + return font; + } + + /** + * Sets the value of the font property. + * + * @param value allowed object is + * {@link String } + */ + public void setFont(String value) { + this.font = value; + } + + /** + * Gets the value of the startRow property. + * + * @return possible object is + * {@link Integer } + */ + public Integer getStartRow() { + return startRow; + } + + /** + * Sets the value of the startRow property. + * + * @param value allowed object is + * {@link Integer } + */ + public void setStartRow(Integer value) { + this.startRow = value; + } + + /** + * Gets the value of the startColumn property. + * + * @return possible object is + * {@link Integer } + */ + public Integer getStartColumn() { + return startColumn; + } + + /** + * Sets the value of the startColumn property. + * + * @param value allowed object is + * {@link Integer } + */ + public void setStartColumn(Integer value) { + this.startColumn = value; + } + + /** + * Gets the value of the color property. + * + * @return possible object is + * {@link ColorType } + */ + public ColorType getColor() { + return color; + } + + /** + * Sets the value of the color property. + * + * @param value allowed object is + * {@link ColorType } + */ + public void setColor(ColorType value) { + this.color = value; + } + + /** + * Gets the value of the characterWidth property. + * + * @return possible object is + * {@link CharacterWidthType } + */ + public CharacterWidthType getCharacterWidth() { + return characterWidth; + } + + /** + * Sets the value of the characterWidth property. + * + * @param value allowed object is + * {@link CharacterWidthType } + */ + public void setCharacterWidth(CharacterWidthType value) { + this.characterWidth = value; + } + + /** + * Gets the value of the characterHeight property. + * + * @return possible object is + * {@link CharacterHeightType } + */ + public CharacterHeightType getCharacterHeight() { + return characterHeight; + } + + /** + * Sets the value of the characterHeight property. + * + * @param value allowed object is + * {@link CharacterHeightType } + */ + public void setCharacterHeight(CharacterHeightType value) { + this.characterHeight = value; + } + + /** + * Gets the value of the characterStyle property. + * + * @return possible object is + * {@link CharacterStyleType } + */ + public CharacterStyleType getCharacterStyle() { + return characterStyle; + } + + /** + * Sets the value of the characterStyle property. + * + * @param value allowed object is + * {@link CharacterStyleType } + */ + public void setCharacterStyle(CharacterStyleType value) { + this.characterStyle = value; + } + + /** + * Gets the value of the alignment property. + * + * @return possible object is + * {@link AlignmentType } + */ + public AlignmentType getAlignment() { + return alignment; + } + + /** + * Sets the value of the alignment property. + * + * @param value allowed object is + * {@link AlignmentType } + */ + public void setAlignment(AlignmentType value) { + this.alignment = value; + } + + /** + * Gets the value of the endOfLineFlag property. + * + * @return possible object is + * {@link Boolean } + */ + public boolean isEndOfLineFlag() { + if (endOfLineFlag == null) { + return true; + } else { + return endOfLineFlag; + } + } + + /** + * Sets the value of the endOfLineFlag property. + * + * @param value allowed object is + * {@link Boolean } + */ + public void setEndOfLineFlag(Boolean value) { + this.endOfLineFlag = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PINFormatType.java b/src/main/java/com/adyen/model/nexo/PINFormatType.java new file mode 100644 index 000000000..67240f1c9 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PINFormatType.java @@ -0,0 +1,86 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for PINFormatType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="PINFormatType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="ISO0"/>
+ *     <enumeration value="ISO1"/>
+ *     <enumeration value="ISO2"/>
+ *     <enumeration value="ISO3"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "PINFormatType") +@XmlEnum +public enum PINFormatType { + + + /** + * ISO 0 + */ + @XmlEnumValue("ISO0") + @Schema(description = "ISO 0") + ISO_0("ISO0"), + + /** + * ISO 1 + */ + @XmlEnumValue("ISO1") + @Schema(description = "ISO 1") + ISO_1("ISO1"), + + /** + * ISO 2 + */ + @XmlEnumValue("ISO2") + @Schema(description = "ISO 2") + ISO_2("ISO2"), + + /** + * ISO 3 + */ + @XmlEnumValue("ISO3") + @Schema(description = "ISO 3") + ISO_3("ISO3"); + private final String value; + + PINFormatType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value pin format type. + * + * @param v the v + * @return the pin format type + */ + public static PINFormatType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PINRequest.java b/src/main/java/com/adyen/model/nexo/PINRequest.java new file mode 100644 index 000000000..e108bf87b --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PINRequest.java @@ -0,0 +1,237 @@ +package com.adyen.model.nexo; + +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 java.math.BigInteger; + + +/** + * Definition: Content of the PIN Request messageType. -- Usage: It contains the type of request related to the PIN, and the associated parameters. + * + *

Java class for PINRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PINRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CardholderPIN" type="{}CardholderPIN" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="PINRequest" use="required" type="{}PINRequestType" />
+ *       <attribute name="PINVerifMethod" type="{}PINVerifMethod" />
+ *       <attribute name="AdditionalInput" type="{}AdditionalInput" />
+ *       <attribute name="PINEncAlgorithm" type="{}PINEncAlgorithm" />
+ *       <attribute name="PINFormat" type="{}PINFormatType" />
+ *       <attribute name="KeyReference" type="{}KeyReference" />
+ *       <attribute name="MaxWaitingTime" type="{}MaxWaitingTime" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PINRequest", propOrder = { + "cardholderPIN" +}) +public class PINRequest { + + /** + * The Cardholder pin. + */ + @XmlElement(name = "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) + @Schema(description = "Type of PIN Service.") + protected PINRequestType pinRequestType; + /** + * The Pin verif method. + */ + @XmlElement(name = "PINVerifMethod") + @Schema(description = "Identify the PIN verification method and keys. --Rule: PINRequestType") + protected String pinVerifMethod; + /** + * The Additional input. + */ + @XmlElement(name = "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") + @Schema(description = "Identify the encrypted PIN block algorithm. --Rule: PINRequestType") + protected String pinEncAlgorithm; + /** + * The Pin format. + */ + @XmlElement(name = "PINFormat") + @Schema(description = "Identify the format of the PIN before encryption. --Rule: PINRequestType") + protected PINFormatType pinFormat; + /** + * The Key reference. + */ + @XmlElement(name = "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") + @Schema(description = "Maximum time to wait for the request processing in seconds. --Rule: PINRequestTypePINRequestType") + protected BigInteger maxWaitingTime; + + /** + * Gets the value of the cardholderPIN property. + * + * @return possible object is {@link CardholderPIN } + */ + public CardholderPIN getCardholderPIN() { + return cardholderPIN; + } + + /** + * Sets the value of the cardholderPIN property. + * + * @param value allowed object is {@link CardholderPIN } + */ + public void setCardholderPIN(CardholderPIN value) { + this.cardholderPIN = value; + } + + /** + * Gets the value of the pinRequestType property. + * + * @return possible object is {@link PINRequestType } + */ + public PINRequestType getPINRequestType() { + return pinRequestType; + } + + /** + * Sets the value of the pinRequestType property. + * + * @param value allowed object is {@link PINRequestType } + */ + public void setPINRequestType(PINRequestType value) { + this.pinRequestType = value; + } + + /** + * Gets the value of the pinVerifMethod property. + * + * @return possible object is {@link String } + */ + public String getPINVerifMethod() { + return pinVerifMethod; + } + + /** + * Sets the value of the pinVerifMethod property. + * + * @param value allowed object is {@link String } + */ + public void setPINVerifMethod(String value) { + this.pinVerifMethod = value; + } + + /** + * Gets the value of the additionalInput property. + * + * @return possible object is {@link String } + */ + public String getAdditionalInput() { + return additionalInput; + } + + /** + * Sets the value of the additionalInput property. + * + * @param value allowed object is {@link String } + */ + public void setAdditionalInput(String value) { + this.additionalInput = value; + } + + /** + * Gets the value of the pinEncAlgorithm property. + * + * @return possible object is {@link String } + */ + public String getPINEncAlgorithm() { + return pinEncAlgorithm; + } + + /** + * Sets the value of the pinEncAlgorithm property. + * + * @param value allowed object is {@link String } + */ + public void setPINEncAlgorithm(String value) { + this.pinEncAlgorithm = value; + } + + /** + * Gets the value of the pinFormat property. + * + * @return possible object is {@link PINFormatType } + */ + public PINFormatType getPINFormat() { + return pinFormat; + } + + /** + * Sets the value of the pinFormat property. + * + * @param value allowed object is {@link PINFormatType } + */ + public void setPINFormat(PINFormatType value) { + this.pinFormat = value; + } + + /** + * Gets the value of the keyReference property. + * + * @return possible object is {@link String } + */ + public String getKeyReference() { + return keyReference; + } + + /** + * Sets the value of the keyReference property. + * + * @param value allowed object is {@link String } + */ + public void setKeyReference(String value) { + this.keyReference = value; + } + + /** + * Gets the value of the maxWaitingTime property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getMaxWaitingTime() { + return maxWaitingTime; + } + + /** + * Sets the value of the maxWaitingTime property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setMaxWaitingTime(BigInteger value) { + this.maxWaitingTime = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PINRequestType.java b/src/main/java/com/adyen/model/nexo/PINRequestType.java new file mode 100644 index 000000000..08f23ea27 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PINRequestType.java @@ -0,0 +1,78 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for PINRequestType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="PINRequestType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="PINVerify"/>
+ *     <enumeration value="PINVerifyOnly"/>
+ *     <enumeration value="PINEnter"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "PINRequestType") +@XmlEnum +public enum PINRequestType { + + + /** + * The PIN Entering and Verify. + */ + @XmlEnumValue("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") + @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") + @Schema(description = "The PIN is entered by the Cardholder, encrypted by the POI, and provided as a result.") + PIN_ENTER("PINEnter"); + private final String value; + + PINRequestType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value pin request type. + * + * @param v the v + * @return the pin request type + */ + public static PINRequestType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PINResponse.java b/src/main/java/com/adyen/model/nexo/PINResponse.java new file mode 100644 index 000000000..8ca23f7e9 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PINResponse.java @@ -0,0 +1,87 @@ +package com.adyen.model.nexo; + +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 requested service, with possibly the encrypted PIN. + * + *

Java class for PINResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PINResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="CardholderPIN" type="{}CardholderPIN" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PINResponse", propOrder = { + "response", + "cardholderPIN" +}) +public class PINResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Cardholder pin. + */ + @XmlElement(name = "CardholderPIN") + @Schema(description = "Encrypted PIN and related information") + protected CardholderPIN cardholderPIN; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the cardholderPIN property. + * + * @return possible object is {@link CardholderPIN } + */ + public CardholderPIN getCardholderPIN() { + return cardholderPIN; + } + + /** + * Sets the value of the cardholderPIN property. + * + * @param value allowed object is {@link CardholderPIN } + */ + public void setCardholderPIN(CardholderPIN value) { + this.cardholderPIN = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/POICapabilitiesType.java b/src/main/java/com/adyen/model/nexo/POICapabilitiesType.java new file mode 100644 index 000000000..1180323d7 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/POICapabilitiesType.java @@ -0,0 +1,156 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for POICapabilitiesType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="POICapabilitiesType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="CashierDisplay"/>
+ *     <enumeration value="CashierError"/>
+ *     <enumeration value="CashierInput"/>
+ *     <enumeration value="CustomerDisplay"/>
+ *     <enumeration value="CustomerError"/>
+ *     <enumeration value="CustomerInput"/>
+ *     <enumeration value="PrinterReceipt"/>
+ *     <enumeration value="PrinterDocument"/>
+ *     <enumeration value="PrinterVoucher"/>
+ *     <enumeration value="MagStripe"/>
+ *     <enumeration value="ICC"/>
+ *     <enumeration value="EMVContactless"/>
+ *     <enumeration value="CashHandling"/>
+ *   </restriction>
+ * </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") + @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.") + CASHIER_DISPLAY("CashierDisplay"), + + /** + * 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") + @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.") + CASHIER_ERROR("CashierError"), + + /** + * 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") + @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") + CASHIER_INPUT("CashierInput"), + + /** + * 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") + @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.") + CUSTOMER_DISPLAY("CustomerDisplay"), + + /** + * To display to the Customer information is related to an error situation occurring on the Sale Terminal during a Sale transaction. + */ + @XmlEnumValue("CustomerError") + @Schema(description = "To display to the Customer information is related to an error situation occurring on the Sale Terminal during a Sale transaction.") + CUSTOMER_ERROR("CustomerError"), + + /** + * 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") + @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") + @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") + @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") + @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") + @Schema(description = "Magnetic stripe card reader") + MAG_STRIPE("MagStripe"), + + /** + * Contact ICC card reader + */ + ICC("ICC"), + + /** + * Contactless card reader with EMV applications + */ + @XmlEnumValue("EMVContactless") + @Schema(description = "Contactless card reader with EMV applications") + EMV_CONTACTLESS("EMVContactless"), + + /** + * Device which performs cash change, cash dispense or cash acceptance. + */ + @XmlEnumValue("CashHandling") + @Schema(description = "Device which performs cash change, cash dispense or cash acceptance.") + CASH_HANDLING("CashHandling"); + private final String value; + + POICapabilitiesType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value poi capabilities type. + * + * @param v the v + * @return the poi capabilities type + */ + public static POICapabilitiesType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/POIData.java b/src/main/java/com/adyen/model/nexo/POIData.java new file mode 100644 index 000000000..8f109e7e2 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/POIData.java @@ -0,0 +1,86 @@ +package com.adyen.model.nexo; + +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 the POI transaction. + * + *

Java class for POIData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="POIData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="POITransactionID" type="{}TransactionIdentification"/>
+ *       </sequence>
+ *       <attribute name="POIReconciliationID" type="{}POIReconciliationID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "POIData", propOrder = { + "poiTransactionID" +}) +public class POIData { + + /** + * The Poi transaction id. + */ + @XmlElement(name = "POITransactionID", required = true) + @Schema(description = "Unique identification of a POI transaction for a POI") + protected TransactionIdentification poiTransactionID; + /** + * The Poi reconciliation id. + */ + @XmlElement(name = "POIReconciliationID") + @Schema(description = "Identification of the reconciliation period between Sale and POI. --Rule: If Result is Success") + protected String poiReconciliationID; + + /** + * Gets the value of the poiTransactionID property. + * + * @return possible object is {@link TransactionIdentification } + */ + public TransactionIdentification getPOITransactionID() { + return poiTransactionID; + } + + /** + * Sets the value of the poiTransactionID property. + * + * @param value allowed object is {@link TransactionIdentification } + */ + public void setPOITransactionID(TransactionIdentification value) { + this.poiTransactionID = value; + } + + /** + * Gets the value of the poiReconciliationID property. + * + * @return possible object is {@link String } + */ + public String getPOIReconciliationID() { + return poiReconciliationID; + } + + /** + * Sets the value of the poiReconciliationID property. + * + * @param value allowed object is {@link String } + */ + public void setPOIReconciliationID(String value) { + this.poiReconciliationID = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/POIProfile.java b/src/main/java/com/adyen/model/nexo/POIProfile.java new file mode 100644 index 000000000..59998c6f5 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/POIProfile.java @@ -0,0 +1,105 @@ +package com.adyen.model.nexo; + +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.XmlList; +import javax.xml.bind.annotation.XmlType; +import java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Functional profile of the POI Terminal. -- Usage: Sent in the Login Response to identify the profiles the POI Terminal support during the session. The value of this data element contains: One of the generic profile: Basic, Standard or Extended, A list (possibly empty) of services + * + *

Java class for POIProfile complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="POIProfile">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ServiceProfiles" type="{}ServiceProfiles" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="GenericProfile" type="{}GenericProfileType" default="Standard" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "POIProfile", propOrder = { + "serviceProfiles" +}) +public class POIProfile { + + /** + * The Service profiles. + */ + @XmlList + @XmlElement(name = "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") + @Schema(description = "Functional profile of the Sale to POI protocol.") + protected GenericProfileType genericProfile; + + /** + * Gets the value of the serviceProfiles property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the serviceProfiles property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getServiceProfiles().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link ServiceProfilesType } + * + * @return the service profiles + */ + public List getServiceProfiles() { + if (serviceProfiles == null) { + serviceProfiles = new ArrayList<>(); + } + return this.serviceProfiles; + } + + /** + * Gets the value of the genericProfile property. + * + * @return possible object is {@link GenericProfileType } + */ + public GenericProfileType getGenericProfile() { + if (genericProfile == null) { + return GenericProfileType.STANDARD; + } else { + return genericProfile; + } + } + + /** + * Sets the value of the genericProfile property. + * + * @param value allowed object is {@link GenericProfileType } + */ + public void setGenericProfile(GenericProfileType value) { + this.genericProfile = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/POISoftware.java b/src/main/java/com/adyen/model/nexo/POISoftware.java new file mode 100644 index 000000000..e86facc3f --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/POISoftware.java @@ -0,0 +1,132 @@ +package com.adyen.model.nexo; + +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 protocol. -- Usage: Allows in a session to identify the product features of a POI System. + * + *

Java class for POISoftware complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="POISoftware">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="ManufacturerID" use="required" type="{}ManufacturerID" />
+ *       <attribute name="ApplicationName" use="required" type="{}ApplicationName" />
+ *       <attribute name="SoftwareVersion" use="required" type="{}SoftwareVersion" />
+ *       <attribute name="CertificationCode" use="required" type="{}CertificationCode" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "POISoftware") +public class POISoftware { + + /** + * The Manufacturer id. + */ + @XmlElement(name = "ManufacturerID", required = true) + @Schema(description = "Identification of the Manufacturer") + protected String manufacturerID; + /** + * The Application name. + */ + @XmlElement(name = "ApplicationName", required = true) + @Schema(description = "Name of the software product.") + protected String applicationName; + /** + * The Software version. + */ + @XmlElement(name = "SoftwareVersion", required = true) + @Schema(description = "Version of the software product") + protected String softwareVersion; + /** + * The Certification code. + */ + @XmlElement(name = "CertificationCode", required = true) + @Schema(description = "Certification code of the software which manages the Sale to POI protocol.") + protected String certificationCode; + + /** + * Gets the value of the manufacturerID property. + * + * @return possible object is {@link String } + */ + public String getManufacturerID() { + return manufacturerID; + } + + /** + * Sets the value of the manufacturerID property. + * + * @param value allowed object is {@link String } + */ + public void setManufacturerID(String value) { + this.manufacturerID = value; + } + + /** + * Gets the value of the applicationName property. + * + * @return possible object is {@link String } + */ + public String getApplicationName() { + return applicationName; + } + + /** + * Sets the value of the applicationName property. + * + * @param value allowed object is {@link String } + */ + public void setApplicationName(String value) { + this.applicationName = value; + } + + /** + * Gets the value of the softwareVersion property. + * + * @return possible object is {@link String } + */ + public String getSoftwareVersion() { + return softwareVersion; + } + + /** + * Sets the value of the softwareVersion property. + * + * @param value allowed object is {@link String } + */ + public void setSoftwareVersion(String value) { + this.softwareVersion = value; + } + + /** + * Gets the value of the certificationCode property. + * + * @return possible object is {@link String } + */ + public String getCertificationCode() { + return certificationCode; + } + + /** + * Sets the value of the certificationCode property. + * + * @param value allowed object is {@link String } + */ + public void setCertificationCode(String value) { + this.certificationCode = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/POIStatus.java b/src/main/java/com/adyen/model/nexo/POIStatus.java new file mode 100644 index 000000000..71557f90f --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/POIStatus.java @@ -0,0 +1,249 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: State of a POI Terminal. -- Usage: Indicate the availability of the POI Terminal components. The data element is absent if the component is not part of the POI Terminal. + * + *

Java class for POIStatus complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="POIStatus">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CashHandlingDevice" type="{}CashHandlingDevice" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="GlobalStatus" use="required" type="{}GlobalStatusType" />
+ *       <attribute name="SecurityOKFlag" type="{}SecurityOKFlag" />
+ *       <attribute name="PEDOKFlag" type="{}PEDOKFlag" />
+ *       <attribute name="CardReaderOKFlag" type="{}CardReaderOKFlag" />
+ *       <attribute name="PrinterStatus" type="{}PrinterStatusType" />
+ *       <attribute name="CommunicationOKFlag" type="{}CommunicationOKFlag" />
+ *       <attribute name="FraudPreventionFlag" type="{}FraudPreventionFlag" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "POIStatus", propOrder = { + "cashHandlingDevice" +}) +public class POIStatus { + + /** + * The Cash handling device. + */ + @XmlElement(name = "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) + @Schema(description = "Global status of a POI Server or POI Terminal.") + protected GlobalStatusType globalStatus; + /** + * The Security ok flag. + */ + @XmlElement(name = "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") + @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") + @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") + @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") + @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") + @Schema(description = "Indicate a suspicion of fraud by the POI System. --Rule: default False") + protected Boolean fraudPreventionFlag; + + /** + * Gets the value of the cashHandlingDevice property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the cashHandlingDevice property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getCashHandlingDevice().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link CashHandlingDevice } + * + * @return the cash handling device + */ + public List getCashHandlingDevice() { + if (cashHandlingDevice == null) { + cashHandlingDevice = new ArrayList<>(); + } + return this.cashHandlingDevice; + } + + /** + * Gets the value of the globalStatus property. + * + * @return possible object is {@link GlobalStatusType } + */ + public GlobalStatusType getGlobalStatus() { + return globalStatus; + } + + /** + * Sets the value of the globalStatus property. + * + * @param value allowed object is {@link GlobalStatusType } + */ + public void setGlobalStatus(GlobalStatusType value) { + this.globalStatus = value; + } + + /** + * Gets the value of the securityOKFlag property. + * + * @return possible object is {@link Boolean } + */ + public Boolean isSecurityOKFlag() { + return securityOKFlag; + } + + /** + * Sets the value of the securityOKFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setSecurityOKFlag(Boolean value) { + this.securityOKFlag = value; + } + + /** + * Gets the value of the pedokFlag property. + * + * @return possible object is {@link Boolean } + */ + public Boolean isPEDOKFlag() { + return pedokFlag; + } + + /** + * Sets the value of the pedokFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setPEDOKFlag(Boolean value) { + this.pedokFlag = value; + } + + /** + * Gets the value of the cardReaderOKFlag property. + * + * @return possible object is {@link Boolean } + */ + public Boolean isCardReaderOKFlag() { + return cardReaderOKFlag; + } + + /** + * Sets the value of the cardReaderOKFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setCardReaderOKFlag(Boolean value) { + this.cardReaderOKFlag = value; + } + + /** + * Gets the value of the printerStatus property. + * + * @return possible object is {@link PrinterStatusType } + */ + public PrinterStatusType getPrinterStatus() { + return printerStatus; + } + + /** + * Sets the value of the printerStatus property. + * + * @param value allowed object is {@link PrinterStatusType } + */ + public void setPrinterStatus(PrinterStatusType value) { + this.printerStatus = value; + } + + /** + * Gets the value of the communicationOKFlag property. + * + * @return possible object is {@link Boolean } + */ + public Boolean isCommunicationOKFlag() { + return communicationOKFlag; + } + + /** + * Sets the value of the communicationOKFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setCommunicationOKFlag(Boolean value) { + this.communicationOKFlag = value; + } + + /** + * Gets the value of the fraudPreventionFlag property. + * + * @return possible object is {@link Boolean } + */ + public Boolean isFraudPreventionFlag() { + return fraudPreventionFlag; + } + + /** + * Sets the value of the fraudPreventionFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setFraudPreventionFlag(Boolean value) { + this.fraudPreventionFlag = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/POISystemData.java b/src/main/java/com/adyen/model/nexo/POISystemData.java new file mode 100644 index 000000000..f8efd4e16 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/POISystemData.java @@ -0,0 +1,142 @@ +package com.adyen.model.nexo; + +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; + + +/** + * Definition: Information related to the POI System -- Usage: In the Login messageType response, the data structure contains information related to the POI System fixed for the session or defined as default value. + * + *

Java class for POISystemData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="POISystemData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DateTime" type="{}DateTime"/>
+ *         <element name="POISoftware" type="{}POISoftware"/>
+ *         <element name="POITerminalData" type="{}POITerminalData" minOccurs="0"/>
+ *         <element name="POIStatus" type="{}POIStatus" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "POISystemData", propOrder = { + "dateTime", + "poiSoftware", + "poiTerminalData", + "poiStatus" +}) +public class POISystemData { + + /** + * The Date time. + */ + @XmlElement(name = "DateTime", required = true) + @Schema(description = "Date and Time") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar dateTime; + /** + * The Poi software. + */ + @XmlElement(name = "POISoftware", required = true) + @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") + @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") + @Schema(description = "State of a POI Terminal. --Rule: if Response.Result is Success") + protected POIStatus poiStatus; + + /** + * Gets the value of the dateTime property. + * + * @return possible object is {@link XMLGregorianCalendar } + */ + public XMLGregorianCalendar getDateTime() { + return dateTime; + } + + /** + * Sets the value of the dateTime property. + * + * @param value allowed object is {@link XMLGregorianCalendar } + */ + public void setDateTime(XMLGregorianCalendar value) { + this.dateTime = value; + } + + /** + * Gets the value of the poiSoftware property. + * + * @return possible object is {@link POISoftware } + */ + public POISoftware getPOISoftware() { + return poiSoftware; + } + + /** + * Sets the value of the poiSoftware property. + * + * @param value allowed object is {@link POISoftware } + */ + public void setPOISoftware(POISoftware value) { + this.poiSoftware = value; + } + + /** + * Gets the value of the poiTerminalData property. + * + * @return possible object is {@link POITerminalData } + */ + public POITerminalData getPOITerminalData() { + return poiTerminalData; + } + + /** + * Sets the value of the poiTerminalData property. + * + * @param value allowed object is {@link POITerminalData } + */ + public void setPOITerminalData(POITerminalData value) { + this.poiTerminalData = value; + } + + /** + * Gets the value of the poiStatus property. + * + * @return possible object is {@link POIStatus } + */ + public POIStatus getPOIStatus() { + return poiStatus; + } + + /** + * Sets the value of the poiStatus property. + * + * @param value allowed object is {@link POIStatus } + */ + public void setPOIStatus(POIStatus value) { + this.poiStatus = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/POITerminalData.java b/src/main/java/com/adyen/model/nexo/POITerminalData.java new file mode 100644 index 000000000..3c0ca1062 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/POITerminalData.java @@ -0,0 +1,159 @@ +package com.adyen.model.nexo; + +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.XmlList; +import javax.xml.bind.annotation.XmlType; +import java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Information related to the software and hardware feature of the POI Terminal -- Usage: Allows in a session to identify the features of the POI Terminal attached to a Sale Terminal per a Login Request messageType. + * + *

Java class for POITerminalData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="POITerminalData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="POICapabilities" type="{}POICapabilities"/>
+ *         <element name="POIProfile" type="{}POIProfile" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="TerminalEnvironment" use="required" type="{}TerminalEnvironmentType" />
+ *       <attribute name="POISerialNumber" use="required" type="{}POISerialNumber" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "POITerminalData", propOrder = { + "poiCapabilities", + "poiProfile" +}) +public class POITerminalData { + + /** + * The Poi capabilities. + */ + @XmlList + @XmlElement(name = "POICapabilities", required = true) + @Schema(description = "Hardware capabilities of the POI Terminal.") + protected List poiCapabilities; + /** + * The Poi profile. + */ + @XmlElement(name = "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) + @Schema(description = "Environment of the Terminal.") + protected TerminalEnvironmentType terminalEnvironment; + /** + * The Poi serial number. + */ + @XmlElement(name = "POISerialNumber", required = true) + @Schema(description = "Serial number of a POI Terminal") + protected String poiSerialNumber; + + /** + * Gets the value of the poiCapabilities property. + *

+ *

+ *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the poiCapabilities property. + *

+ *

+ *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getPOICapabilities().add(newItem);
+     * 
+ *

+ *

+ *

+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link POICapabilitiesType } + * + * @return the poi capabilities + */ + public List getPOICapabilities() { + if (poiCapabilities == null) { + poiCapabilities = new ArrayList<>(); + } + return this.poiCapabilities; + } + + /** + * Gets the value of the poiProfile property. + * + * @return possible object is {@link POIProfile } + */ + public POIProfile getPOIProfile() { + return poiProfile; + } + + /** + * Sets the value of the poiProfile property. + * + * @param value allowed object is {@link POIProfile } + */ + public void setPOIProfile(POIProfile value) { + this.poiProfile = value; + } + + /** + * Gets the value of the terminalEnvironment property. + * + * @return possible object is {@link TerminalEnvironmentType } + */ + public TerminalEnvironmentType getTerminalEnvironment() { + return terminalEnvironment; + } + + /** + * Sets the value of the terminalEnvironment property. + * + * @param value allowed object is {@link TerminalEnvironmentType } + */ + public void setTerminalEnvironment(TerminalEnvironmentType value) { + this.terminalEnvironment = value; + } + + /** + * Gets the value of the poiSerialNumber property. + * + * @return possible object is {@link String } + */ + public String getPOISerialNumber() { + return poiSerialNumber; + } + + /** + * Sets the value of the poiSerialNumber property. + * + * @param value allowed object is {@link String } + */ + public void setPOISerialNumber(String value) { + this.poiSerialNumber = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/Parameter.java b/src/main/java/com/adyen/model/nexo/Parameter.java new file mode 100644 index 000000000..2f30a245c --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/Parameter.java @@ -0,0 +1,54 @@ +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; + + +/** + * Definition: Parameters associated to a cryptographic algorithm -- Reference: RFC 3880: Internet X.509 Public Key Infrastructure Certificate and Certificate + * + *

Java class for Parameter complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Parameter">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="InitialisationVector" type="{}InitialisationVector" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Parameter") +public class Parameter { + + /** + * The Initialisation vector. + */ + @XmlElement(name = "InitialisationVector") + protected byte[] initialisationVector; + + /** + * Gets the value of the initialisationVector property. + * + * @return possible object is byte[] + */ + public byte[] getInitialisationVector() { + return initialisationVector; + } + + /** + * Sets the value of the initialisationVector property. + * + * @param value allowed object is byte[] + */ + public void setInitialisationVector(byte[] value) { + this.initialisationVector = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PaymentAccountReq.java b/src/main/java/com/adyen/model/nexo/PaymentAccountReq.java new file mode 100644 index 000000000..2594c2dd5 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PaymentAccountReq.java @@ -0,0 +1,116 @@ +package com.adyen.model.nexo; + +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 provided by the Sale System related to the payment account requesting a balance. + * + *

Java class for PaymentAccountReq complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PaymentAccountReq">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CardAcquisitionReference" type="{}TransactionIdentification" minOccurs="0"/>
+ *         <element name="PaymentInstrumentData" type="{}PaymentInstrumentData" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Account" type="{}AccountType" default="Default" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PaymentAccountReq", propOrder = { + "cardAcquisitionReference", + "paymentInstrumentData" +}) +public class PaymentAccountReq { + + /** + * The Card acquisition reference. + */ + @XmlElement(name = "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") + @Schema(description = "Data related to the instrument of payment for the transaction.") + protected PaymentInstrumentData paymentInstrumentData; + /** + * The Account. + */ + @XmlElement(name = "AccountType") + @Schema(description = "Type of cardholder account used for the transaction") + protected AccountType accountType; + + /** + * Gets the value of the cardAcquisitionReference property. + * + * @return possible object is {@link TransactionIdentification } + */ + public TransactionIdentification getCardAcquisitionReference() { + return cardAcquisitionReference; + } + + /** + * Sets the value of the cardAcquisitionReference property. + * + * @param value allowed object is {@link TransactionIdentification } + */ + public void setCardAcquisitionReference(TransactionIdentification value) { + this.cardAcquisitionReference = value; + } + + /** + * Gets the value of the paymentInstrumentData property. + * + * @return possible object is {@link PaymentInstrumentData } + */ + public PaymentInstrumentData getPaymentInstrumentData() { + return paymentInstrumentData; + } + + /** + * Sets the value of the paymentInstrumentData property. + * + * @param value allowed object is {@link PaymentInstrumentData } + */ + public void setPaymentInstrumentData(PaymentInstrumentData value) { + this.paymentInstrumentData = value; + } + + /** + * Gets the value of the AccountType property. + * + * @return possible object is {@link AccountType } + */ + public AccountType getAccountType() { + if (accountType == null) { + return AccountType.DEFAULT; + } else { + return accountType; + } + } + + /** + * Sets the value of the AccountType property. + * + * @param value allowed object is {@link AccountType } + */ + public void setAccountType(AccountType value) { + this.accountType = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PaymentAccountStatus.java b/src/main/java/com/adyen/model/nexo/PaymentAccountStatus.java new file mode 100644 index 000000000..819328563 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PaymentAccountStatus.java @@ -0,0 +1,164 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; + + +/** + * Definition: Data related to the result of a Balance Inquiry request. + * + *

Java class for PaymentAccountStatus complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PaymentAccountStatus">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="PaymentInstrumentData" type="{}PaymentInstrumentData" minOccurs="0"/>
+ *         <element name="PaymentAcquirerData" type="{}PaymentAcquirerData" minOccurs="0"/>
+ *         <element name="LoyaltyAccountStatus" type="{}LoyaltyAccountStatus" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Currency" type="{}ISOCurrency3A" />
+ *       <attribute name="CurrentBalance" type="{}SimpleAmountType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PaymentAccountStatus", propOrder = { + "paymentInstrumentData", + "paymentAcquirerData", + "loyaltyAccountStatus" +}) +public class PaymentAccountStatus { + + /** + * The Payment instrument data. + */ + @XmlElement(name = "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") + @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") + @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") + @Schema(description = "Currency of a monetary amount. --Rule: If PaymentInstrumentData present and Result is Success") + protected String currency; + /** + * The Current balance. + */ + @XmlElement(name = "CurrentBalance") + @Schema(description = "Balance of an account. --Rule: If PaymentInstrumentData present and Result is Success") + protected BigDecimal currentBalance; + + /** + * Gets the value of the paymentInstrumentData property. + * + * @return possible object is {@link PaymentInstrumentData } + */ + public PaymentInstrumentData getPaymentInstrumentData() { + return paymentInstrumentData; + } + + /** + * Sets the value of the paymentInstrumentData property. + * + * @param value allowed object is {@link PaymentInstrumentData } + */ + public void setPaymentInstrumentData(PaymentInstrumentData value) { + this.paymentInstrumentData = value; + } + + /** + * Gets the value of the paymentAcquirerData property. + * + * @return possible object is {@link PaymentAcquirerData } + */ + public PaymentAcquirerData getPaymentAcquirerData() { + return paymentAcquirerData; + } + + /** + * Sets the value of the paymentAcquirerData property. + * + * @param value allowed object is {@link PaymentAcquirerData } + */ + public void setPaymentAcquirerData(PaymentAcquirerData value) { + this.paymentAcquirerData = value; + } + + /** + * Gets the value of the loyaltyAccountStatus property. + * + * @return possible object is {@link LoyaltyAccountStatus } + */ + public LoyaltyAccountStatus getLoyaltyAccountStatus() { + return loyaltyAccountStatus; + } + + /** + * Sets the value of the loyaltyAccountStatus property. + * + * @param value allowed object is {@link LoyaltyAccountStatus } + */ + public void setLoyaltyAccountStatus(LoyaltyAccountStatus value) { + this.loyaltyAccountStatus = value; + } + + /** + * Gets the value of the currency property. + * + * @return possible object is {@link String } + */ + public String getCurrency() { + return currency; + } + + /** + * Sets the value of the currency property. + * + * @param value allowed object is {@link String } + */ + public void setCurrency(String value) { + this.currency = value; + } + + /** + * Gets the value of the currentBalance property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getCurrentBalance() { + return currentBalance; + } + + /** + * Sets the value of the currentBalance property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setCurrentBalance(BigDecimal value) { + this.currentBalance = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PaymentAcquirerData.java b/src/main/java/com/adyen/model/nexo/PaymentAcquirerData.java new file mode 100644 index 000000000..e47a504e9 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PaymentAcquirerData.java @@ -0,0 +1,162 @@ +package com.adyen.model.nexo; + +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. + * + *

Java class for PaymentAcquirerData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PaymentAcquirerData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="AcquirerTransactionID" type="{}TransactionIdentification" minOccurs="0"/>
+ *         <element name="ApprovalCode" type="{}ApprovalCode" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="AcquirerID" type="{}AcquirerID" />
+ *       <attribute name="MerchantID" use="required" type="{}MerchantID" />
+ *       <attribute name="AcquirerPOIID" use="required" type="{}AcquirerPOIID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PaymentAcquirerData", propOrder = { + "acquirerTransactionID", + "approvalCode" +}) +public class PaymentAcquirerData { + + /** + * The Acquirer transaction id. + */ + @XmlElement(name = "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") + @Schema(description = "Code assigned to a transaction approval by the Acquirer. --Rule: If available") + protected String approvalCode; + /** + * The Acquirer id. + */ + @XmlElement(name = "AcquirerID") + @Schema(description = "Identification of the Acquirer --Rule: If several Acquirers") + protected String acquirerID; + /** + * The Merchant id. + */ + @XmlElement(name = "MerchantID", required = true) + @Schema(description = "Identification of the Merchant for the Acquirer") + protected String merchantID; + /** + * The Acquirer poiid. + */ + @XmlElement(name = "AcquirerPOIID", required = true) + @Schema(description = "Identification of the POI for the payment Acquirer") + protected String acquirerPOIID; + + /** + * Gets the value of the acquirerTransactionID property. + * + * @return possible object is {@link TransactionIdentification } + */ + public TransactionIdentification getAcquirerTransactionID() { + return acquirerTransactionID; + } + + /** + * Sets the value of the acquirerTransactionID property. + * + * @param value allowed object is {@link TransactionIdentification } + */ + public void setAcquirerTransactionID(TransactionIdentification value) { + this.acquirerTransactionID = value; + } + + /** + * Gets the value of the approvalCode property. + * + * @return possible object is {@link String } + */ + public String getApprovalCode() { + return approvalCode; + } + + /** + * Sets the value of the approvalCode property. + * + * @param value allowed object is {@link String } + */ + public void setApprovalCode(String value) { + this.approvalCode = value; + } + + /** + * Gets the value of the acquirerID property. + * + * @return possible object is {@link String } + */ + public String getAcquirerID() { + return acquirerID; + } + + /** + * Sets the value of the acquirerID property. + * + * @param value allowed object is {@link String } + */ + public void setAcquirerID(String value) { + this.acquirerID = value; + } + + /** + * Gets the value of the merchantID property. + * + * @return possible object is {@link String } + */ + public String getMerchantID() { + return merchantID; + } + + /** + * Sets the value of the merchantID property. + * + * @param value allowed object is {@link String } + */ + public void setMerchantID(String value) { + this.merchantID = value; + } + + /** + * Gets the value of the acquirerPOIID property. + * + * @return possible object is {@link String } + */ + public String getAcquirerPOIID() { + return acquirerPOIID; + } + + /** + * Sets the value of the acquirerPOIID property. + * + * @param value allowed object is {@link String } + */ + public void setAcquirerPOIID(String value) { + this.acquirerPOIID = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PaymentData.java b/src/main/java/com/adyen/model/nexo/PaymentData.java new file mode 100644 index 000000000..4f874aba6 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PaymentData.java @@ -0,0 +1,223 @@ +package com.adyen.model.nexo; + +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 System that are related to the payment only. + * + *

Java class for PaymentData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PaymentData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CardAcquisitionReference" type="{}TransactionIdentification" minOccurs="0"/>
+ *         <element name="RequestedValidityDate" type="{}ISODate" minOccurs="0"/>
+ *         <element name="Instalment" type="{}Instalment" minOccurs="0"/>
+ *         <element name="CustomerOrder" type="{}CustomerOrder" minOccurs="0"/>
+ *         <element name="PaymentInstrumentData" type="{}PaymentInstrumentData" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Payment" type="{}PaymentType" default="Normal" />
+ *       <attribute name="SplitPaymentFlag" type="{}SplitPaymentFlag" default="false" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PaymentData", propOrder = { + "cardAcquisitionReference", + "requestedValidityDate", + "instalment", + "customerOrder", + "paymentInstrumentData" +}) +public class PaymentData { + + /** + * The Card acquisition reference. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "Information related an instalment transaction. --Rule: If PaymentType is \"Instalment\" or \"IssuerInstalment\"") + protected Instalment instalment; + /** + * The Customer order. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "Type of payment transaction.") + protected PaymentType paymentType; + /** + * The Split payment flag. + */ + @XmlElement(name = "SplitPaymentFlag") + @Schema(description = "Indicates if the payment of the Sale transaction is split.") + protected Boolean splitPaymentFlag; + + /** + * Gets the value of the cardAcquisitionReference property. + * + * @return possible object is {@link TransactionIdentification } + */ + public TransactionIdentification getCardAcquisitionReference() { + return cardAcquisitionReference; + } + + /** + * Sets the value of the cardAcquisitionReference property. + * + * @param value allowed object is {@link TransactionIdentification } + */ + public void setCardAcquisitionReference(TransactionIdentification value) { + this.cardAcquisitionReference = value; + } + + /** + * Gets the value of the requestedValidityDate property. + * + * @return possible object is {@link String } + */ + public String getRequestedValidityDate() { + return requestedValidityDate; + } + + /** + * Sets the value of the requestedValidityDate property. + * + * @param value allowed object is {@link String } + */ + public void setRequestedValidityDate(String value) { + this.requestedValidityDate = value; + } + + /** + * Gets the value of the instalment property. + * + * @return possible object is {@link Instalment } + */ + public Instalment getInstalment() { + return instalment; + } + + /** + * Sets the value of the instalment property. + * + * @param value allowed object is {@link Instalment } + */ + public void setInstalment(Instalment value) { + this.instalment = value; + } + + /** + * Gets the value of the customerOrder property. + * + * @return possible object is {@link CustomerOrder } + */ + public CustomerOrder getCustomerOrder() { + return customerOrder; + } + + /** + * Sets the value of the customerOrder property. + * + * @param value allowed object is {@link CustomerOrder } + */ + public void setCustomerOrder(CustomerOrder value) { + this.customerOrder = value; + } + + /** + * Gets the value of the paymentInstrumentData property. + * + * @return possible object is {@link PaymentInstrumentData } + */ + public PaymentInstrumentData getPaymentInstrumentData() { + return paymentInstrumentData; + } + + /** + * Sets the value of the paymentInstrumentData property. + * + * @param value allowed object is {@link PaymentInstrumentData } + */ + public void setPaymentInstrumentData(PaymentInstrumentData value) { + this.paymentInstrumentData = value; + } + + /** + * Gets the value of the PaymentType property. + * + * @return possible object is {@link PaymentType } + */ + public PaymentType getPaymentType() { + if (paymentType == null) { + return PaymentType.NORMAL; + } else { + return paymentType; + } + } + + /** + * Sets the value of the PaymentType property. + * + * @param value allowed object is {@link PaymentType } + */ + public void setPaymentType(PaymentType value) { + this.paymentType = value; + } + + /** + * Gets the value of the splitPaymentFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isSplitPaymentFlag() { + if (splitPaymentFlag == null) { + return false; + } else { + return splitPaymentFlag; + } + } + + /** + * Sets the value of the splitPaymentFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setSplitPaymentFlag(Boolean value) { + this.splitPaymentFlag = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PaymentInstrumentData.java b/src/main/java/com/adyen/model/nexo/PaymentInstrumentData.java new file mode 100644 index 000000000..a91aba088 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PaymentInstrumentData.java @@ -0,0 +1,183 @@ +package com.adyen.model.nexo; + +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 result of the payment transaction. For a card, it could also be sent in the CardAcquisition response, to be processed by the Sale System. In this case, the card or type of card has to be configured to have this behaviour. It is + * + *

Java class for PaymentInstrumentData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PaymentInstrumentData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CardData" type="{}CardData" minOccurs="0"/>
+ *         <element name="CheckData" type="{}CheckData" minOccurs="0"/>
+ *         <element name="MobileData" type="{}MobileData" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="PaymentInstrument" use="required" type="{}PaymentInstrumentType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PaymentInstrumentData", propOrder = { + "cardData", + "checkData", + "mobileData" +}) +public class PaymentInstrumentData { + + /** + * The Card data. + */ + @XmlElement(name = "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") + @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") + @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) + @Schema(description = "Type of payment instrument.") + protected PaymentInstrumentType paymentInstrumentType; + /** + * The Stored value account id. + */ + @XmlElement(name = "StoredValueAccountID") + protected StoredValueAccountID storedValueAccountID; + /** + * The Protected card data. + */ + @XmlElement(name = "ProtectedCardData") + protected String protectedCardData; + + /** + * Gets the value of the cardData property. + * + * @return possible object is {@link CardData } + */ + public CardData getCardData() { + return cardData; + } + + /** + * Sets the value of the cardData property. + * + * @param value allowed object is {@link CardData } + */ + public void setCardData(CardData value) { + this.cardData = value; + } + + /** + * Gets the value of the checkData property. + * + * @return possible object is {@link CheckData } + */ + public CheckData getCheckData() { + return checkData; + } + + /** + * Sets the value of the checkData property. + * + * @param value allowed object is {@link CheckData } + */ + public void setCheckData(CheckData value) { + this.checkData = value; + } + + /** + * Gets the value of the mobileData property. + * + * @return possible object is {@link MobileData } + */ + public MobileData getMobileData() { + return mobileData; + } + + /** + * Sets the value of the mobileData property. + * + * @param value allowed object is {@link MobileData } + */ + public void setMobileData(MobileData value) { + this.mobileData = value; + } + + /** + * Gets the value of the paymentInstrumentType property. + * + * @return possible object is {@link PaymentInstrumentType } + */ + public PaymentInstrumentType getPaymentInstrumentType() { + return paymentInstrumentType; + } + + /** + * Sets the value of the paymentInstrumentType property. + * + * @param value allowed object is {@link PaymentInstrumentType } + */ + public void setPaymentInstrumentType(PaymentInstrumentType value) { + this.paymentInstrumentType = value; + } + + /** + * Gets the value of the storedValueAccountID property. + * + * @return possible object is {@link StoredValueAccountID } + */ + public StoredValueAccountID getStoredValueAccountID() { + return storedValueAccountID; + } + + /** + * Sets the value of the storedValueAccountID property. + * + * @param value allowed object is {@link StoredValueAccountID } + */ + public void setStoredValueAccountID(StoredValueAccountID value) { + this.storedValueAccountID = value; + } + + /** + * Gets the value of the protectedCardData property. + * + * @return possible object is {@link String } + */ + public String getProtectedCardData() { + return protectedCardData; + } + + /** + * Sets the value of the protectedCardData property. + * + * @param value allowed object is {@link String } + */ + public void setProtectedCardData(String value) { + this.protectedCardData = value; + } +} diff --git a/src/main/java/com/adyen/model/nexo/PaymentInstrumentType.java b/src/main/java/com/adyen/model/nexo/PaymentInstrumentType.java new file mode 100644 index 000000000..8828da115 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PaymentInstrumentType.java @@ -0,0 +1,94 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for PaymentInstrumentType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="PaymentInstrumentType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Card"/>
+ *     <enumeration value="Check"/>
+ *     <enumeration value="Mobile"/>
+ *     <enumeration value="StoredValue"/>
+ *     <enumeration value="Cash"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "PaymentInstrumentType") +@XmlEnum +public enum PaymentInstrumentType { + + + /** + * Payment card (credit or debit). + */ + @XmlEnumValue("Card") + @Schema(description = "Payment card (credit or debit).") + CARD("Card"), + + /** + * Paper check. + */ + @XmlEnumValue("Check") + @Schema(description = "Paper check.") + CHECK("Check"), + + /** + * Operator account accessed by a mobile phone. + */ + @XmlEnumValue("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") + @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") + @Schema(description = "Cash managed by a cash handling system.") + CASH("Cash"); + private final String value; + + PaymentInstrumentType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value payment instrument type. + * + * @param v the v + * @return the payment instrument type + */ + public static PaymentInstrumentType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PaymentReceipt.java b/src/main/java/com/adyen/model/nexo/PaymentReceipt.java new file mode 100644 index 000000000..d1412d5e7 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PaymentReceipt.java @@ -0,0 +1,144 @@ +package com.adyen.model.nexo; + +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 by the Sale system and the POI or the Sale does not implement the Print exchange (Basic profile). + * + *

Java class for PaymentReceipt complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PaymentReceipt">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="OutputContent" type="{}OutputContent"/>
+ *       </sequence>
+ *       <attribute name="DocumentQualifier" use="required" type="{}DocumentQualifierType" />
+ *       <attribute name="IntegratedPrintFlag" type="{}IntegratedPrintFlag" default="false" />
+ *       <attribute name="RequiredSignatureFlag" type="{}RequiredSignatureFlag" default="false" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PaymentReceipt", propOrder = { + "outputContent" +}) +public class PaymentReceipt { + + /** + * The Output content. + */ + @XmlElement(name = "OutputContent", required = true) + @Schema(description = "Content to display or print.") + protected OutputContent outputContent; + /** + * The Document qualifier. + */ + @XmlElement(name = "DocumentQualifier", required = true) + @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") + @Schema(description = "Type of the print integrated to other prints.") + protected Boolean integratedPrintFlag; + /** + * The Required signature flag. + */ + @XmlElement(name = "RequiredSignatureFlag") + @Schema(description = "Indicate that the cardholder payment receipt requires a physical signature by the Customer.") + protected Boolean requiredSignatureFlag; + + /** + * Gets the value of the outputContent property. + * + * @return possible object is {@link OutputContent } + */ + public OutputContent getOutputContent() { + return outputContent; + } + + /** + * Sets the value of the outputContent property. + * + * @param value allowed object is {@link OutputContent } + */ + public void setOutputContent(OutputContent value) { + this.outputContent = value; + } + + /** + * Gets the value of the documentQualifier property. + * + * @return possible object is {@link DocumentQualifierType } + */ + public DocumentQualifierType getDocumentQualifier() { + return documentQualifier; + } + + /** + * Sets the value of the documentQualifier property. + * + * @param value allowed object is {@link DocumentQualifierType } + */ + public void setDocumentQualifier(DocumentQualifierType value) { + this.documentQualifier = value; + } + + /** + * Gets the value of the integratedPrintFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isIntegratedPrintFlag() { + if (integratedPrintFlag == null) { + return false; + } else { + return integratedPrintFlag; + } + } + + /** + * Sets the value of the integratedPrintFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setIntegratedPrintFlag(Boolean value) { + this.integratedPrintFlag = value; + } + + /** + * Gets the value of the requiredSignatureFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isRequiredSignatureFlag() { + if (requiredSignatureFlag == null) { + return false; + } else { + return requiredSignatureFlag; + } + } + + /** + * Sets the value of the requiredSignatureFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setRequiredSignatureFlag(Boolean value) { + this.requiredSignatureFlag = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PaymentRequest.java b/src/main/java/com/adyen/model/nexo/PaymentRequest.java new file mode 100644 index 000000000..04091ac07 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PaymentRequest.java @@ -0,0 +1,152 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Payment Request messageType. -- Usage: It conveys Information related to the Payment transaction to process + * + *

Java class for PaymentRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PaymentRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SaleData" type="{}SaleData"/>
+ *         <element name="PaymentTransaction" type="{}PaymentTransaction"/>
+ *         <element name="PaymentData" type="{}PaymentData" minOccurs="0"/>
+ *         <element name="LoyaltyData" type="{}LoyaltyData" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PaymentRequest", propOrder = { + "saleData", + "paymentTransaction", + "paymentData", + "loyaltyData" +}) +public class PaymentRequest { + + /** + * The Sale data. + */ + @XmlElement(name = "SaleData", required = true) + @Schema(description = "Data related to the Sale System.") + protected SaleData saleData; + /** + * The Payment transaction. + */ + @XmlElement(name = "PaymentTransaction", required = true) + @Schema(description = "Data related to the payment and loyalty transaction.") + protected PaymentTransaction paymentTransaction; + /** + * The Payment data. + */ + @XmlElement(name = "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") + @Schema(description = "Data related to a Loyalty program or account. --Rule: Loyalty cards used with the payment transaction and read by the Sale System") + protected List loyaltyData; + + /** + * Gets the value of the saleData property. + * + * @return possible object is {@link SaleData } + */ + public SaleData getSaleData() { + return saleData; + } + + /** + * Sets the value of the saleData property. + * + * @param value allowed object is {@link SaleData } + */ + public void setSaleData(SaleData value) { + this.saleData = value; + } + + /** + * Gets the value of the paymentTransaction property. + * + * @return possible object is {@link PaymentTransaction } + */ + public PaymentTransaction getPaymentTransaction() { + return paymentTransaction; + } + + /** + * Sets the value of the paymentTransaction property. + * + * @param value allowed object is {@link PaymentTransaction } + */ + public void setPaymentTransaction(PaymentTransaction value) { + this.paymentTransaction = value; + } + + /** + * Gets the value of the paymentData property. + * + * @return possible object is {@link PaymentData } + */ + public PaymentData getPaymentData() { + return paymentData; + } + + /** + * Sets the value of the paymentData property. + * + * @param value allowed object is {@link PaymentData } + */ + public void setPaymentData(PaymentData value) { + this.paymentData = value; + } + + /** + * Gets the value of the loyaltyData property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the loyaltyData property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getLoyaltyData().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link LoyaltyData } + * + * @return the loyalty data + */ + public List getLoyaltyData() { + if (loyaltyData == null) { + loyaltyData = new ArrayList<>(); + } + return this.loyaltyData; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PaymentResponse.java b/src/main/java/com/adyen/model/nexo/PaymentResponse.java new file mode 100644 index 000000000..374ce4534 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PaymentResponse.java @@ -0,0 +1,252 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Payment Response messageType. -- Usage: It conveys Information related to the Payment transaction processed by the POI System + * + *

Java class for PaymentResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PaymentResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="SaleData" type="{}SaleData"/>
+ *         <element name="POIData" type="{}POIData"/>
+ *         <element name="PaymentResult" type="{}PaymentResult" minOccurs="0"/>
+ *         <element name="LoyaltyResult" type="{}LoyaltyResult" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="PaymentReceipt" type="{}PaymentReceipt" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="CustomerOrder" type="{}CustomerOrder" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </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) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Sale data. + */ + @XmlElement(name = "SaleData", required = true) + @Schema(description = "Data related to the Sale System. --Rule: Copy") + protected SaleData saleData; + /** + * The Poi data. + */ + @XmlElement(name = "POIData", required = true) + @Schema(description = "Data related to the POI System.") + protected POIData poiData; + /** + * The Payment result. + */ + @XmlElement(name = "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") + @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") + @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") + @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; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the saleData property. + * + * @return possible object is {@link SaleData } + */ + public SaleData getSaleData() { + return saleData; + } + + /** + * Sets the value of the saleData property. + * + * @param value allowed object is {@link SaleData } + */ + public void setSaleData(SaleData value) { + this.saleData = value; + } + + /** + * Gets the value of the poiData property. + * + * @return possible object is {@link POIData } + */ + public POIData getPOIData() { + return poiData; + } + + /** + * Sets the value of the poiData property. + * + * @param value allowed object is {@link POIData } + */ + public void setPOIData(POIData value) { + this.poiData = value; + } + + /** + * Gets the value of the paymentResult property. + * + * @return possible object is {@link PaymentResult } + */ + public PaymentResult getPaymentResult() { + return paymentResult; + } + + /** + * Sets the value of the paymentResult property. + * + * @param value allowed object is {@link PaymentResult } + */ + public void setPaymentResult(PaymentResult value) { + this.paymentResult = value; + } + + /** + * Gets the value of the loyaltyResult property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the loyaltyResult property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getLoyaltyResult().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link LoyaltyResult } + * + * @return the loyalty result + */ + public List getLoyaltyResult() { + if (loyaltyResult == null) { + loyaltyResult = new ArrayList<>(); + } + return this.loyaltyResult; + } + + /** + * Gets the value of the paymentReceipt property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the paymentReceipt property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getPaymentReceipt().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link PaymentReceipt } + * + * @return the payment receipt + */ + public List getPaymentReceipt() { + if (paymentReceipt == null) { + paymentReceipt = new ArrayList<>(); + } + return this.paymentReceipt; + } + + /** + * Gets the value of the customerOrder property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the customerOrder property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getCustomerOrder().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link CustomerOrder } + * + * @return the customer order + */ + public List getCustomerOrder() { + if (customerOrder == null) { + customerOrder = new ArrayList<>(); + } + return this.customerOrder; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PaymentResult.java b/src/main/java/com/adyen/model/nexo/PaymentResult.java new file mode 100644 index 000000000..297c8c52b --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PaymentResult.java @@ -0,0 +1,403 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Data related to the result of a processed payment transaction. -- Usage: In the Message Response, the result of card payment transaction. + * + *

Java class for PaymentResult complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PaymentResult">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="PaymentInstrumentData" type="{}PaymentInstrumentData" minOccurs="0"/>
+ *         <element name="AmountsResp" type="{}AmountsResp" minOccurs="0"/>
+ *         <element name="Instalment" type="{}Instalment" minOccurs="0"/>
+ *         <element name="CurrencyConversion" type="{}CurrencyConversion" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="CapturedSignature" type="{}CapturedSignature" minOccurs="0"/>
+ *         <element name="ProtectedSignature" type="{}ContentInformation" minOccurs="0"/>
+ *         <element name="PaymentAcquirerData" type="{}PaymentAcquirerData" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Payment" type="{}PaymentType" default="Normal" />
+ *       <attribute name="MerchantOverrideFlag" type="{}MerchantOverrideFlag" default="false" />
+ *       <attribute name="CustomerLanguage" type="{}ISOLanguage2A" />
+ *       <attribute name="OnlineFlag" type="{}OnlineFlag" default="true" />
+ *       <attribute name="AuthenticationMethod" type="{}AuthenticationMethod" />
+ *       <attribute name="ValidityDate" type="{}ISODate" />
+ *     </restriction>
+ *   </complexContent>
+ * </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") + @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") + @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") + @Schema(description = "Information related an instalment transaction. --Rule: Absent if PaymentType is not \"IssuerInstalment\"") + protected Instalment instalment; + /** + * The Currency conversion. + */ + @XmlElement(name = "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") + @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") + @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") + @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") + @Schema(description = "Type of payment transaction. --Rule: Copy") + protected PaymentType paymentType; + /** + * The Merchant override flag. + */ + @XmlElement(name = "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") + @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") + @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") + @Schema(description = "Method for customer authentication. --Rule: Method for customer authentication.") + protected List authenticationMethod; + /** + * The Validity date. + */ + @XmlElement(name = "ValidityDate") + @Schema(description = "End of the validity period for the reservation. --Rule: if OneTimeReservation, FirstReservation or UpdateReservation") + protected String validityDate; + + /** + * Gets the value of the paymentInstrumentData property. + * + * @return possible object is {@link PaymentInstrumentData } + */ + public PaymentInstrumentData getPaymentInstrumentData() { + return paymentInstrumentData; + } + + /** + * Sets the value of the paymentInstrumentData property. + * + * @param value allowed object is {@link PaymentInstrumentData } + */ + public void setPaymentInstrumentData(PaymentInstrumentData value) { + this.paymentInstrumentData = value; + } + + /** + * Gets the value of the amountsResp property. + * + * @return possible object is {@link AmountsResp } + */ + public AmountsResp getAmountsResp() { + return amountsResp; + } + + /** + * Sets the value of the amountsResp property. + * + * @param value allowed object is {@link AmountsResp } + */ + public void setAmountsResp(AmountsResp value) { + this.amountsResp = value; + } + + /** + * Gets the value of the instalment property. + * + * @return possible object is {@link Instalment } + */ + public Instalment getInstalment() { + return instalment; + } + + /** + * Sets the value of the instalment property. + * + * @param value allowed object is {@link Instalment } + */ + public void setInstalment(Instalment value) { + this.instalment = value; + } + + /** + * Gets the value of the currencyConversion property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the currencyConversion property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getCurrencyConversion().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link CurrencyConversion } + * + * @return the currency conversion + */ + public List getCurrencyConversion() { + if (currencyConversion == null) { + currencyConversion = new ArrayList<>(); + } + return this.currencyConversion; + } + + /** + * Gets the value of the capturedSignature property. + * + * @return possible object is {@link CapturedSignature } + */ + public CapturedSignature getCapturedSignature() { + return capturedSignature; + } + + /** + * Sets the value of the capturedSignature property. + * + * @param value allowed object is {@link CapturedSignature } + */ + public void setCapturedSignature(CapturedSignature value) { + this.capturedSignature = value; + } + + /** + * Gets the value of the protectedSignature property. + * + * @return possible object is {@link ContentInformation } + */ + public ContentInformation getProtectedSignature() { + return protectedSignature; + } + + /** + * Sets the value of the protectedSignature property. + * + * @param value allowed object is {@link ContentInformation } + */ + public void setProtectedSignature(ContentInformation value) { + this.protectedSignature = value; + } + + /** + * Gets the value of the paymentAcquirerData property. + * + * @return possible object is {@link PaymentAcquirerData } + */ + public PaymentAcquirerData getPaymentAcquirerData() { + return paymentAcquirerData; + } + + /** + * Sets the value of the paymentAcquirerData property. + * + * @param value allowed object is {@link PaymentAcquirerData } + */ + public void setPaymentAcquirerData(PaymentAcquirerData value) { + this.paymentAcquirerData = value; + } + + /** + * Gets the value of the PaymentType property. + * + * @return possible object is {@link PaymentType } + */ + public PaymentType getPaymentType() { + if (paymentType == null) { + return PaymentType.NORMAL; + } else { + return paymentType; + } + } + + /** + * Sets the value of the PaymentType property. + * + * @param value allowed object is {@link PaymentType } + */ + public void setPaymentType(PaymentType value) { + this.paymentType = value; + } + + /** + * Gets the value of the merchantOverrideFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isMerchantOverrideFlag() { + if (merchantOverrideFlag == null) { + return false; + } else { + return merchantOverrideFlag; + } + } + + /** + * Sets the value of the merchantOverrideFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setMerchantOverrideFlag(Boolean value) { + this.merchantOverrideFlag = value; + } + + /** + * Gets the value of the customerLanguage property. + * + * @return possible object is {@link String } + */ + public String getCustomerLanguage() { + return customerLanguage; + } + + /** + * Sets the value of the customerLanguage property. + * + * @param value allowed object is {@link String } + */ + public void setCustomerLanguage(String value) { + this.customerLanguage = value; + } + + /** + * Gets the value of the onlineFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isOnlineFlag() { + if (onlineFlag == null) { + return true; + } else { + return onlineFlag; + } + } + + /** + * Sets the value of the onlineFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setOnlineFlag(Boolean value) { + this.onlineFlag = value; + } + + /** + * Gets the value of the authenticationMethod property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the authenticationMethod property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getAuthenticationMethod().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link AuthenticationMethodType } + * + * @return the authentication method + */ + public List getAuthenticationMethod() { + if (authenticationMethod == null) { + authenticationMethod = new ArrayList<>(); + } + return this.authenticationMethod; + } + + /** + * Gets the value of the validityDate property. + * + * @return possible object is {@link String } + */ + public String getValidityDate() { + return validityDate; + } + + /** + * Sets the value of the validityDate property. + * + * @param value allowed object is {@link String } + */ + public void setValidityDate(String value) { + this.validityDate = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PaymentToken.java b/src/main/java/com/adyen/model/nexo/PaymentToken.java new file mode 100644 index 000000000..132e9173d --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PaymentToken.java @@ -0,0 +1,108 @@ +package com.adyen.model.nexo; + +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; + + +/** + * Definition: Surrogate of the PAN (Primary Account Number) of the payment card to identify the payment mean of the customer. -- Usage: It allows, for a merchant, to identify the customer. + * + *

Java class for PaymentToken complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PaymentToken">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="TokenRequested" use="required" type="{}TokenRequestedType" />
+ *       <attribute name="TokenValue" use="required" type="{}TokenValue" />
+ *       <attribute name="ExpiryDateTime" type="{}ExpiryDateTime" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PaymentToken") +public class PaymentToken { + + /** + * The Token requested. + */ + @XmlElement(name = "TokenRequestedType", required = true) + @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) + @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") + @Schema(description = "Expiry date and time.") + protected XMLGregorianCalendar expiryDateTime; + + /** + * Gets the value of the tokenRequestedType property. + * + * @return possible object is {@link TokenRequestedType } + */ + public TokenRequestedType getTokenRequestedType() { + return tokenRequestedType; + } + + /** + * Sets the value of the tokenRequestedType property. + * + * @param value allowed object is {@link TokenRequestedType } + */ + public void setTokenRequestedType(TokenRequestedType value) { + this.tokenRequestedType = value; + } + + /** + * Gets the value of the tokenValue property. + * + * @return possible object is {@link String } + */ + public String getTokenValue() { + return tokenValue; + } + + /** + * Sets the value of the tokenValue property. + * + * @param value allowed object is {@link String } + */ + public void setTokenValue(String value) { + this.tokenValue = value; + } + + /** + * Gets the value of the expiryDateTime property. + * + * @return possible object is {@link XMLGregorianCalendar } + */ + public XMLGregorianCalendar getExpiryDateTime() { + return expiryDateTime; + } + + /** + * Sets the value of the expiryDateTime property. + * + * @param value allowed object is {@link XMLGregorianCalendar } + */ + public void setExpiryDateTime(XMLGregorianCalendar value) { + this.expiryDateTime = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PaymentTotals.java b/src/main/java/com/adyen/model/nexo/PaymentTotals.java new file mode 100644 index 000000000..f6594e197 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PaymentTotals.java @@ -0,0 +1,109 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; +import java.math.BigInteger; + + +/** + * Definition: Totals of the payment transaction during the reconciliation period. + * + *

Java class for PaymentTotals complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PaymentTotals">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="Transaction" use="required" type="{}TransactionType" />
+ *       <attribute name="TransactionCount" use="required" type="{}TransactionCount" />
+ *       <attribute name="TransactionAmount" use="required" type="{}SimpleAmountType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PaymentTotals") +public class PaymentTotals { + + /** + * The Transaction. + */ + @XmlElement(name = "TransactionType", required = true) + @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) + @Schema(description = "Number of processed transaction during the period.") + protected BigInteger transactionCount; + /** + * The Transaction amount. + */ + @XmlElement(name = "TransactionAmount", required = true) + @Schema(description = "Sum of amount of processed transaction during the period.") + protected BigDecimal transactionAmount; + + /** + * Gets the value of the transactionType property. + * + * @return possible object is {@link TransactionType } + */ + public TransactionType getTransactionType() { + return transactionType; + } + + /** + * Sets the value of the transactionType property. + * + * @param value allowed object is {@link TransactionType } + */ + public void setTransactionType(TransactionType value) { + this.transactionType = value; + } + + /** + * Gets the value of the transactionCount property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getTransactionCount() { + return transactionCount; + } + + /** + * Sets the value of the transactionCount property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setTransactionCount(BigInteger value) { + this.transactionCount = value; + } + + /** + * Gets the value of the transactionAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getTransactionAmount() { + return transactionAmount; + } + + /** + * Sets the value of the transactionAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setTransactionAmount(BigDecimal value) { + this.transactionAmount = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PaymentTransaction.java b/src/main/java/com/adyen/model/nexo/PaymentTransaction.java new file mode 100644 index 000000000..8ce4c3c9f --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PaymentTransaction.java @@ -0,0 +1,152 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Data related to the payment and loyalty transaction. -- Usage: Elements requested by the Sale System that are global to the payment or loyalty transaction. + * + *

Java class for PaymentTransaction complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PaymentTransaction">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="AmountsReq" type="{}AmountsReq"/>
+ *         <element name="OriginalPOITransaction" type="{}OriginalPOITransaction" minOccurs="0"/>
+ *         <element name="TransactionConditions" type="{}TransactionConditions" minOccurs="0"/>
+ *         <element name="SaleItem" type="{}SaleItem" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PaymentTransaction", propOrder = { + "amountsReq", + "originalPOITransaction", + "transactionConditions", + "saleItem" +}) +public class PaymentTransaction { + + /** + * The Amounts req. + */ + @XmlElement(name = "AmountsReq", required = true) + @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") + @Schema(description = "Identification of a previous POI transaction. --Rule: if UpdateReservation, Completion or Refund") + protected OriginalPOITransaction originalPOITransaction; + /** + * The Transaction conditions. + */ + @XmlElement(name = "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") + @Schema(description = "Sale items of a transaction. --Rule: If purchased products are required for the payment") + protected List saleItem; + + /** + * Gets the value of the amountsReq property. + * + * @return possible object is {@link AmountsReq } + */ + public AmountsReq getAmountsReq() { + return amountsReq; + } + + /** + * Sets the value of the amountsReq property. + * + * @param value allowed object is {@link AmountsReq } + */ + public void setAmountsReq(AmountsReq value) { + this.amountsReq = value; + } + + /** + * Gets the value of the originalPOITransaction property. + * + * @return possible object is {@link OriginalPOITransaction } + */ + public OriginalPOITransaction getOriginalPOITransaction() { + return originalPOITransaction; + } + + /** + * Sets the value of the originalPOITransaction property. + * + * @param value allowed object is {@link OriginalPOITransaction } + */ + public void setOriginalPOITransaction(OriginalPOITransaction value) { + this.originalPOITransaction = value; + } + + /** + * Gets the value of the transactionConditions property. + * + * @return possible object is {@link TransactionConditions } + */ + public TransactionConditions getTransactionConditions() { + return transactionConditions; + } + + /** + * Sets the value of the transactionConditions property. + * + * @param value allowed object is {@link TransactionConditions } + */ + public void setTransactionConditions(TransactionConditions value) { + this.transactionConditions = value; + } + + /** + * Gets the value of the saleItem property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the saleItem property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getSaleItem().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link SaleItem } + * + * @return the sale item + */ + public List getSaleItem() { + if (saleItem == null) { + saleItem = new ArrayList<>(); + } + return this.saleItem; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PaymentType.java b/src/main/java/com/adyen/model/nexo/PaymentType.java new file mode 100644 index 000000000..2c86c0339 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PaymentType.java @@ -0,0 +1,150 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for PaymentType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="PaymentType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Normal"/>
+ *     <enumeration value="Refund"/>
+ *     <enumeration value="OneTimeReservation"/>
+ *     <enumeration value="FirstReservation"/>
+ *     <enumeration value="UpdateReservation"/>
+ *     <enumeration value="Completion"/>
+ *     <enumeration value="CashAdvance"/>
+ *     <enumeration value="CashDeposit"/>
+ *     <enumeration value="Recurring"/>
+ *     <enumeration value="Instalment"/>
+ *     <enumeration value="IssuerInstalment"/>
+ *     <enumeration value="PaidOut"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "PaymentType") +@XmlEnum +public enum PaymentType { + + + /** + * Normal Payment + */ + @XmlEnumValue("Normal") + @Schema(description = "Normal Payment") + NORMAL("Normal"), + + /** + * Payment refund + */ + @XmlEnumValue("Refund") + @Schema(description = "Payment refund") + REFUND("Refund"), + + /** + * 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") + @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\".") + ONE_TIME_RESERVATION("OneTimeReservation"), + + /** + * First reservation for an amount and period of time. This service is sometimes called "Pre-Authorisation". + */ + @XmlEnumValue("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") + @Schema(description = "Adjustment of the amount or period of time of a reservation. ") + UPDATE_RESERVATION("UpdateReservation"), + + /** + * End of the reservation transaction. + */ + @XmlEnumValue("Completion") + @Schema(description = "End of the reservation transaction.") + COMPLETION("Completion"), + + /** + * Cash advance at the POI System. + */ + @XmlEnumValue("CashAdvance") + @Schema(description = "Cash advance at the POI System.") + CASH_ADVANCE("CashAdvance"), + + /** + * Cash deposit at the POI System, to credit an account. + */ + @XmlEnumValue("CashDeposit") + @Schema(description = "Cash deposit at the POI System, to credit an account.") + CASH_DEPOSIT("CashDeposit"), + + /** + * Recurring payment. + */ + @XmlEnumValue("Recurring") + @Schema(description = "Recurring payment.") + RECURRING("Recurring"), + + /** + * Instalments of payment performed on behalf of the merchant. + */ + @XmlEnumValue("Instalment") + @Schema(description = "Instalments of payment performed on behalf of the merchant.") + INSTALMENT("Instalment"), + + /** + * Instalments of payment performed by the card issuer. + */ + @XmlEnumValue("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") + @Schema(description = "Give money to in return for goods or services rendered to the merchant.") + PAID_OUT("PaidOut"); + private final String value; + + PaymentType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value payment type. + * + * @param v the v + * @return the payment type + */ + public static PaymentType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PerformedTransaction.java b/src/main/java/com/adyen/model/nexo/PerformedTransaction.java new file mode 100644 index 000000000..f88e5a521 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PerformedTransaction.java @@ -0,0 +1,204 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Result of performed transactions. -- Usage: Contains result of transaction performed without the Sale system. + * + *

Java class for PerformedTransaction complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PerformedTransaction">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="SaleData" type="{}SaleData" minOccurs="0"/>
+ *         <element name="POIData" type="{}POIData"/>
+ *         <element name="PaymentResult" type="{}PaymentResult" minOccurs="0"/>
+ *         <element name="LoyaltyResult" type="{}LoyaltyResult" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="ReversedAmount" type="{}SimpleAmountType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PerformedTransaction", propOrder = { + "response", + "saleData", + "poiData", + "paymentResult", + "loyaltyResult" +}) +public class PerformedTransaction { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Sale data. + */ + @XmlElement(name = "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) + @Schema(description = "Data related to the POI System.") + protected POIData poiData; + /** + * The Payment result. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "Amount of the payment or loyalty to reverse.. --Rule: If a transaction Reversal has been performed.") + protected BigDecimal reversedAmount; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the saleData property. + * + * @return possible object is {@link SaleData } + */ + public SaleData getSaleData() { + return saleData; + } + + /** + * Sets the value of the saleData property. + * + * @param value allowed object is {@link SaleData } + */ + public void setSaleData(SaleData value) { + this.saleData = value; + } + + /** + * Gets the value of the poiData property. + * + * @return possible object is {@link POIData } + */ + public POIData getPOIData() { + return poiData; + } + + /** + * Sets the value of the poiData property. + * + * @param value allowed object is {@link POIData } + */ + public void setPOIData(POIData value) { + this.poiData = value; + } + + /** + * Gets the value of the paymentResult property. + * + * @return possible object is {@link PaymentResult } + */ + public PaymentResult getPaymentResult() { + return paymentResult; + } + + /** + * Sets the value of the paymentResult property. + * + * @param value allowed object is {@link PaymentResult } + */ + public void setPaymentResult(PaymentResult value) { + this.paymentResult = value; + } + + /** + * Gets the value of the loyaltyResult property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the loyaltyResult property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getLoyaltyResult().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link LoyaltyResult } + * + * @return the loyalty result + */ + public List getLoyaltyResult() { + if (loyaltyResult == null) { + loyaltyResult = new ArrayList<>(); + } + return this.loyaltyResult; + } + + /** + * Gets the value of the reversedAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getReversedAmount() { + return reversedAmount; + } + + /** + * Sets the value of the reversedAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setReversedAmount(BigDecimal value) { + this.reversedAmount = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PeriodUnitType.java b/src/main/java/com/adyen/model/nexo/PeriodUnitType.java new file mode 100644 index 000000000..550e4ee34 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PeriodUnitType.java @@ -0,0 +1,86 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for PeriodUnitType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="PeriodUnitType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Daily"/>
+ *     <enumeration value="Weekly"/>
+ *     <enumeration value="Monthly"/>
+ *     <enumeration value="Annual"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "PeriodUnitType") +@XmlEnum +public enum PeriodUnitType { + + + /** + * The day is the unit of the period. + */ + @XmlEnumValue("Daily") + @Schema(description = "The day is the unit of the period.") + DAILY("Daily"), + + /** + * The week is the unit of the period. + */ + @XmlEnumValue("Weekly") + @Schema(description = "The week is the unit of the period.") + WEEKLY("Weekly"), + + /** + * The month is the unit of the period. + */ + @XmlEnumValue("Monthly") + @Schema(description = "The month is the unit of the period.") + MONTHLY("Monthly"), + + /** + * The year is the unit of the period. + */ + @XmlEnumValue("Annual") + @Schema(description = "The year is the unit of the period.") + ANNUAL("Annual"); + private final String value; + + PeriodUnitType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value period unit type. + * + * @param v the v + * @return the period unit type + */ + public static PeriodUnitType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PredefinedContent.java b/src/main/java/com/adyen/model/nexo/PredefinedContent.java new file mode 100644 index 000000000..e721aae52 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PredefinedContent.java @@ -0,0 +1,82 @@ +package com.adyen.model.nexo; + +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 Information related to the predefined messageType + * + *

Java class for PredefinedContent complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PredefinedContent">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="ReferenceID" use="required" type="{}ReferenceID" />
+ *       <attribute name="Language" type="{}ISOLanguage2A" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PredefinedContent") +public class PredefinedContent { + + /** + * The Reference id. + */ + @XmlElement(name = "ReferenceID", required = true) + @Schema(description = "Identification of a predefined message to display, print or play.") + protected String referenceID; + /** + * The Language. + */ + @XmlElement(name = "Language") + @Schema(description = "Identification of a language.") + protected String language; + + /** + * Gets the value of the referenceID property. + * + * @return possible object is {@link String } + */ + public String getReferenceID() { + return referenceID; + } + + /** + * Sets the value of the referenceID property. + * + * @param value allowed object is {@link String } + */ + public void setReferenceID(String value) { + this.referenceID = value; + } + + /** + * Gets the value of the language property. + * + * @return possible object is {@link String } + */ + public String getLanguage() { + return language; + } + + /** + * Sets the value of the language property. + * + * @param value allowed object is {@link String } + */ + public void setLanguage(String value) { + this.language = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PrintOutput.java b/src/main/java/com/adyen/model/nexo/PrintOutput.java new file mode 100644 index 000000000..99c5930d1 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PrintOutput.java @@ -0,0 +1,195 @@ +package com.adyen.model.nexo; + +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 complete print operation for a Print Device type. + * + *

Java class for PrintOutput complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PrintOutput">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="OutputContent" type="{}OutputContent"/>
+ *         <element name="OutputSignature" type="{}OutputSignature" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="DocumentQualifier" use="required" type="{}DocumentQualifierType" />
+ *       <attribute name="ResponseMode" use="required" type="{}ResponseModeType" />
+ *       <attribute name="IntegratedPrintFlag" type="{}IntegratedPrintFlag" default="false" />
+ *       <attribute name="RequiredSignatureFlag" type="{}RequiredSignatureFlag" default="false" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PrintOutput", propOrder = { + "outputContent", + "outputSignature" +}) +public class PrintOutput { + + /** + * The Output content. + */ + @XmlElement(name = "OutputContent", required = true) + @Schema(description = "Content to display or print.") + protected OutputContent outputContent; + /** + * The Output signature. + */ + @XmlElement(name = "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) + @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) + @Schema(description = "Message response awaited by the initiator of the Request") + protected ResponseModeType responseMode; + /** + * The Integrated print flag. + */ + @XmlElement(name = "IntegratedPrintFlag") + @Schema(description = "Type of the print integrated to other prints.") + protected Boolean integratedPrintFlag; + /** + * The Required signature flag. + */ + @XmlElement(name = "RequiredSignatureFlag") + @Schema(description = "Indicate that the cardholder payment receipt requires a physical signature by the Customer.") + protected Boolean requiredSignatureFlag; + + /** + * Gets the value of the outputContent property. + * + * @return possible object is {@link OutputContent } + */ + public OutputContent getOutputContent() { + return outputContent; + } + + /** + * Sets the value of the outputContent property. + * + * @param value allowed object is {@link OutputContent } + */ + public void setOutputContent(OutputContent value) { + this.outputContent = value; + } + + /** + * Gets the value of the outputSignature property. + * + * @return possible object is byte[] + */ + public byte[] getOutputSignature() { + return outputSignature; + } + + /** + * Sets the value of the outputSignature property. + * + * @param value allowed object is byte[] + */ + public void setOutputSignature(byte[] value) { + this.outputSignature = value; + } + + /** + * Gets the value of the documentQualifier property. + * + * @return possible object is {@link DocumentQualifierType } + */ + public DocumentQualifierType getDocumentQualifier() { + return documentQualifier; + } + + /** + * Sets the value of the documentQualifier property. + * + * @param value allowed object is {@link DocumentQualifierType } + */ + public void setDocumentQualifier(DocumentQualifierType value) { + this.documentQualifier = value; + } + + /** + * Gets the value of the responseMode property. + * + * @return possible object is {@link ResponseModeType } + */ + public ResponseModeType getResponseMode() { + return responseMode; + } + + /** + * Sets the value of the responseMode property. + * + * @param value allowed object is {@link ResponseModeType } + */ + public void setResponseMode(ResponseModeType value) { + this.responseMode = value; + } + + /** + * Gets the value of the integratedPrintFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isIntegratedPrintFlag() { + if (integratedPrintFlag == null) { + return false; + } else { + return integratedPrintFlag; + } + } + + /** + * Sets the value of the integratedPrintFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setIntegratedPrintFlag(Boolean value) { + this.integratedPrintFlag = value; + } + + /** + * Gets the value of the requiredSignatureFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isRequiredSignatureFlag() { + if (requiredSignatureFlag == null) { + return false; + } else { + return requiredSignatureFlag; + } + } + + /** + * Sets the value of the requiredSignatureFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setRequiredSignatureFlag(Boolean value) { + this.requiredSignatureFlag = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PrintRequest.java b/src/main/java/com/adyen/model/nexo/PrintRequest.java new file mode 100644 index 000000000..8321bdec8 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PrintRequest.java @@ -0,0 +1,61 @@ +package com.adyen.model.nexo; + +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 the way to process the print. It contains the complete content to print. + * + *

Java class for PrintRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PrintRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="PrintOutput" type="{}PrintOutput"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PrintRequest", propOrder = { + "printOutput" +}) +public class PrintRequest { + + /** + * The Print output. + */ + @XmlElement(name = "PrintOutput", required = true) + @Schema(description = "Information to print and the way to process the print.") + protected PrintOutput printOutput; + + /** + * Gets the value of the printOutput property. + * + * @return possible object is {@link PrintOutput } + */ + public PrintOutput getPrintOutput() { + return printOutput; + } + + /** + * Sets the value of the printOutput property. + * + * @param value allowed object is {@link PrintOutput } + */ + public void setPrintOutput(PrintOutput value) { + this.printOutput = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PrintResponse.java b/src/main/java/com/adyen/model/nexo/PrintResponse.java new file mode 100644 index 000000000..7db109963 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PrintResponse.java @@ -0,0 +1,86 @@ +package com.adyen.model.nexo; + +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 print, parallel to the messageType request, except if response not required and absent. + * + *

Java class for PrintResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PrintResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *       </sequence>
+ *       <attribute name="DocumentQualifier" use="required" type="{}DocumentQualifierType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PrintResponse", propOrder = { + "response" +}) +public class PrintResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Document qualifier. + */ + @XmlElement(name = "DocumentQualifier", required = true) + @Schema(description = "Qualification of the document to print to the Cashier or the Customer. --Rule: Copy") + protected DocumentQualifierType documentQualifier; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the documentQualifier property. + * + * @return possible object is {@link DocumentQualifierType } + */ + public DocumentQualifierType getDocumentQualifier() { + return documentQualifier; + } + + /** + * Sets the value of the documentQualifier property. + * + * @param value allowed object is {@link DocumentQualifierType } + */ + public void setDocumentQualifier(DocumentQualifierType value) { + this.documentQualifier = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/PrinterStatusType.java b/src/main/java/com/adyen/model/nexo/PrinterStatusType.java new file mode 100644 index 000000000..1d8b5a140 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/PrinterStatusType.java @@ -0,0 +1,92 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for PrinterStatusType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="PrinterStatusType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="OK"/>
+ *     <enumeration value="PaperLow"/>
+ *     <enumeration value="NoPaper"/>
+ *     <enumeration value="PaperJam"/>
+ *     <enumeration value="OutOfOrder"/>
+ *   </restriction>
+ * </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") + @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") + @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") + @Schema(description = "An operator must remove the paper jam manually.") + PAPER_JAM("PaperJam"), + + /** + * The printer is out of order. + */ + @XmlEnumValue("OutOfOrder") + @Schema(description = "The printer is out of order.") + OUT_OF_ORDER("OutOfOrder"); + private final String value; + + PrinterStatusType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value printer status type. + * + * @param v the v + * @return the printer status type + */ + public static PrinterStatusType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/Rebates.java b/src/main/java/com/adyen/model/nexo/Rebates.java new file mode 100644 index 000000000..8202c97a8 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/Rebates.java @@ -0,0 +1,127 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Rebate form to an award; + * + *

Java class for Rebates complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Rebates">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="TotalRebate" type="{}SimpleAmountType" minOccurs="0"/>
+ *         <element name="RebateLabel" type="{}RebateLabel" minOccurs="0"/>
+ *         <element name="SaleItemRebate" type="{}SaleItemRebate" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Rebates", propOrder = { + "totalRebate", + "rebateLabel", + "saleItemRebate" +}) +public class Rebates { + + /** + * The Total rebate. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "The awarded amount that is attached to an item as a rebate. --Rule: only items with rebate (identified by ItemID)") + protected List saleItemRebate; + + /** + * Gets the value of the totalRebate property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getTotalRebate() { + return totalRebate; + } + + /** + * Sets the value of the totalRebate property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setTotalRebate(BigDecimal value) { + this.totalRebate = value; + } + + /** + * Gets the value of the rebateLabel property. + * + * @return possible object is {@link String } + */ + public String getRebateLabel() { + return rebateLabel; + } + + /** + * Sets the value of the rebateLabel property. + * + * @param value allowed object is {@link String } + */ + public void setRebateLabel(String value) { + this.rebateLabel = value; + } + + /** + * Gets the value of the saleItemRebate property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the saleItemRebate property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getSaleItemRebate().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link SaleItemRebate } + * + * @return the sale item rebate + */ + public List getSaleItemRebate() { + if (saleItemRebate == null) { + saleItemRebate = new ArrayList<>(); + } + return this.saleItemRebate; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/RecipientIdentifier.java b/src/main/java/com/adyen/model/nexo/RecipientIdentifier.java new file mode 100644 index 000000000..b5f6c6c13 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/RecipientIdentifier.java @@ -0,0 +1,58 @@ +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; + + +/** + * Definition: Cryptographic Message Syntax (CMS) data structure containing the Recipient Identifier -- Reference: RFC 3852: Cryptographic Message Syntax (CMS) -- Usage: This data structure contains: the issuer name (see X.501-88) the certificate serial number (see X.509-97) + * + *

Java class for RecipientIdentifier complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="RecipientIdentifier">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="IssuerAndSerialNumber" type="{}IssuerAndSerialNumber"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RecipientIdentifier", propOrder = { + "issuerAndSerialNumber" +}) +public class RecipientIdentifier { + + /** + * The Issuer and serial number. + */ + @XmlElement(name = "IssuerAndSerialNumber", required = true) + protected IssuerAndSerialNumber issuerAndSerialNumber; + + /** + * Gets the value of the issuerAndSerialNumber property. + * + * @return possible object is {@link IssuerAndSerialNumber } + */ + public IssuerAndSerialNumber getIssuerAndSerialNumber() { + return issuerAndSerialNumber; + } + + /** + * Sets the value of the issuerAndSerialNumber property. + * + * @param value allowed object is {@link IssuerAndSerialNumber } + */ + public void setIssuerAndSerialNumber(IssuerAndSerialNumber value) { + this.issuerAndSerialNumber = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/ReconciliationRequest.java b/src/main/java/com/adyen/model/nexo/ReconciliationRequest.java new file mode 100644 index 000000000..46534f511 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ReconciliationRequest.java @@ -0,0 +1,124 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Reconciliation Request messageType. -- Usage: It conveys Information related to the Reconciliation requested by the Sale System: Type of reconciliation (with or without closure of the reconciliation time period) The Acquirers identification if they are involved and could be selected + * + *

Java class for ReconciliationRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ReconciliationRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="AcquirerID" type="{}AcquirerID" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Reconciliation" use="required" type="{}ReconciliationType" />
+ *       <attribute name="POIReconciliationID" type="{}POIReconciliationID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ReconciliationRequest", propOrder = { + "acquirerID" +}) +public class ReconciliationRequest { + + /** + * The Acquirer id. + */ + @XmlElement(name = "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) + @Schema(description = "Type of Reconciliation requested by the Sale to the POI.") + protected ReconciliationType reconciliationType; + /** + * The Poi reconciliation id. + */ + @XmlElement(name = "POIReconciliationID") + @Schema(description = "Identification of the reconciliation period between Sale and POI. --Rule: Absent if ReconciliationType is not \"PreviousReconciliation\"") + protected String poiReconciliationID; + + /** + * Gets the value of the acquirerID property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the acquirerID property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getAcquirerID().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * @return the acquirer id + */ + public List getAcquirerID() { + if (acquirerID == null) { + acquirerID = new ArrayList<>(); + } + return this.acquirerID; + } + + /** + * Gets the value of the reconciliationType property. + * + * @return possible object is {@link ReconciliationType } + */ + public ReconciliationType getReconciliationType() { + return reconciliationType; + } + + /** + * Sets the value of the reconciliationType property. + * + * @param value allowed object is {@link ReconciliationType } + */ + public void setReconciliationType(ReconciliationType value) { + this.reconciliationType = value; + } + + /** + * Gets the value of the poiReconciliationID property. + * + * @return possible object is {@link String } + */ + public String getPOIReconciliationID() { + return poiReconciliationID; + } + + /** + * Sets the value of the poiReconciliationID property. + * + * @param value allowed object is {@link String } + */ + public void setPOIReconciliationID(String value) { + this.poiReconciliationID = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/ReconciliationResponse.java b/src/main/java/com/adyen/model/nexo/ReconciliationResponse.java new file mode 100644 index 000000000..8b0b2cbd1 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ReconciliationResponse.java @@ -0,0 +1,150 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Reconciliation Response messageType. -- Usage: It conveys Information related to the Reconciliation transaction processed by the POI System + * + *

Java class for ReconciliationResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ReconciliationResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="TransactionTotals" type="{}TransactionTotals" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Reconciliation" use="required" type="{}ReconciliationType" />
+ *       <attribute name="POIReconciliationID" type="{}POIReconciliationID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ReconciliationResponse", propOrder = { + "response", + "transactionTotals" +}) +public class ReconciliationResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Transaction totals. + */ + @XmlElement(name = "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) + @Schema(description = "Type of Reconciliation requested by the Sale to the POI. --Rule: Copy") + protected ReconciliationType reconciliationType; + /** + * The Poi reconciliation id. + */ + @XmlElement(name = "POIReconciliationID") + @Schema(description = "Identification of the reconciliation period between Sale and POI. --Rule: Absent if ReconciliationType is \"AcquirerReconciliation\"") + protected String poiReconciliationID; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the transactionTotals property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the transactionTotals property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getTransactionTotals().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link TransactionTotals } + * + * @return the transaction totals + */ + public List getTransactionTotals() { + if (transactionTotals == null) { + transactionTotals = new ArrayList<>(); + } + return this.transactionTotals; + } + + /** + * Gets the value of the reconciliationType property. + * + * @return possible object is {@link ReconciliationType } + */ + public ReconciliationType getReconciliationType() { + return reconciliationType; + } + + /** + * Sets the value of the reconciliationType property. + * + * @param value allowed object is {@link ReconciliationType } + */ + public void setReconciliationType(ReconciliationType value) { + this.reconciliationType = value; + } + + /** + * Gets the value of the poiReconciliationID property. + * + * @return possible object is {@link String } + */ + public String getPOIReconciliationID() { + return poiReconciliationID; + } + + /** + * Sets the value of the poiReconciliationID property. + * + * @param value allowed object is {@link String } + */ + public void setPOIReconciliationID(String value) { + this.poiReconciliationID = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/ReconciliationType.java b/src/main/java/com/adyen/model/nexo/ReconciliationType.java new file mode 100644 index 000000000..4dafac4cc --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ReconciliationType.java @@ -0,0 +1,86 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for ReconciliationType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="ReconciliationType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="SaleReconciliation"/>
+ *     <enumeration value="AcquirerSynchronisation"/>
+ *     <enumeration value="AcquirerReconciliation"/>
+ *     <enumeration value="PreviousReconciliation"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "ReconciliationType") +@XmlEnum +public enum ReconciliationType { + + + /** + * Reconciliation with closure of the current period, without any Acquirers synchronisation. + */ + @XmlEnumValue("SaleReconciliation") + @Schema(description = "Reconciliation with closure of the current period, without any Acquirers synchronisation.") + SALE_RECONCILIATION("SaleReconciliation"), + + /** + * Reconciliation and closure of the current period, with synchronisation of the reconciliation between the POI and Acquirers. + */ + @XmlEnumValue("AcquirerSynchronisation") + @Schema(description = "Reconciliation and closure of the current period, with synchronisation of the reconciliation between the POI and Acquirers.") + ACQUIRER_SYNCHRONISATION("AcquirerSynchronisation"), + + /** + * Reconciliation between the POI and one or several Acquirers only. There is no reconciliation between the Sale System and the POI System. + */ + @XmlEnumValue("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") + @Schema(description = "Request result of a previous reconciliation.") + PREVIOUS_RECONCILIATION("PreviousReconciliation"); + private final String value; + + ReconciliationType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value reconciliation type. + * + * @param v the v + * @return the reconciliation type + */ + public static ReconciliationType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/RelativeDistinguishedName.java b/src/main/java/com/adyen/model/nexo/RelativeDistinguishedName.java new file mode 100644 index 000000000..3224e0da4 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/RelativeDistinguishedName.java @@ -0,0 +1,83 @@ +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; + + +/** + * Definition: Certificate distinguished name (DN) -- Reference: RFC 3880: Internet X.509 Public Key Infrastructure Certificate and Certificate -- Usage: Identifies the issuer or the subject of a X.509 certificate. + * + *

Java class for RelativeDistinguishedName complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="RelativeDistinguishedName">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Attribute" type="{}AttributeTypeCodeZ"/>
+ *         <element name="AttributeValue" type="{}AttributeValue"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RelativeDistinguishedName", propOrder = { + "attribute", + "attributeValue" +}) +public class RelativeDistinguishedName { + + /** + * The Attribute. + */ + @XmlElement(name = "Attribute", required = true) + protected String attribute; + /** + * The Attribute value. + */ + @XmlElement(name = "AttributeValue", required = true) + protected String attributeValue; + + /** + * Gets the value of the attribute property. + * + * @return possible object is {@link String } + */ + public String getAttribute() { + return attribute; + } + + /** + * Sets the value of the attribute property. + * + * @param value allowed object is {@link String } + */ + public void setAttribute(String value) { + this.attribute = value; + } + + /** + * Gets the value of the attributeValue property. + * + * @return possible object is {@link String } + */ + public String getAttributeValue() { + return attributeValue; + } + + /** + * Sets the value of the attributeValue property. + * + * @param value allowed object is {@link String } + */ + public void setAttributeValue(String value) { + this.attributeValue = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/RepeatedMessageResponse.java b/src/main/java/com/adyen/model/nexo/RepeatedMessageResponse.java new file mode 100644 index 000000000..126c90ecd --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/RepeatedMessageResponse.java @@ -0,0 +1,91 @@ +package com.adyen.model.nexo; + +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 Payment, Loyalty or Reversal transaction + * + *

Java class for RepeatedMessageResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="RepeatedMessageResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MessageHeader" type="{}MessageHeader"/>
+ *         <choice>
+ *           <element name="LoyaltyResponse" type="{}LoyaltyResponse"/>
+ *           <element name="PaymentResponse" type="{}PaymentResponse"/>
+ *           <element name="ReversalResponse" type="{}ReversalResponse"/>
+ *           <element name="StoredValueResponse" type="{}StoredValueResponse"/>
+ *           <element name="CardAcquisitionResponse" type="{}CardAcquisitionResponse"/>
+ *           <element name="CardReaderAPDUResponse" type="{}CardReaderAPDUResponse"/>
+ *         </choice>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RepeatedMessageResponse", propOrder = { + "repeatedResponseMessageBody", + "messageHeader" +}) +public class RepeatedMessageResponse { + + /** + * The Repeated message response body. + */ + @XmlElement(name = "RepeatedResponseMessageBody", required = true) + protected RepeatedResponseMessageBody repeatedResponseMessageBody; + /** + * The Message header. + */ + @XmlElement(name = "MessageHeader", required = true) + @Schema(description = "Message header of the Sale to POI protocol message.") + protected MessageHeader messageHeader; + + /** + * Gets the value of the repeatedResponseMessageBody property. + * + * @return possible object is {@link RepeatedResponseMessageBody } + */ + public RepeatedResponseMessageBody getRepeatedResponseMessageBody() { + return repeatedResponseMessageBody; + } + + /** + * Sets the value of the repeatedResponseMessageBody property. + * + * @param value allowed object is {@link RepeatedResponseMessageBody } + */ + public void setRepeatedResponseMessageBody(RepeatedResponseMessageBody value) { + this.repeatedResponseMessageBody = value; + } + + /** + * Gets the value of the messageHeader property. + * + * @return possible object is {@link MessageHeader } + */ + public MessageHeader getMessageHeader() { + return messageHeader; + } + + /** + * Sets the value of the messageHeader property. + * + * @param value allowed object is {@link MessageHeader } + */ + public void setMessageHeader(MessageHeader value) { + this.messageHeader = value; + } +} diff --git a/src/main/java/com/adyen/model/nexo/RepeatedMessageResponseBody.java b/src/main/java/com/adyen/model/nexo/RepeatedMessageResponseBody.java new file mode 100644 index 000000000..04785366e --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/RepeatedMessageResponseBody.java @@ -0,0 +1,183 @@ + +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +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; + +/** + * 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") + protected LoyaltyResponse loyaltyResponse; + /** + * The Payment response. + */ + @XmlElement(name = "PaymentResponse") + protected PaymentResponse paymentResponse; + /** + * The Reversal response. + */ + @XmlElement(name = "ReversalResponse") + protected ReversalResponse reversalResponse; + /** + * The Stored value response. + */ + @XmlElement(name = "StoredValueResponse") + protected StoredValueResponse storedValueResponse; + /** + * The Card acquisition response. + */ + @XmlElement(name = "CardAcquisitionResponse") + protected CardAcquisitionResponse cardAcquisitionResponse; + /** + * The Card reader apdu response. + */ + @XmlElement(name = "CardReaderAPDUResponse") + protected CardReaderAPDUResponse cardReaderAPDUResponse; + + /** + * Gets the value of the loyaltyResponse property. + * + * @return possible object is {@link LoyaltyResponse } + */ + public LoyaltyResponse getLoyaltyResponse() { + return loyaltyResponse; + } + + /** + * Sets the value of the loyaltyResponse property. + * + * @param value allowed object is {@link LoyaltyResponse } + */ + public void setLoyaltyResponse(LoyaltyResponse value) { + this.loyaltyResponse = value; + } + + /** + * Gets the value of the paymentResponse property. + * + * @return possible object is {@link PaymentResponse } + */ + public PaymentResponse getPaymentResponse() { + return paymentResponse; + } + + /** + * Sets the value of the paymentResponse property. + * + * @param value allowed object is {@link PaymentResponse } + */ + public void setPaymentResponse(PaymentResponse value) { + this.paymentResponse = value; + } + + /** + * Gets the value of the reversalResponse property. + * + * @return possible object is {@link ReversalResponse } + */ + public ReversalResponse getReversalResponse() { + return reversalResponse; + } + + /** + * Sets the value of the reversalResponse property. + * + * @param value allowed object is {@link ReversalResponse } + */ + public void setReversalResponse(ReversalResponse value) { + this.reversalResponse = value; + } + + /** + * Gets the value of the storedValueResponse property. + * + * @return possible object is {@link StoredValueResponse } + */ + public StoredValueResponse getStoredValueResponse() { + return storedValueResponse; + } + + /** + * Sets the value of the storedValueResponse property. + * + * @param value allowed object is {@link StoredValueResponse } + */ + public void setStoredValueResponse(StoredValueResponse value) { + this.storedValueResponse = value; + } + + /** + * Gets the value of the cardAcquisitionResponse property. + * + * @return possible object is {@link CardAcquisitionResponse } + */ + public CardAcquisitionResponse getCardAcquisitionResponse() { + return cardAcquisitionResponse; + } + + /** + * Sets the value of the cardAcquisitionResponse property. + * + * @param value allowed object is {@link CardAcquisitionResponse } + */ + public void setCardAcquisitionResponse(CardAcquisitionResponse value) { + this.cardAcquisitionResponse = value; + } + + /** + * Gets the value of the cardReaderAPDUResponse property. + * + * @return possible object is {@link CardReaderAPDUResponse } + */ + public CardReaderAPDUResponse getCardReaderAPDUResponse() { + return cardReaderAPDUResponse; + } + + /** + * Sets the value of the cardReaderAPDUResponse property. + * + * @param value allowed object is {@link CardReaderAPDUResponse } + */ + public void setCardReaderAPDUResponse(CardReaderAPDUResponse value) { + this.cardReaderAPDUResponse = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/RepeatedResponseMessageBody.java b/src/main/java/com/adyen/model/nexo/RepeatedResponseMessageBody.java new file mode 100644 index 000000000..9fd056713 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/RepeatedResponseMessageBody.java @@ -0,0 +1,183 @@ + +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +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; + +/** + * 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") + protected LoyaltyResponse loyaltyResponse; + /** + * The Payment response. + */ + @XmlElement(name = "PaymentResponse") + protected PaymentResponse paymentResponse; + /** + * The Reversal response. + */ + @XmlElement(name = "ReversalResponse") + protected ReversalResponse reversalResponse; + /** + * The Stored value response. + */ + @XmlElement(name = "StoredValueResponse") + protected StoredValueResponse storedValueResponse; + /** + * The Card acquisition response. + */ + @XmlElement(name = "CardAcquisitionResponse") + protected CardAcquisitionResponse cardAcquisitionResponse; + /** + * The Card reader apdu response. + */ + @XmlElement(name = "CardReaderAPDUResponse") + protected CardReaderAPDUResponse cardReaderAPDUResponse; + + /** + * Gets the value of the loyaltyResponse property. + * + * @return possible object is {@link LoyaltyResponse } + */ + public LoyaltyResponse getLoyaltyResponse() { + return loyaltyResponse; + } + + /** + * Sets the value of the loyaltyResponse property. + * + * @param value allowed object is {@link LoyaltyResponse } + */ + public void setLoyaltyResponse(LoyaltyResponse value) { + this.loyaltyResponse = value; + } + + /** + * Gets the value of the paymentResponse property. + * + * @return possible object is {@link PaymentResponse } + */ + public PaymentResponse getPaymentResponse() { + return paymentResponse; + } + + /** + * Sets the value of the paymentResponse property. + * + * @param value allowed object is {@link PaymentResponse } + */ + public void setPaymentResponse(PaymentResponse value) { + this.paymentResponse = value; + } + + /** + * Gets the value of the reversalResponse property. + * + * @return possible object is {@link ReversalResponse } + */ + public ReversalResponse getReversalResponse() { + return reversalResponse; + } + + /** + * Sets the value of the reversalResponse property. + * + * @param value allowed object is {@link ReversalResponse } + */ + public void setReversalResponse(ReversalResponse value) { + this.reversalResponse = value; + } + + /** + * Gets the value of the storedValueResponse property. + * + * @return possible object is {@link StoredValueResponse } + */ + public StoredValueResponse getStoredValueResponse() { + return storedValueResponse; + } + + /** + * Sets the value of the storedValueResponse property. + * + * @param value allowed object is {@link StoredValueResponse } + */ + public void setStoredValueResponse(StoredValueResponse value) { + this.storedValueResponse = value; + } + + /** + * Gets the value of the cardAcquisitionResponse property. + * + * @return possible object is {@link CardAcquisitionResponse } + */ + public CardAcquisitionResponse getCardAcquisitionResponse() { + return cardAcquisitionResponse; + } + + /** + * Sets the value of the cardAcquisitionResponse property. + * + * @param value allowed object is {@link CardAcquisitionResponse } + */ + public void setCardAcquisitionResponse(CardAcquisitionResponse value) { + this.cardAcquisitionResponse = value; + } + + /** + * Gets the value of the cardReaderAPDUResponse property. + * + * @return possible object is {@link CardReaderAPDUResponse } + */ + public CardReaderAPDUResponse getCardReaderAPDUResponse() { + return cardReaderAPDUResponse; + } + + /** + * Sets the value of the cardReaderAPDUResponse property. + * + * @param value allowed object is {@link CardReaderAPDUResponse } + */ + public void setCardReaderAPDUResponse(CardReaderAPDUResponse value) { + this.cardReaderAPDUResponse = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/Response.java b/src/main/java/com/adyen/model/nexo/Response.java new file mode 100644 index 000000000..3fc91efb2 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/Response.java @@ -0,0 +1,111 @@ +package com.adyen.model.nexo; + +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, ErrorCondition is absent or not used in the processing of the messageType. In the other cases, the ErrorCondition has to be present and can refine the processing of the messageType response. AdditionalResponse gives more + * + *

Java class for Response complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Response">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="AdditionalResponse" type="{}AdditionalResponse" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Result" use="required" type="{}ResultType" />
+ *       <attribute name="ErrorCondition" type="{}ErrorConditionType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Response", propOrder = { + "additionalResponse" +}) +public class Response { + + /** + * The Additional response. + */ + @XmlElement(name = "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) + @Schema(description = "Result of the processing of the message") + protected ResultType result; + /** + * The Error condition. + */ + @XmlElement(name = "ErrorCondition") + @Schema(description = "Condition that has produced an error on the processing of a message request --Rule: If Result is not Success") + protected ErrorConditionType errorCondition; + + /** + * Gets the value of the additionalResponse property. + * + * @return possible object is {@link String } + */ + public String getAdditionalResponse() { + return additionalResponse; + } + + /** + * Sets the value of the additionalResponse property. + * + * @param value allowed object is {@link String } + */ + public void setAdditionalResponse(String value) { + this.additionalResponse = value; + } + + /** + * Gets the value of the result property. + * + * @return possible object is {@link ResultType } + */ + public ResultType getResult() { + return result; + } + + /** + * Sets the value of the result property. + * + * @param value allowed object is {@link ResultType } + */ + public void setResult(ResultType value) { + this.result = value; + } + + /** + * Gets the value of the errorCondition property. + * + * @return possible object is {@link ErrorConditionType } + */ + public ErrorConditionType getErrorCondition() { + return errorCondition; + } + + /** + * Sets the value of the errorCondition property. + * + * @param value allowed object is {@link ErrorConditionType } + */ + public void setErrorCondition(ErrorConditionType value) { + this.errorCondition = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/ResponseModeType.java b/src/main/java/com/adyen/model/nexo/ResponseModeType.java new file mode 100644 index 000000000..a5f9fcd49 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ResponseModeType.java @@ -0,0 +1,86 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for ResponseModeType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="ResponseModeType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="NotRequired"/>
+ *     <enumeration value="Immediate"/>
+ *     <enumeration value="PrintEnd"/>
+ *     <enumeration value="SoundEnd"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "ResponseModeType") +@XmlEnum +public enum ResponseModeType { + + + /** + * The Message Response is not required, except in case of error. + */ + @XmlEnumValue("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") + @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") + @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") + @Schema(description = "The Sound Response is required at the end of play.") + SOUND_END("SoundEnd"); + private final String value; + + ResponseModeType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value response mode type. + * + * @param v the v + * @return the response mode type + */ + public static ResponseModeType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/ResultType.java b/src/main/java/com/adyen/model/nexo/ResultType.java new file mode 100644 index 000000000..b88d2a89e --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ResultType.java @@ -0,0 +1,78 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for ResultType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="ResultType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Success"/>
+ *     <enumeration value="Failure"/>
+ *     <enumeration value="Partial"/>
+ *   </restriction>
+ * </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") + @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") + @Schema(description = "ErrorCondition") + FAILURE("Failure"), + + /** + * 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") + @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") + PARTIAL("Partial"); + private final String value; + + ResultType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value result type. + * + * @param v the v + * @return the result type + */ + public static ResultType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/ReversalReasonType.java b/src/main/java/com/adyen/model/nexo/ReversalReasonType.java new file mode 100644 index 000000000..b7645cae1 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ReversalReasonType.java @@ -0,0 +1,86 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for ReversalReasonType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="ReversalReasonType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="CustCancel"/>
+ *     <enumeration value="MerchantCancel"/>
+ *     <enumeration value="Malfunction"/>
+ *     <enumeration value="Unable2Compl"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "ReversalReasonType") +@XmlEnum +public enum ReversalReasonType { + + + /** + * Customer cancellation + */ + @XmlEnumValue("CustCancel") + @Schema(description = "Customer cancellation") + CUST_CANCEL("CustCancel"), + + /** + * Cashier cancellation + */ + @XmlEnumValue("MerchantCancel") + @Schema(description = "Cashier cancellation") + MERCHANT_CANCEL("MerchantCancel"), + + /** + * Suspected malfunction + */ + @XmlEnumValue("Malfunction") + @Schema(description = "Suspected malfunction") + MALFUNCTION("Malfunction"), + + /** + * Card acceptor device unable to complete transaction + */ + @XmlEnumValue("Unable2Compl") + @Schema(description = "Card acceptor device unable to complete transaction") + UNABLE_2_COMPL("Unable2Compl"); + private final String value; + + ReversalReasonType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value reversal reason type. + * + * @param v the v + * @return the reversal reason type + */ + public static ReversalReasonType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/ReversalRequest.java b/src/main/java/com/adyen/model/nexo/ReversalRequest.java new file mode 100644 index 000000000..c145488c2 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ReversalRequest.java @@ -0,0 +1,185 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; + + +/** + * Definition: Content of the Reversal Request messageType. -- Usage: It conveys Information related to the reversal of a previous payment or a loyalty transaction. + * + *

Java class for ReversalRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ReversalRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="OriginalPOITransaction" type="{}OriginalPOITransaction"/>
+ *         <element name="CustomerOrderID" type="{}CustomerOrder" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="SaleReferenceID" type="{}SaleReferenceID" />
+ *       <attribute name="ReversalReason" use="required" type="{}ReversalReasonType" />
+ *       <attribute name="ReversedAmount" type="{}SimpleAmountType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ReversalRequest", propOrder = { + "originalPOITransaction", + "customerOrderID" +}) +public class ReversalRequest { + + /** + * The Original poi transaction. + */ + @XmlElement(name = "OriginalPOITransaction", required = true) + @Schema(description = "Identification of a previous POI transaction.") + protected OriginalPOITransaction originalPOITransaction; + /** + * The Customer order id. + */ + @XmlElement(name = "CustomerOrderID") + @Schema(description = "If the reversal is performed inside a customer order.") + protected CustomerOrder customerOrderID; + /** + * The Sale reference id. + */ + @XmlElement(name = "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) + @Schema(description = "Reason of the payment or loyalty reversal..") + protected ReversalReasonType reversalReason; + /** + * The Reversed amount. + */ + @XmlElement(name = "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") + protected SaleData saleData; + + /** + * Gets the value of the originalPOITransaction property. + * + * @return possible object is {@link OriginalPOITransaction } + */ + public OriginalPOITransaction getOriginalPOITransaction() { + return originalPOITransaction; + } + + /** + * Sets the value of the originalPOITransaction property. + * + * @param value allowed object is {@link OriginalPOITransaction } + */ + public void setOriginalPOITransaction(OriginalPOITransaction value) { + this.originalPOITransaction = value; + } + + /** + * Gets the value of the customerOrderID property. + * + * @return possible object is {@link CustomerOrder } + */ + public CustomerOrder getCustomerOrderID() { + return customerOrderID; + } + + /** + * Sets the value of the customerOrderID property. + * + * @param value allowed object is {@link CustomerOrder } + */ + public void setCustomerOrderID(CustomerOrder value) { + this.customerOrderID = value; + } + + /** + * Gets the value of the saleReferenceID property. + * + * @return possible object is {@link String } + */ + public String getSaleReferenceID() { + return saleReferenceID; + } + + /** + * Sets the value of the saleReferenceID property. + * + * @param value allowed object is {@link String } + */ + public void setSaleReferenceID(String value) { + this.saleReferenceID = value; + } + + /** + * Gets the value of the reversalReason property. + * + * @return possible object is {@link ReversalReasonType } + */ + public ReversalReasonType getReversalReason() { + return reversalReason; + } + + /** + * Sets the value of the reversalReason property. + * + * @param value allowed object is {@link ReversalReasonType } + */ + public void setReversalReason(ReversalReasonType value) { + this.reversalReason = value; + } + + /** + * Gets the value of the reversedAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getReversedAmount() { + return reversedAmount; + } + + /** + * Sets the value of the reversedAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setReversedAmount(BigDecimal value) { + this.reversedAmount = value; + } + + /** + * Gets the value of the saleData property. + * + * @return possible object is {@link SaleData } + */ + public SaleData getSaleData() { + return saleData; + } + + /** + * Sets the value of the saleData property. + * + * @param value allowed object is {@link SaleData } + */ + public void setSaleData(SaleData value) { + this.saleData = value; + } +} diff --git a/src/main/java/com/adyen/model/nexo/ReversalResponse.java b/src/main/java/com/adyen/model/nexo/ReversalResponse.java new file mode 100644 index 000000000..56f08df45 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ReversalResponse.java @@ -0,0 +1,203 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Reversal Response messageType. -- Usage: It conveys Information related to the reversal processed by the POI System. + * + *

Java class for ReversalResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ReversalResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="POIData" type="{}POIData" minOccurs="0"/>
+ *         <element name="OriginalPOITransaction" type="{}OriginalPOITransaction" minOccurs="0"/>
+ *         <element name="PaymentReceipt" type="{}PaymentReceipt" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="ReversedAmount" type="{}SimpleAmountType" />
+ *       <attribute name="CustomerOrderID" type="{}CustomerOrderID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ReversalResponse", propOrder = { + "response", + "poiData", + "originalPOITransaction", + "paymentReceipt" +}) +public class ReversalResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Poi data. + */ + @XmlElement(name = "POIData") + @Schema(description = "Data related to the POI System. --Rule: If Result is Success") + protected POIData poiData; + /** + * The Original poi transaction. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "Amount of the payment or loyalty to reverse.. --Rule: Copy") + protected BigDecimal reversedAmount; + /** + * The Customer order id. + */ + @XmlElement(name = "CustomerOrderID") + @Schema(description = "Customer order attached to a card, recorded in the POI system. --Rule: If the reversal is performed inside a customer order.") + protected String customerOrderID; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the poiData property. + * + * @return possible object is {@link POIData } + */ + public POIData getPOIData() { + return poiData; + } + + /** + * Sets the value of the poiData property. + * + * @param value allowed object is {@link POIData } + */ + public void setPOIData(POIData value) { + this.poiData = value; + } + + /** + * Gets the value of the originalPOITransaction property. + * + * @return possible object is {@link OriginalPOITransaction } + */ + public OriginalPOITransaction getOriginalPOITransaction() { + return originalPOITransaction; + } + + /** + * Sets the value of the originalPOITransaction property. + * + * @param value allowed object is {@link OriginalPOITransaction } + */ + public void setOriginalPOITransaction(OriginalPOITransaction value) { + this.originalPOITransaction = value; + } + + /** + * Gets the value of the paymentReceipt property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the paymentReceipt property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getPaymentReceipt().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link PaymentReceipt } + * + * @return the payment receipt + */ + public List getPaymentReceipt() { + if (paymentReceipt == null) { + paymentReceipt = new ArrayList<>(); + } + return this.paymentReceipt; + } + + /** + * Gets the value of the reversedAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getReversedAmount() { + return reversedAmount; + } + + /** + * Sets the value of the reversedAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setReversedAmount(BigDecimal value) { + this.reversedAmount = value; + } + + /** + * Gets the value of the customerOrderID property. + * + * @return possible object is {@link String } + */ + public String getCustomerOrderID() { + return customerOrderID; + } + + /** + * Sets the value of the customerOrderID property. + * + * @param value allowed object is {@link String } + */ + public void setCustomerOrderID(String value) { + this.customerOrderID = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SaleCapabilitiesType.java b/src/main/java/com/adyen/model/nexo/SaleCapabilitiesType.java new file mode 100644 index 000000000..3edaa06bd --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SaleCapabilitiesType.java @@ -0,0 +1,172 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for SaleCapabilitiesType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="SaleCapabilitiesType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="CashierStatus"/>
+ *     <enumeration value="CashierError"/>
+ *     <enumeration value="CashierDisplay"/>
+ *     <enumeration value="POIReplication"/>
+ *     <enumeration value="CashierInput"/>
+ *     <enumeration value="CustomerAssistance"/>
+ *     <enumeration value="CustomerDisplay"/>
+ *     <enumeration value="CustomerError"/>
+ *     <enumeration value="CustomerInput"/>
+ *     <enumeration value="PrinterReceipt"/>
+ *     <enumeration value="PrinterDocument"/>
+ *     <enumeration value="PrinterVoucher"/>
+ *     <enumeration value="MagStripe"/>
+ *     <enumeration value="ICC"/>
+ *     <enumeration value="EMVContactless"/>
+ *   </restriction>
+ * </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") + @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") + @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") + @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") + @Schema(description = "Information displayed on the Cardholder POI interface, replicated on the Cashier interface.") + POI_REPLICATION("POIReplication"), + + /** + * 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") + @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") + CASHIER_INPUT("CashierInput"), + + /** + * Input of the Cardholder POI interface which can be entered by the Cashier to assist the Customer. + */ + @XmlEnumValue("CustomerAssistance") + @Schema(description = "Input of the Cardholder POI interface which can be entered by the Cashier to assist the Customer.") + CUSTOMER_ASSISTANCE("CustomerAssistance"), + + /** + * 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") + @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.") + CUSTOMER_DISPLAY("CustomerDisplay"), + + /** + * To display to the Customer information is related to an error situation occurring on the Sale Terminal during a Sale transaction. + */ + @XmlEnumValue("CustomerError") + @Schema(description = "To display to the Customer information is related to an error situation occurring on the Sale Terminal during a Sale transaction.") + CUSTOMER_ERROR("CustomerError"), + + /** + * 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") + @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") + @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") + @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") + @Schema(description = "Coupons, voucher or special ticket generated by the POI and to be printed.") + PRINTER_VOUCHER("PrinterVoucher"), + + /** + * Magnetic stripe card reader + */ + @XmlEnumValue("MagStripe") + @Schema(description = "Magnetic stripe card reader") + MAG_STRIPE("MagStripe"), + + /** + * Contact ICC card reader + */ + ICC("ICC"), + + /** + * Contactless card reader with EMV applications + */ + @XmlEnumValue("EMVContactless") + @Schema(description = "Contactless card reader with EMV applications") + EMV_CONTACTLESS("EMVContactless"); + private final String value; + + SaleCapabilitiesType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value sale capabilities type. + * + * @param v the v + * @return the sale capabilities type + */ + public static SaleCapabilitiesType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SaleData.java b/src/main/java/com/adyen/model/nexo/SaleData.java new file mode 100644 index 000000000..3a310524c --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SaleData.java @@ -0,0 +1,398 @@ +package com.adyen.model.nexo; + +import com.adyen.model.terminal.SaleToAcquirerData; +import com.adyen.serializer.SaleToAcquirerDataSerializer; +import com.google.gson.annotations.JsonAdapter; +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Data related to the Sale System. -- Usage: Data associated to the Sale System, with a particular value during the processing of the payment by the POI, including the cards acquisition. + * + *

Java class for SaleData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SaleData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SaleTransactionID" type="{}TransactionIdentification"/>
+ *         <element name="SaleTerminalData" type="{}SaleTerminalData" minOccurs="0"/>
+ *         <element name="SponsoredMerchant" type="{}SponsoredMerchant" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="SaleToPOIData" type="{}SaleToPOIData" minOccurs="0"/>
+ *         <element name="SaleToAcquirerData" type="{}SaleToAcquirerData" minOccurs="0"/>
+ *         <element name="SaleToIssuerData" type="{}SaleToIssuerData" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="OperatorID" type="{}OperatorID" />
+ *       <attribute name="OperatorLanguage" type="{}ISOLanguage2A" />
+ *       <attribute name="ShiftNumber" type="{}ShiftNumber" />
+ *       <attribute name="SaleReferenceID" type="{}SaleReferenceID" />
+ *       <attribute name="TokenRequested" type="{}TokenRequestedType" />
+ *       <attribute name="CustomerOrderID" type="{}CustomerOrderID" />
+ *       <attribute name="CustomerOrderReq" type="{}CustomerOrderReq" />
+ *     </restriction>
+ *   </complexContent>
+ * </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) + @Schema(description = "Unique identification of a Sale transaction") + protected TransactionIdentification saleTransactionID; + /** + * The Sale terminal data. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "Sale information intended for the POI. --Rule: Stored with the transaction") + protected String saleToPOIData; + /** + * The Sale to acquirer data. + */ + @XmlElement(name = "SaleToAcquirerData") + @Schema(description = "Sale information intended for the Acquirer. --Rule: Send to the Acquirer if present") + @JsonAdapter(SaleToAcquirerDataSerializer.class) + protected SaleToAcquirerData saleToAcquirerData; + /** + * The Sale to issuer data. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "Language of the Cashier or Operator. --Rule: if different from the Login") + protected String operatorLanguage; + /** + * The Shift number. + */ + @XmlElement(name = "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") + @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") + @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") + @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") + @Schema(description = "List of customer orders must be sent in response message. --Rule: If customer orders must be listed in the response message.") + protected List customerOrderReq; + + public SaleData() { + saleToAcquirerData = new SaleToAcquirerData(); + } + + /** + * Gets the value of the saleTransactionID property. + * + * @return possible object is {@link TransactionIdentification } + */ + public TransactionIdentification getSaleTransactionID() { + return saleTransactionID; + } + + /** + * Sets the value of the saleTransactionID property. + * + * @param value allowed object is {@link TransactionIdentification } + */ + public void setSaleTransactionID(TransactionIdentification value) { + saleTransactionID = value; + } + + /** + * Gets the value of the saleTerminalData property. + * + * @return possible object is {@link SaleTerminalData } + */ + public SaleTerminalData getSaleTerminalData() { + return saleTerminalData; + } + + /** + * Sets the value of the saleTerminalData property. + * + * @param value allowed object is {@link SaleTerminalData } + */ + public void setSaleTerminalData(SaleTerminalData value) { + saleTerminalData = value; + } + + /** + * Gets the value of the sponsoredMerchant property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the sponsoredMerchant property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getSponsoredMerchant().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link SponsoredMerchant } + * + * @return the sponsored merchant + */ + public List getSponsoredMerchant() { + if (sponsoredMerchant == null) { + sponsoredMerchant = new ArrayList<>(); + } + return sponsoredMerchant; + } + + /** + * Gets the value of the saleToPOIData property. + * + * @return possible object is {@link String } + */ + public String getSaleToPOIData() { + return saleToPOIData; + } + + /** + * Sets the value of the saleToPOIData property. + * + * @param value allowed object is {@link String } + */ + public void setSaleToPOIData(String value) { + saleToPOIData = value; + } + + /** + * Gets the value of the saleToAcquirerData property. + * + * @return possible object is {@link String } + */ + public SaleToAcquirerData getSaleToAcquirerData() { + return saleToAcquirerData; + } + + /** + * Sets the value of the saleToAcquirerData property. + * + * @param value allowed object is {@link String } + */ + public void setSaleToAcquirerData(SaleToAcquirerData value) { + saleToAcquirerData = value; + } + + /** + * Gets the value of the saleToIssuerData property. + * + * @return possible object is {@link SaleToIssuerData } + */ + public SaleToIssuerData getSaleToIssuerData() { + return saleToIssuerData; + } + + /** + * Sets the value of the saleToIssuerData property. + * + * @param value allowed object is {@link SaleToIssuerData } + */ + public void setSaleToIssuerData(SaleToIssuerData value) { + saleToIssuerData = value; + } + + /** + * Gets the value of the operatorID property. + * + * @return possible object is {@link String } + */ + public String getOperatorID() { + return operatorID; + } + + /** + * Sets the value of the operatorID property. + * + * @param value allowed object is {@link String } + */ + public void setOperatorID(String value) { + operatorID = value; + } + + /** + * Gets the value of the operatorLanguage property. + * + * @return possible object is {@link String } + */ + public String getOperatorLanguage() { + return operatorLanguage; + } + + /** + * Sets the value of the operatorLanguage property. + * + * @param value allowed object is {@link String } + */ + public void setOperatorLanguage(String value) { + operatorLanguage = value; + } + + /** + * Gets the value of the shiftNumber property. + * + * @return possible object is {@link String } + */ + public String getShiftNumber() { + return shiftNumber; + } + + /** + * Sets the value of the shiftNumber property. + * + * @param value allowed object is {@link String } + */ + public void setShiftNumber(String value) { + shiftNumber = value; + } + + /** + * Gets the value of the saleReferenceID property. + * + * @return possible object is {@link String } + */ + public String getSaleReferenceID() { + return saleReferenceID; + } + + /** + * Sets the value of the saleReferenceID property. + * + * @param value allowed object is {@link String } + */ + public void setSaleReferenceID(String value) { + saleReferenceID = value; + } + + /** + * Gets the value of the tokenRequestedType property. + * + * @return possible object is {@link TokenRequestedType } + */ + public TokenRequestedType getTokenRequestedType() { + return tokenRequestedType; + } + + /** + * Sets the value of the tokenRequestedType property. + * + * @param value allowed object is {@link TokenRequestedType } + */ + public void setTokenRequestedType(TokenRequestedType value) { + tokenRequestedType = value; + } + + /** + * Gets the value of the customerOrderID property. + * + * @return possible object is {@link String } + */ + public String getCustomerOrderID() { + return customerOrderID; + } + + /** + * Sets the value of the customerOrderID property. + * + * @param value allowed object is {@link String } + */ + public void setCustomerOrderID(String value) { + customerOrderID = value; + } + + /** + * Gets the value of the customerOrderReq property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the customerOrderReq property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getCustomerOrderReq().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link CustomerOrderReqType } + * + * @return the customer order req + */ + public List getCustomerOrderReq() { + if (customerOrderReq == null) { + customerOrderReq = new ArrayList<>(); + } + return customerOrderReq; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SaleItem.java b/src/main/java/com/adyen/model/nexo/SaleItem.java new file mode 100644 index 000000000..5f0fcbfe5 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SaleItem.java @@ -0,0 +1,321 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; +import java.math.BigInteger; + + +/** + * Definition: Sale items of a transaction. -- Usage: In loyalty or value added payment card transaction, the items of the sale are entering in the processing of the transaction. The sum of the item amount could be more than the Requested amount in case of split payment without split of the + * + *

Java class for SaleItem complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SaleItem">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="UnitOfMeasure" type="{}UnitOfMeasureType" minOccurs="0"/>
+ *         <element name="Quantity" type="{}Quantity" minOccurs="0"/>
+ *         <element name="UnitPrice" type="{}SimpleAmountType" minOccurs="0"/>
+ *         <element name="TaxCode" type="{}TaxCode" minOccurs="0"/>
+ *         <element name="SaleChannel" type="{}SaleChannel" minOccurs="0"/>
+ *         <element name="ProductLabel" type="{}ProductLabel" minOccurs="0"/>
+ *         <element name="AdditionalProductInfo" type="{}AdditionalProductInfo" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="ItemID" use="required" type="{}ItemID" />
+ *       <attribute name="ProductCode" use="required" type="{}ProductCode" />
+ *       <attribute name="EanUpc" type="{}EanUpc" />
+ *       <attribute name="ItemAmount" use="required" type="{}SimpleAmountType" />
+ *     </restriction>
+ *   </complexContent>
+ * </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") + @Schema(description = "Unit of measure of a quantity --Rule: if Quantity present") + @XmlSchemaType(name = "string") + protected UnitOfMeasureType unitOfMeasure; + /** + * The Quantity. + */ + @XmlElement(name = "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") + @Schema(description = "Price per unit of product --Rule: if Quantity present") + protected BigDecimal unitPrice; + /** + * The Tax code. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "Product name of an item purchased with the transaction.") + protected String productLabel; + /** + * The Additional product info. + */ + @XmlElement(name = "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) + @Schema(description = "Item identification inside a transaction (0 to n).") + protected BigInteger itemID; + /** + * The Product code. + */ + @XmlElement(name = "ProductCode", required = true) + @Schema(description = "Product code of item purchased with the transaction.") + protected String productCode; + /** + * The Ean upc. + */ + @XmlElement(name = "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) + @Schema(description = "Total amount of the item line.") + protected BigDecimal itemAmount; + + /** + * Gets the value of the unitOfMeasure property. + * + * @return possible object is {@link UnitOfMeasureType } + */ + public UnitOfMeasureType getUnitOfMeasure() { + return unitOfMeasure; + } + + /** + * Sets the value of the unitOfMeasure property. + * + * @param value allowed object is {@link UnitOfMeasureType } + */ + public void setUnitOfMeasure(UnitOfMeasureType value) { + this.unitOfMeasure = value; + } + + /** + * Gets the value of the quantity property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getQuantity() { + return quantity; + } + + /** + * Sets the value of the quantity property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setQuantity(BigDecimal value) { + this.quantity = value; + } + + /** + * Gets the value of the unitPrice property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getUnitPrice() { + return unitPrice; + } + + /** + * Sets the value of the unitPrice property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setUnitPrice(BigDecimal value) { + this.unitPrice = value; + } + + /** + * Gets the value of the taxCode property. + * + * @return possible object is {@link String } + */ + public String getTaxCode() { + return taxCode; + } + + /** + * Sets the value of the taxCode property. + * + * @param value allowed object is {@link String } + */ + public void setTaxCode(String value) { + this.taxCode = value; + } + + /** + * Gets the value of the saleChannel property. + * + * @return possible object is {@link String } + */ + public String getSaleChannel() { + return saleChannel; + } + + /** + * Sets the value of the saleChannel property. + * + * @param value allowed object is {@link String } + */ + public void setSaleChannel(String value) { + this.saleChannel = value; + } + + /** + * Gets the value of the productLabel property. + * + * @return possible object is {@link String } + */ + public String getProductLabel() { + return productLabel; + } + + /** + * Sets the value of the productLabel property. + * + * @param value allowed object is {@link String } + */ + public void setProductLabel(String value) { + this.productLabel = value; + } + + /** + * Gets the value of the additionalProductInfo property. + * + * @return possible object is {@link String } + */ + public String getAdditionalProductInfo() { + return additionalProductInfo; + } + + /** + * Sets the value of the additionalProductInfo property. + * + * @param value allowed object is {@link String } + */ + public void setAdditionalProductInfo(String value) { + this.additionalProductInfo = value; + } + + /** + * Gets the value of the itemID property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getItemID() { + return itemID; + } + + /** + * Sets the value of the itemID property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setItemID(BigInteger value) { + this.itemID = value; + } + + /** + * Gets the value of the productCode property. + * + * @return possible object is {@link String } + */ + public String getProductCode() { + return productCode; + } + + /** + * Sets the value of the productCode property. + * + * @param value allowed object is {@link String } + */ + public void setProductCode(String value) { + this.productCode = value; + } + + /** + * Gets the value of the eanUpc property. + * + * @return possible object is {@link String } + */ + public String getEanUpc() { + return eanUpc; + } + + /** + * Sets the value of the eanUpc property. + * + * @param value allowed object is {@link String } + */ + public void setEanUpc(String value) { + this.eanUpc = value; + } + + /** + * Gets the value of the itemAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getItemAmount() { + return itemAmount; + } + + /** + * Sets the value of the itemAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setItemAmount(BigDecimal value) { + this.itemAmount = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SaleItemRebate.java b/src/main/java/com/adyen/model/nexo/SaleItemRebate.java new file mode 100644 index 000000000..24fdea439 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SaleItemRebate.java @@ -0,0 +1,217 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; +import java.math.BigInteger; + + +/** + * Definition: The awarded amount that is attached to an item as a rebate. -- Usage: To be differentiated from the award which is the amount or quantity earned on the loyalty account. + * + *

Java class for SaleItemRebate complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SaleItemRebate">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="UnitOfMeasure" type="{}UnitOfMeasureType" minOccurs="0"/>
+ *         <element name="Quantity" type="{}Quantity" minOccurs="0"/>
+ *         <element name="RebateLabel" type="{}RebateLabel" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="ItemID" use="required" type="{}ItemID" />
+ *       <attribute name="ProductCode" use="required" type="{}ProductCode" />
+ *       <attribute name="EanUpc" type="{}EanUpc" />
+ *       <attribute name="ItemAmount" type="{}SimpleAmountType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SaleItemRebate", propOrder = { + "unitOfMeasure", + "quantity", + "rebateLabel" +}) +public class SaleItemRebate { + + /** + * The Unit of measure. + */ + @XmlElement(name = "UnitOfMeasure") + @Schema(description = "Unit of measure of a quantity --Rule: if Quantity present") + @XmlSchemaType(name = "string") + protected UnitOfMeasureType unitOfMeasure; + /** + * The Quantity. + */ + @XmlElement(name = "Quantity") + @Schema(description = "Product quantity --Rule: if rebate is additional units") + protected BigDecimal quantity; + /** + * The Rebate label. + */ + @XmlElement(name = "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) + @Schema(description = "Item identification inside a transaction (0 to n).") + protected BigInteger itemID; + /** + * The Product code. + */ + @XmlElement(name = "ProductCode", required = true) + @Schema(description = "Product code of item purchased with the transaction.") + protected String productCode; + /** + * The Ean upc. + */ + @XmlElement(name = "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") + @Schema(description = "Total amount of the item line. --Rule: if rebate on the line item amount") + protected BigDecimal itemAmount; + + /** + * Gets the value of the unitOfMeasure property. + * + * @return possible object is {@link UnitOfMeasureType } + */ + public UnitOfMeasureType getUnitOfMeasure() { + return unitOfMeasure; + } + + /** + * Sets the value of the unitOfMeasure property. + * + * @param value allowed object is {@link UnitOfMeasureType } + */ + public void setUnitOfMeasure(UnitOfMeasureType value) { + this.unitOfMeasure = value; + } + + /** + * Gets the value of the quantity property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getQuantity() { + return quantity; + } + + /** + * Sets the value of the quantity property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setQuantity(BigDecimal value) { + this.quantity = value; + } + + /** + * Gets the value of the rebateLabel property. + * + * @return possible object is {@link String } + */ + public String getRebateLabel() { + return rebateLabel; + } + + /** + * Sets the value of the rebateLabel property. + * + * @param value allowed object is {@link String } + */ + public void setRebateLabel(String value) { + this.rebateLabel = value; + } + + /** + * Gets the value of the itemID property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getItemID() { + return itemID; + } + + /** + * Sets the value of the itemID property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setItemID(BigInteger value) { + this.itemID = value; + } + + /** + * Gets the value of the productCode property. + * + * @return possible object is {@link String } + */ + public String getProductCode() { + return productCode; + } + + /** + * Sets the value of the productCode property. + * + * @param value allowed object is {@link String } + */ + public void setProductCode(String value) { + this.productCode = value; + } + + /** + * Gets the value of the eanUpc property. + * + * @return possible object is {@link String } + */ + public String getEanUpc() { + return eanUpc; + } + + /** + * Sets the value of the eanUpc property. + * + * @param value allowed object is {@link String } + */ + public void setEanUpc(String value) { + this.eanUpc = value; + } + + /** + * Gets the value of the itemAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getItemAmount() { + return itemAmount; + } + + /** + * Sets the value of the itemAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setItemAmount(BigDecimal value) { + this.itemAmount = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SaleProfile.java b/src/main/java/com/adyen/model/nexo/SaleProfile.java new file mode 100644 index 000000000..997074618 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SaleProfile.java @@ -0,0 +1,105 @@ +package com.adyen.model.nexo; + +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.XmlList; +import javax.xml.bind.annotation.XmlType; +import java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Functional profile of the Sale Terminal. -- Usage: Sent in the Login Request to identify the functions that might be requested by the Sale Terminal during the session. The value of this data element contains: One of the generic profile: Basic, Standard or Extended, A list (possibly + * + *

Java class for SaleProfile complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SaleProfile">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ServiceProfiles" type="{}ServiceProfiles" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="GenericProfile" type="{}GenericProfileType" default="Standard" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SaleProfile", propOrder = { + "serviceProfiles" +}) +public class SaleProfile { + + /** + * The Service profiles. + */ + @XmlList + @XmlElement(name = "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") + @Schema(description = "Functional profile of the Sale to POI protocol.") + protected GenericProfileType genericProfile; + + /** + * Gets the value of the serviceProfiles property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the serviceProfiles property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getServiceProfiles().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link ServiceProfilesType } + * + * @return the service profiles + */ + public List getServiceProfiles() { + if (serviceProfiles == null) { + serviceProfiles = new ArrayList<>(); + } + return this.serviceProfiles; + } + + /** + * Gets the value of the genericProfile property. + * + * @return possible object is {@link GenericProfileType } + */ + public GenericProfileType getGenericProfile() { + if (genericProfile == null) { + return GenericProfileType.STANDARD; + } else { + return genericProfile; + } + } + + /** + * Sets the value of the genericProfile property. + * + * @param value allowed object is {@link GenericProfileType } + */ + public void setGenericProfile(GenericProfileType value) { + this.genericProfile = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SaleSoftware.java b/src/main/java/com/adyen/model/nexo/SaleSoftware.java new file mode 100644 index 000000000..1f98df617 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SaleSoftware.java @@ -0,0 +1,132 @@ +package com.adyen.model.nexo; + +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 protocol. -- Usage: Allows in a session to identify the product features of a Sale System. + * + *

Java class for SaleSoftware complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SaleSoftware">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="ManufacturerID" use="required" type="{}ManufacturerID" />
+ *       <attribute name="ApplicationName" use="required" type="{}ApplicationName" />
+ *       <attribute name="SoftwareVersion" use="required" type="{}SoftwareVersion" />
+ *       <attribute name="CertificationCode" use="required" type="{}CertificationCode" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SaleSoftware") +public class SaleSoftware { + + /** + * The Manufacturer id. + */ + @XmlElement(name = "ManufacturerID", required = true) + @Schema(description = "Identification of the Manufacturer") + protected String manufacturerID; + /** + * The Application name. + */ + @XmlElement(name = "ApplicationName", required = true) + @Schema(description = "Name of the software product.") + protected String applicationName; + /** + * The Software version. + */ + @XmlElement(name = "SoftwareVersion", required = true) + @Schema(description = "Version of the software product") + protected String softwareVersion; + /** + * The Certification code. + */ + @XmlElement(name = "CertificationCode", required = true) + @Schema(description = "Certification code of the software which manages the Sale to POI protocol.") + protected String certificationCode; + + /** + * Gets the value of the manufacturerID property. + * + * @return possible object is {@link String } + */ + public String getManufacturerID() { + return manufacturerID; + } + + /** + * Sets the value of the manufacturerID property. + * + * @param value allowed object is {@link String } + */ + public void setManufacturerID(String value) { + this.manufacturerID = value; + } + + /** + * Gets the value of the applicationName property. + * + * @return possible object is {@link String } + */ + public String getApplicationName() { + return applicationName; + } + + /** + * Sets the value of the applicationName property. + * + * @param value allowed object is {@link String } + */ + public void setApplicationName(String value) { + this.applicationName = value; + } + + /** + * Gets the value of the softwareVersion property. + * + * @return possible object is {@link String } + */ + public String getSoftwareVersion() { + return softwareVersion; + } + + /** + * Sets the value of the softwareVersion property. + * + * @param value allowed object is {@link String } + */ + public void setSoftwareVersion(String value) { + this.softwareVersion = value; + } + + /** + * Gets the value of the certificationCode property. + * + * @return possible object is {@link String } + */ + public String getCertificationCode() { + return certificationCode; + } + + /** + * Sets the value of the certificationCode property. + * + * @param value allowed object is {@link String } + */ + public void setCertificationCode(String value) { + this.certificationCode = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SaleTerminalData.java b/src/main/java/com/adyen/model/nexo/SaleTerminalData.java new file mode 100644 index 000000000..84529eccd --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SaleTerminalData.java @@ -0,0 +1,152 @@ +package com.adyen.model.nexo; + +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.XmlList; +import javax.xml.bind.annotation.XmlType; +import java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Information related to the software and hardware feature of the Sale Terminal. -- Usage: In the Login Request, if a Sale Terminal is involved in the login. In other messages, when a logical device is out of order (SaleCapabilites), or when the other data have changed since or were not in the Login. + * + *

Java class for SaleTerminalData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SaleTerminalData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SaleCapabilities" type="{}SaleCapabilities" minOccurs="0"/>
+ *         <element name="SaleProfile" type="{}SaleProfile" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="TerminalEnvironment" type="{}TerminalEnvironmentType" />
+ *       <attribute name="TotalsGroupID" type="{}TotalsGroupID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SaleTerminalData", propOrder = { + "saleCapabilities", + "saleProfile" +}) +public class SaleTerminalData { + + /** + * The Sale capabilities. + */ + @XmlList + @XmlElement(name = "SaleCapabilities") + @Schema(description = "Hardware capabilities of the Sale Terminal.") + protected List saleCapabilities; + /** + * The Sale profile. + */ + @XmlElement(name = "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") + @Schema(description = "Environment of the Terminal.") + protected TerminalEnvironmentType terminalEnvironment; + /** + * The Totals group id. + */ + @XmlElement(name = "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.") + protected String totalsGroupID; + + /** + * Gets the value of the saleCapabilities property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the saleCapabilities property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getSaleCapabilities().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link SaleCapabilitiesType } + * + * @return the sale capabilities + */ + public List getSaleCapabilities() { + if (saleCapabilities == null) { + saleCapabilities = new ArrayList<>(); + } + return this.saleCapabilities; + } + + /** + * Gets the value of the saleProfile property. + * + * @return possible object is {@link SaleProfile } + */ + public SaleProfile getSaleProfile() { + return saleProfile; + } + + /** + * Sets the value of the saleProfile property. + * + * @param value allowed object is {@link SaleProfile } + */ + public void setSaleProfile(SaleProfile value) { + this.saleProfile = value; + } + + /** + * Gets the value of the terminalEnvironment property. + * + * @return possible object is {@link TerminalEnvironmentType } + */ + public TerminalEnvironmentType getTerminalEnvironment() { + return terminalEnvironment; + } + + /** + * Sets the value of the terminalEnvironment property. + * + * @param value allowed object is {@link TerminalEnvironmentType } + */ + public void setTerminalEnvironment(TerminalEnvironmentType value) { + this.terminalEnvironment = value; + } + + /** + * Gets the value of the totalsGroupID property. + * + * @return possible object is {@link String } + */ + public String getTotalsGroupID() { + return totalsGroupID; + } + + /** + * Sets the value of the totalsGroupID property. + * + * @param value allowed object is {@link String } + */ + public void setTotalsGroupID(String value) { + this.totalsGroupID = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SaleToIssuerData.java b/src/main/java/com/adyen/model/nexo/SaleToIssuerData.java new file mode 100644 index 000000000..1fb317e9e --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SaleToIssuerData.java @@ -0,0 +1,61 @@ +package com.adyen.model.nexo; + +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 information and sends it to the Acquirer for the Issuer without any change. + * + *

Java class for SaleToIssuerData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SaleToIssuerData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="StatementReference" type="{}StatementReference" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SaleToIssuerData", propOrder = { + "statementReference" +}) +public class SaleToIssuerData { + + /** + * The Statement reference. + */ + @XmlElement(name = "StatementReference") + @Schema(description = "Label to print on the bank statement. --Rule: Information to print on the bank statement") + protected String statementReference; + + /** + * Gets the value of the statementReference property. + * + * @return possible object is {@link String } + */ + public String getStatementReference() { + return statementReference; + } + + /** + * Sets the value of the statementReference property. + * + * @param value allowed object is {@link String } + */ + public void setStatementReference(String value) { + this.statementReference = value; + } + +} diff --git a/src/main/java/com/adyen/terminal/SaleToPOIRequest.java b/src/main/java/com/adyen/model/nexo/SaleToPOIRequest.java similarity index 51% rename from src/main/java/com/adyen/terminal/SaleToPOIRequest.java rename to src/main/java/com/adyen/model/nexo/SaleToPOIRequest.java index c636081d3..e588bf0be 100644 --- a/src/main/java/com/adyen/terminal/SaleToPOIRequest.java +++ b/src/main/java/com/adyen/model/nexo/SaleToPOIRequest.java @@ -1,182 +1,275 @@ -package com.adyen.terminal; - -import com.adyen.model.terminal.AbortRequest; -import com.adyen.model.terminal.AdminRequest; -import com.adyen.model.terminal.BalanceInquiryRequest; -import com.adyen.model.terminal.CardAcquisitionRequest; -import com.adyen.model.terminal.CardReaderAPDURequest; -import com.adyen.model.terminal.DiagnosisRequest; -import com.adyen.model.terminal.DisplayRequest; -import com.adyen.model.terminal.EnableServiceRequest; -import com.adyen.model.terminal.EventNotification; -import com.adyen.model.terminal.GetTotalsRequest; -import com.adyen.model.terminal.InputRequest; -import com.adyen.model.terminal.JSON; -import com.adyen.model.terminal.LoginRequest; -import com.adyen.model.terminal.LogoutRequest; -import com.adyen.model.terminal.LoyaltyRequest; -import com.adyen.model.terminal.MessageHeader; - -import com.adyen.model.terminal.PaymentRequest; -import com.adyen.model.terminal.PrintRequest; -import com.adyen.model.terminal.ReconciliationRequest; -import com.adyen.model.terminal.ReversalRequest; -import com.adyen.model.terminal.SecurityTrailer; -import com.adyen.model.terminal.StoredValueRequest; -import com.adyen.model.terminal.TransactionStatusRequest; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -@ApiModel(description = "SaleToPoiRequest") -@JsonPropertyOrder({ - SaleToPOIRequest.JSON_PROPERTY_MESSAGE_HEADER, - SaleToPOIRequest.JSON_PROPERTY_ABORT_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_BALANCE_INQUIRY_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_CARD_ACQUISITION_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_ADMIN_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_DIAGNOSIS_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_DISPLAY_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_ENABLE_SERVICE_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_EVENT_NOTIFICATION, - SaleToPOIRequest.JSON_PROPERTY_GET_TOTALS_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_INPUT_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_LOGIN_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_LOGOUT_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_LOYALTY_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_PAYMENT_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_PRINT_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_CARD_READER_APDU_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_RECONCILIATION_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_REVERSAL_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_STORED_VALUE_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_TRANSACTION_STATUS_REQUEST, - SaleToPOIRequest.JSON_PROPERTY_SECURITY_TRAILER +package com.adyen.model.nexo; + +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. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MessageHeader" type="{}MessageHeader"/>
+ *         <choice>
+ *           <element name="AbortRequest" type="{}AbortRequest"/>
+ *           <element name="BalanceInquiryRequest" type="{}BalanceInquiryRequest"/>
+ *           <element name="BatchRequest" type="{}BatchRequest"/>
+ *           <element name="CardAcquisitionRequest" type="{}CardAcquisitionRequest"/>
+ *           <element name="AdminRequest" type="{}AdminRequest"/>
+ *           <element name="DiagnosisRequest" type="{}DiagnosisRequest"/>
+ *           <element name="DisplayRequest" type="{}DisplayRequest"/>
+ *           <element name="EnableServiceRequest" type="{}EnableServiceRequest"/>
+ *           <element name="EventNotification" type="{}EventNotification"/>
+ *           <element name="GetTotalsRequest" type="{}GetTotalsRequest"/>
+ *           <element name="InputRequest" type="{}InputRequest"/>
+ *           <element name="InputUpdate" type="{}InputUpdate"/>
+ *           <element name="LoginRequest" type="{}LoginRequest"/>
+ *           <element name="LogoutRequest" type="{}LogoutRequest"/>
+ *           <element name="LoyaltyRequest" type="{}LoyaltyRequest"/>
+ *           <element name="PaymentRequest" type="{}PaymentRequest"/>
+ *           <element name="PINRequest" type="{}PINRequest"/>
+ *           <element name="PrintRequest" type="{}PrintRequest"/>
+ *           <element name="CardReaderInitRequest" type="{}CardReaderInitRequest"/>
+ *           <element name="CardReaderAPDURequest" type="{}CardReaderAPDURequest"/>
+ *           <element name="CardReaderPowerOffRequest" type="{}CardReaderPowerOffRequest"/>
+ *           <element name="ReconciliationRequest" type="{}ReconciliationRequest"/>
+ *           <element name="ReversalRequest" type="{}ReversalRequest"/>
+ *           <element name="SoundRequest" type="{}SoundRequest"/>
+ *           <element name="StoredValueRequest" type="{}StoredValueRequest"/>
+ *           <element name="TransactionStatusRequest" type="{}TransactionStatusRequest"/>
+ *           <element name="TransmitRequest" type="{}TransmitRequest"/>
+ *         </choice>
+ *         <element name="SecurityTrailer" type="{}ContentInformation" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </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. */ - public static final String JSON_PROPERTY_MESSAGE_HEADER = "MessageHeader"; + @XmlElement(name = "MessageHeader", required = true) protected MessageHeader messageHeader; /** * The Abort request. */ - public static final String JSON_PROPERTY_ABORT_REQUEST = "AbortRequest"; + @XmlElement(name = "AbortRequest") + @Schema(description = "Body of the Abort Request message.") protected AbortRequest abortRequest; /** * The Balance inquiry request. */ - public static final String JSON_PROPERTY_BALANCE_INQUIRY_REQUEST = "BalanceInquiryRequest"; + @XmlElement(name = "BalanceInquiryRequest") + @Schema(description = "Content of the Balance Inquiry Request message.") protected BalanceInquiryRequest balanceInquiryRequest; + /** + * The Batch request. + */ + @XmlElement(name = "BatchRequest") + @Schema(description = "Content of the Batch Request message.") + protected BatchRequest batchRequest; /** * The Card acquisition request. */ - public static final String JSON_PROPERTY_CARD_ACQUISITION_REQUEST = "CardAcquisitionRequest"; + @XmlElement(name = "CardAcquisitionRequest") + @Schema(description = "Content of the Card Acquisition Request message.") protected CardAcquisitionRequest cardAcquisitionRequest; /** * The Admin request. */ - public static final String JSON_PROPERTY_ADMIN_REQUEST = "AdminRequest"; + @XmlElement(name = "AdminRequest") + @Schema(description = "Content of the Custom Admin Request message.") protected AdminRequest adminRequest; /** * The Diagnosis request. */ - public static final String JSON_PROPERTY_DIAGNOSIS_REQUEST = "DiagnosisRequest"; + @XmlElement(name = "DiagnosisRequest") + @Schema(description = "Content of the Diagnosis Request message.") protected DiagnosisRequest diagnosisRequest; /** * The Display request. */ - public static final String JSON_PROPERTY_DISPLAY_REQUEST = "DisplayRequest"; + @XmlElement(name = "DisplayRequest") + @Schema(description = "Content of the Display Request message.") protected DisplayRequest displayRequest; /** * The Enable service request. */ - public static final String JSON_PROPERTY_ENABLE_SERVICE_REQUEST = "EnableServiceRequest"; + @XmlElement(name = "EnableServiceRequest") + @Schema(description = "Content of the Enable Service Request message.") protected EnableServiceRequest enableServiceRequest; /** * The Event notification. */ - public static final String JSON_PROPERTY_EVENT_NOTIFICATION = "EventNotification"; + @XmlElement(name = "EventNotification") + @Schema(description = "Content of the EventNotification message.") protected EventNotification eventNotification; /** * The Get totals request. */ - public static final String JSON_PROPERTY_GET_TOTALS_REQUEST = "GetTotalsRequest"; + @XmlElement(name = "GetTotalsRequest") + @Schema(description = "Content of the Get Totals Request message.") protected GetTotalsRequest getTotalsRequest; /** * The Input request. */ - public static final String JSON_PROPERTY_INPUT_REQUEST = "InputRequest"; + @XmlElement(name = "InputRequest") + @Schema(description = "Content of the Input Request message.") protected InputRequest inputRequest; + /** + * The Input update. + */ + @XmlElement(name = "InputUpdate") + @Schema(description = "Content of the Input Update message.") + protected InputUpdate inputUpdate; /** * The Login request. */ - public static final String JSON_PROPERTY_LOGIN_REQUEST = "LoginRequest"; + @XmlElement(name = "LoginRequest") + @Schema(description = "Content of the Login Request message.") protected LoginRequest loginRequest; /** * The Logout request. */ - public static final String JSON_PROPERTY_LOGOUT_REQUEST = "LogoutRequest"; + @XmlElement(name = "LogoutRequest") + @Schema(description = "Content of the Logout Request message.") protected LogoutRequest logoutRequest; /** * The Loyalty request. */ - public static final String JSON_PROPERTY_LOYALTY_REQUEST = "LoyaltyRequest"; + @XmlElement(name = "LoyaltyRequest") + @Schema(description = "Content of the Loyalty Request message.") protected LoyaltyRequest loyaltyRequest; /** * The Payment request. */ - public static final String JSON_PROPERTY_PAYMENT_REQUEST = "PaymentRequest"; + @XmlElement(name = "PaymentRequest") + @Schema(description = "Content of the Payment Request message.") protected PaymentRequest paymentRequest; + /** + * The Pin request. + */ + @XmlElement(name = "PINRequest") + @Schema(description = "Content of the PIN Request message.") + protected PINRequest pinRequest; /** * The Print request. */ - public static final String JSON_PROPERTY_PRINT_REQUEST = "PrintRequest"; + @XmlElement(name = "PrintRequest") + @Schema(description = "Content of the Print Request message.") protected PrintRequest printRequest; + /** + * The Card reader init request. + */ + @XmlElement(name = "CardReaderInitRequest") + @Schema(description = "Content of the Card Reader Init Request message.") + protected CardReaderInitRequest cardReaderInitRequest; /** * The Card reader apdu request. */ - public static final String JSON_PROPERTY_CARD_READER_APDU_REQUEST = "CardReaderAPDURequest"; + @XmlElement(name = "CardReaderAPDURequest") + @Schema(description = "Content of the Card Reader APDU Request message.") protected CardReaderAPDURequest cardReaderAPDURequest; + /** + * The Card reader power off request. + */ + @XmlElement(name = "CardReaderPowerOffRequest") + @Schema(description = "Content of the Card Reader Power-Off Request message.") + protected CardReaderPowerOffRequest cardReaderPowerOffRequest; /** * The Reconciliation request. */ - public static final String JSON_PROPERTY_RECONCILIATION_REQUEST = "ReconciliationRequest"; + @XmlElement(name = "ReconciliationRequest") + @Schema(description = "Content of the Reconciliation Request message.") protected ReconciliationRequest reconciliationRequest; /** * The Reversal request. */ - public static final String JSON_PROPERTY_REVERSAL_REQUEST = "ReversalRequest"; + @XmlElement(name = "ReversalRequest") + @Schema(description = "Content of the Reversal Request message.") protected ReversalRequest reversalRequest; + /** + * The Sound request. + */ + @XmlElement(name = "SoundRequest") + @Schema(description = "Content of the Sound Request message.") + protected SoundRequest soundRequest; /** * The Stored value request. */ - public static final String JSON_PROPERTY_STORED_VALUE_REQUEST = "StoredValueRequest"; + @XmlElement(name = "StoredValueRequest") + @Schema(description = "Content of the Stored Value Request message.") protected StoredValueRequest storedValueRequest; /** * The Transaction status request. */ - public static final String JSON_PROPERTY_TRANSACTION_STATUS_REQUEST = "TransactionStatusRequest"; + @XmlElement(name = "TransactionStatusRequest") + @Schema(description = "Content of the TransactionStatus Request message.") protected TransactionStatusRequest transactionStatusRequest; + /** + * The Transmit request. + */ + @XmlElement(name = "TransmitRequest") + @Schema(description = "Content of the Transmit Request message.") + protected TransmitRequest transmitRequest; /** * The Security trailer. */ - public static final String JSON_PROPERTY_SECURITY_TRAILER = "SecurityTrailer"; - protected SecurityTrailer securityTrailer; + @XmlElement(name = "SecurityTrailer") + @Schema(description = "Protection of the whole message") + protected ContentInformation securityTrailer; /** * Gets the value of the messageHeader property. * * @return possible object is {@link MessageHeader } */ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_MESSAGE_HEADER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public MessageHeader getMessageHeader() { return messageHeader; } @@ -186,8 +279,6 @@ public MessageHeader getMessageHeader() { * * @param value allowed object is {@link MessageHeader } */ - @JsonProperty(JSON_PROPERTY_MESSAGE_HEADER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setMessageHeader(MessageHeader value) { this.messageHeader = value; } @@ -197,9 +288,6 @@ public void setMessageHeader(MessageHeader value) { * * @return possible object is {@link AbortRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_ABORT_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public AbortRequest getAbortRequest() { return abortRequest; } @@ -209,8 +297,6 @@ public AbortRequest getAbortRequest() { * * @param value allowed object is {@link AbortRequest } */ - @JsonProperty(JSON_PROPERTY_ABORT_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setAbortRequest(AbortRequest value) { this.abortRequest = value; } @@ -220,9 +306,6 @@ public void setAbortRequest(AbortRequest value) { * * @return possible object is {@link BalanceInquiryRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_BALANCE_INQUIRY_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public BalanceInquiryRequest getBalanceInquiryRequest() { return balanceInquiryRequest; } @@ -232,20 +315,33 @@ public BalanceInquiryRequest getBalanceInquiryRequest() { * * @param value allowed object is {@link BalanceInquiryRequest } */ - @JsonProperty(JSON_PROPERTY_BALANCE_INQUIRY_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setBalanceInquiryRequest(BalanceInquiryRequest value) { this.balanceInquiryRequest = value; } + /** + * Gets the value of the batchRequest property. + * + * @return possible object is {@link BatchRequest } + */ + public BatchRequest getBatchRequest() { + return batchRequest; + } + + /** + * Sets the value of the batchRequest property. + * + * @param value allowed object is {@link BatchRequest } + */ + public void setBatchRequest(BatchRequest value) { + this.batchRequest = value; + } + /** * Gets the value of the cardAcquisitionRequest property. * * @return possible object is {@link CardAcquisitionRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_CARD_ACQUISITION_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public CardAcquisitionRequest getCardAcquisitionRequest() { return cardAcquisitionRequest; } @@ -255,8 +351,6 @@ public CardAcquisitionRequest getCardAcquisitionRequest() { * * @param value allowed object is {@link CardAcquisitionRequest } */ - @JsonProperty(JSON_PROPERTY_CARD_ACQUISITION_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setCardAcquisitionRequest(CardAcquisitionRequest value) { this.cardAcquisitionRequest = value; } @@ -266,9 +360,6 @@ public void setCardAcquisitionRequest(CardAcquisitionRequest value) { * * @return possible object is {@link AdminRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_ADMIN_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public AdminRequest getAdminRequest() { return adminRequest; } @@ -278,8 +369,6 @@ public AdminRequest getAdminRequest() { * * @param value allowed object is {@link AdminRequest } */ - @JsonProperty(JSON_PROPERTY_ADMIN_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setAdminRequest(AdminRequest value) { this.adminRequest = value; } @@ -289,9 +378,6 @@ public void setAdminRequest(AdminRequest value) { * * @return possible object is {@link DiagnosisRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_DIAGNOSIS_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public DiagnosisRequest getDiagnosisRequest() { return diagnosisRequest; } @@ -301,8 +387,6 @@ public DiagnosisRequest getDiagnosisRequest() { * * @param value allowed object is {@link DiagnosisRequest } */ - @JsonProperty(JSON_PROPERTY_DIAGNOSIS_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setDiagnosisRequest(DiagnosisRequest value) { this.diagnosisRequest = value; } @@ -312,9 +396,6 @@ public void setDiagnosisRequest(DiagnosisRequest value) { * * @return possible object is {@link DisplayRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_DISPLAY_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public DisplayRequest getDisplayRequest() { return displayRequest; } @@ -324,8 +405,6 @@ public DisplayRequest getDisplayRequest() { * * @param value allowed object is {@link DisplayRequest } */ - @JsonProperty(JSON_PROPERTY_DISPLAY_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setDisplayRequest(DisplayRequest value) { this.displayRequest = value; } @@ -335,9 +414,6 @@ public void setDisplayRequest(DisplayRequest value) { * * @return possible object is {@link EnableServiceRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_ENABLE_SERVICE_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public EnableServiceRequest getEnableServiceRequest() { return enableServiceRequest; } @@ -347,8 +423,6 @@ public EnableServiceRequest getEnableServiceRequest() { * * @param value allowed object is {@link EnableServiceRequest } */ - @JsonProperty(JSON_PROPERTY_ENABLE_SERVICE_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setEnableServiceRequest(EnableServiceRequest value) { this.enableServiceRequest = value; } @@ -358,9 +432,6 @@ public void setEnableServiceRequest(EnableServiceRequest value) { * * @return possible object is {@link EventNotification } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_EVENT_NOTIFICATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public EventNotification getEventNotification() { return eventNotification; } @@ -370,8 +441,6 @@ public EventNotification getEventNotification() { * * @param value allowed object is {@link EventNotification } */ - @JsonProperty(JSON_PROPERTY_EVENT_NOTIFICATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setEventNotification(EventNotification value) { this.eventNotification = value; } @@ -381,9 +450,6 @@ public void setEventNotification(EventNotification value) { * * @return possible object is {@link GetTotalsRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_GET_TOTALS_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public GetTotalsRequest getGetTotalsRequest() { return getTotalsRequest; } @@ -393,8 +459,6 @@ public GetTotalsRequest getGetTotalsRequest() { * * @param value allowed object is {@link GetTotalsRequest } */ - @JsonProperty(JSON_PROPERTY_GET_TOTALS_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setGetTotalsRequest(GetTotalsRequest value) { this.getTotalsRequest = value; } @@ -404,9 +468,6 @@ public void setGetTotalsRequest(GetTotalsRequest value) { * * @return possible object is {@link InputRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_INPUT_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public InputRequest getInputRequest() { return inputRequest; } @@ -416,20 +477,33 @@ public InputRequest getInputRequest() { * * @param value allowed object is {@link InputRequest } */ - @JsonProperty(JSON_PROPERTY_INPUT_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setInputRequest(InputRequest value) { this.inputRequest = value; } + /** + * Gets the value of the inputUpdate property. + * + * @return possible object is {@link InputUpdate } + */ + public InputUpdate getInputUpdate() { + return inputUpdate; + } + + /** + * Sets the value of the inputUpdate property. + * + * @param value allowed object is {@link InputUpdate } + */ + public void setInputUpdate(InputUpdate value) { + this.inputUpdate = value; + } + /** * Gets the value of the loginRequest property. * * @return possible object is {@link LoginRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_LOGIN_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public LoginRequest getLoginRequest() { return loginRequest; } @@ -439,8 +513,6 @@ public LoginRequest getLoginRequest() { * * @param value allowed object is {@link LoginRequest } */ - @JsonProperty(JSON_PROPERTY_LOGIN_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setLoginRequest(LoginRequest value) { this.loginRequest = value; } @@ -450,9 +522,6 @@ public void setLoginRequest(LoginRequest value) { * * @return possible object is {@link LogoutRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_LOGOUT_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public LogoutRequest getLogoutRequest() { return logoutRequest; } @@ -462,8 +531,6 @@ public LogoutRequest getLogoutRequest() { * * @param value allowed object is {@link LogoutRequest } */ - @JsonProperty(JSON_PROPERTY_LOGOUT_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setLogoutRequest(LogoutRequest value) { this.logoutRequest = value; } @@ -473,9 +540,6 @@ public void setLogoutRequest(LogoutRequest value) { * * @return possible object is {@link LoyaltyRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public LoyaltyRequest getLoyaltyRequest() { return loyaltyRequest; } @@ -485,8 +549,6 @@ public LoyaltyRequest getLoyaltyRequest() { * * @param value allowed object is {@link LoyaltyRequest } */ - @JsonProperty(JSON_PROPERTY_LOYALTY_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setLoyaltyRequest(LoyaltyRequest value) { this.loyaltyRequest = value; } @@ -496,9 +558,6 @@ public void setLoyaltyRequest(LoyaltyRequest value) { * * @return possible object is {@link PaymentRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public PaymentRequest getPaymentRequest() { return paymentRequest; } @@ -508,20 +567,33 @@ public PaymentRequest getPaymentRequest() { * * @param value allowed object is {@link PaymentRequest } */ - @JsonProperty(JSON_PROPERTY_PAYMENT_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setPaymentRequest(PaymentRequest value) { this.paymentRequest = value; } + /** + * Gets the value of the pinRequest property. + * + * @return possible object is {@link PINRequest } + */ + public PINRequest getPINRequest() { + return pinRequest; + } + + /** + * Sets the value of the pinRequest property. + * + * @param value allowed object is {@link PINRequest } + */ + public void setPINRequest(PINRequest value) { + this.pinRequest = value; + } + /** * Gets the value of the printRequest property. * * @return possible object is {@link PrintRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_PRINT_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public PrintRequest getPrintRequest() { return printRequest; } @@ -531,20 +603,33 @@ public PrintRequest getPrintRequest() { * * @param value allowed object is {@link PrintRequest } */ - @JsonProperty(JSON_PROPERTY_PRINT_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setPrintRequest(PrintRequest value) { this.printRequest = value; } + /** + * Gets the value of the cardReaderInitRequest property. + * + * @return possible object is {@link CardReaderInitRequest } + */ + public CardReaderInitRequest getCardReaderInitRequest() { + return cardReaderInitRequest; + } + + /** + * Sets the value of the cardReaderInitRequest property. + * + * @param value allowed object is {@link CardReaderInitRequest } + */ + public void setCardReaderInitRequest(CardReaderInitRequest value) { + this.cardReaderInitRequest = value; + } + /** * Gets the value of the cardReaderAPDURequest property. * * @return possible object is {@link CardReaderAPDURequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_CARD_READER_APDU_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public CardReaderAPDURequest getCardReaderAPDURequest() { return cardReaderAPDURequest; } @@ -554,20 +639,33 @@ public CardReaderAPDURequest getCardReaderAPDURequest() { * * @param value allowed object is {@link CardReaderAPDURequest } */ - @JsonProperty(JSON_PROPERTY_CARD_READER_APDU_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setCardReaderAPDURequest(CardReaderAPDURequest value) { this.cardReaderAPDURequest = value; } + /** + * Gets the value of the cardReaderPowerOffRequest property. + * + * @return possible object is {@link CardReaderPowerOffRequest } + */ + public CardReaderPowerOffRequest getCardReaderPowerOffRequest() { + return cardReaderPowerOffRequest; + } + + /** + * Sets the value of the cardReaderPowerOffRequest property. + * + * @param value allowed object is {@link CardReaderPowerOffRequest } + */ + public void setCardReaderPowerOffRequest(CardReaderPowerOffRequest value) { + this.cardReaderPowerOffRequest = value; + } + /** * Gets the value of the reconciliationRequest property. * * @return possible object is {@link ReconciliationRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_RECONCILIATION_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public ReconciliationRequest getReconciliationRequest() { return reconciliationRequest; } @@ -577,8 +675,6 @@ public ReconciliationRequest getReconciliationRequest() { * * @param value allowed object is {@link ReconciliationRequest } */ - @JsonProperty(JSON_PROPERTY_RECONCILIATION_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setReconciliationRequest(ReconciliationRequest value) { this.reconciliationRequest = value; } @@ -588,9 +684,6 @@ public void setReconciliationRequest(ReconciliationRequest value) { * * @return possible object is {@link ReversalRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_REVERSAL_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public ReversalRequest getReversalRequest() { return reversalRequest; } @@ -600,20 +693,33 @@ public ReversalRequest getReversalRequest() { * * @param value allowed object is {@link ReversalRequest } */ - @JsonProperty(JSON_PROPERTY_REVERSAL_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setReversalRequest(ReversalRequest value) { this.reversalRequest = value; } + /** + * Gets the value of the soundRequest property. + * + * @return possible object is {@link SoundRequest } + */ + public SoundRequest getSoundRequest() { + return soundRequest; + } + + /** + * Sets the value of the soundRequest property. + * + * @param value allowed object is {@link SoundRequest } + */ + public void setSoundRequest(SoundRequest value) { + this.soundRequest = value; + } + /** * Gets the value of the storedValueRequest property. * * @return possible object is {@link StoredValueRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_STORED_VALUE_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public StoredValueRequest getStoredValueRequest() { return storedValueRequest; } @@ -623,8 +729,6 @@ public StoredValueRequest getStoredValueRequest() { * * @param value allowed object is {@link StoredValueRequest } */ - @JsonProperty(JSON_PROPERTY_STORED_VALUE_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setStoredValueRequest(StoredValueRequest value) { this.storedValueRequest = value; } @@ -634,9 +738,6 @@ public void setStoredValueRequest(StoredValueRequest value) { * * @return possible object is {@link TransactionStatusRequest } */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_TRANSACTION_STATUS_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public TransactionStatusRequest getTransactionStatusRequest() { return transactionStatusRequest; } @@ -646,53 +747,44 @@ public TransactionStatusRequest getTransactionStatusRequest() { * * @param value allowed object is {@link TransactionStatusRequest } */ - @JsonProperty(JSON_PROPERTY_TRANSACTION_STATUS_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setTransactionStatusRequest(TransactionStatusRequest value) { this.transactionStatusRequest = value; } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SaleToPOIRequest {\n"); - try { - sb.append(" saleToPOIRequest: ").append(toIndentedString(this.toJson())).append("\n"); - } catch (JsonProcessingException e) { - sb.append("Error: Could not serialize saleToPOIRequest"); - } - sb.append("}"); - return sb.toString(); + /** + * Gets the value of the transmitRequest property. + * + * @return possible object is {@link TransmitRequest } + */ + public TransmitRequest getTransmitRequest() { + return transmitRequest; } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Sets the value of the transmitRequest property. + * + * @param value allowed object is {@link TransmitRequest } */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + public void setTransmitRequest(TransmitRequest value) { + this.transmitRequest = value; } /** - * Create an instance of SaleToPOIRequest given an JSON string + * Gets the value of the securityTrailer property. * - * @param jsonString JSON string - * @return An instance of AbortRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to AbortRequest + * @return possible object is {@link ContentInformation } */ - public static SaleToPOIRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, SaleToPOIRequest.class); + public ContentInformation getSecurityTrailer() { + return securityTrailer; } /** - * Convert an instance of SaleToPOIRequest to an JSON string + * Sets the value of the securityTrailer property. * - * @return JSON string + * @param value allowed object is {@link ContentInformation } */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); + public void setSecurityTrailer(ContentInformation value) { + this.securityTrailer = value; } + } diff --git a/src/main/java/com/adyen/model/nexo/SaleToPOIResponse.java b/src/main/java/com/adyen/model/nexo/SaleToPOIResponse.java new file mode 100644 index 000000000..f2c66a239 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SaleToPOIResponse.java @@ -0,0 +1,712 @@ +package com.adyen.model.nexo; + +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. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MessageHeader" type="{}MessageHeader"/>
+ *         <choice>
+ *           <element name="BalanceInquiryResponse" type="{}BalanceInquiryResponse"/>
+ *           <element name="BatchResponse" type="{}BatchResponse"/>
+ *           <element name="CardAcquisitionResponse" type="{}CardAcquisitionResponse"/>
+ *           <element name="AdminResponse" type="{}AdminResponse"/>
+ *           <element name="DiagnosisResponse" type="{}DiagnosisResponse"/>
+ *           <element name="DisplayResponse" type="{}DisplayResponse"/>
+ *           <element name="EnableServiceResponse" type="{}EnableServiceResponse"/>
+ *           <element name="GetTotalsResponse" type="{}GetTotalsResponse"/>
+ *           <element name="InputResponse" type="{}InputResponse"/>
+ *           <element name="LoginResponse" type="{}LoginResponse"/>
+ *           <element name="LogoutResponse" type="{}LogoutResponse"/>
+ *           <element name="LoyaltyResponse" type="{}LoyaltyResponse"/>
+ *           <element name="PaymentResponse" type="{}PaymentResponse"/>
+ *           <element name="PINResponse" type="{}PINResponse"/>
+ *           <element name="PrintResponse" type="{}PrintResponse"/>
+ *           <element name="CardReaderInitResponse" type="{}CardReaderInitResponse"/>
+ *           <element name="CardReaderAPDUResponse" type="{}CardReaderAPDUResponse"/>
+ *           <element name="CardReaderPowerOffResponse" type="{}CardReaderPowerOffResponse"/>
+ *           <element name="ReconciliationResponse" type="{}ReconciliationResponse"/>
+ *           <element name="ReversalResponse" type="{}ReversalResponse"/>
+ *           <element name="SoundResponse" type="{}SoundResponse"/>
+ *           <element name="StoredValueResponse" type="{}StoredValueResponse"/>
+ *           <element name="TransactionStatusResponse" type="{}TransactionStatusResponse"/>
+ *           <element name="TransmitResponse" type="{}TransmitResponse"/>
+ *         </choice>
+ *         <element name="SecurityTrailer" type="{}ContentInformation" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </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) + protected MessageHeader messageHeader; + /** + * The Balance inquiry response. + */ + @XmlElement(name = "BalanceInquiryResponse") + @Schema(description = "Content of the Balance Inquiry Response message.") + protected BalanceInquiryResponse balanceInquiryResponse; + /** + * The Batch response. + */ + @XmlElement(name = "BatchResponse") + @Schema(description = "Content of the Batch Response message.") + protected BatchResponse batchResponse; + /** + * The Card acquisition response. + */ + @XmlElement(name = "CardAcquisitionResponse") + @Schema(description = "Content of the Card Acquisition Response message.") + protected CardAcquisitionResponse cardAcquisitionResponse; + /** + * The Admin response. + */ + @XmlElement(name = "AdminResponse") + @Schema(description = "Content of the Custom Admin Response message.") + protected AdminResponse adminResponse; + /** + * The Diagnosis response. + */ + @XmlElement(name = "DiagnosisResponse") + @Schema(description = "Content of the Diagnosis Response message.") + protected DiagnosisResponse diagnosisResponse; + /** + * The Display response. + */ + @XmlElement(name = "DisplayResponse") + @Schema(description = "Content of the Display Response message.") + protected DisplayResponse displayResponse; + /** + * The Enable service response. + */ + @XmlElement(name = "EnableServiceResponse") + @Schema(description = "Content of the Enable Service Response message.") + protected EnableServiceResponse enableServiceResponse; + /** + * The Get totals response. + */ + @XmlElement(name = "GetTotalsResponse") + @Schema(description = "Content of the Reconciliation Response message.") + protected GetTotalsResponse getTotalsResponse; + /** + * The Input response. + */ + @XmlElement(name = "InputResponse") + @Schema(description = "Content of the Input Response message.") + protected InputResponse inputResponse; + /** + * The Login response. + */ + @XmlElement(name = "LoginResponse") + @Schema(description = "Content of the Login Response message.") + protected LoginResponse loginResponse; + /** + * The Logout response. + */ + @XmlElement(name = "LogoutResponse") + @Schema(description = "Content of the Logout Response message.") + protected LogoutResponse logoutResponse; + /** + * The Loyalty response. + */ + @XmlElement(name = "LoyaltyResponse") + @Schema(description = "Content of the Loyalty Response message.") + protected LoyaltyResponse loyaltyResponse; + /** + * The Payment response. + */ + @XmlElement(name = "PaymentResponse") + @Schema(description = "Content of the Payment Response message.") + protected PaymentResponse paymentResponse; + /** + * The Pin response. + */ + @XmlElement(name = "PINResponse") + @Schema(description = "Content of the PIN Response message.") + protected PINResponse pinResponse; + /** + * The Print response. + */ + @XmlElement(name = "PrintResponse") + @Schema(description = "Content of the Print Response message.") + protected PrintResponse printResponse; + /** + * The Card reader init response. + */ + @XmlElement(name = "CardReaderInitResponse") + @Schema(description = "Content of the Card Reader Init Response message.") + protected CardReaderInitResponse cardReaderInitResponse; + /** + * The Card reader apdu response. + */ + @XmlElement(name = "CardReaderAPDUResponse") + @Schema(description = "Content of the Card Reader APDU Response message.") + protected CardReaderAPDUResponse cardReaderAPDUResponse; + /** + * The Card reader power off response. + */ + @XmlElement(name = "CardReaderPowerOffResponse") + @Schema(description = "Content of the Card Reader Power-Off Response message.") + protected CardReaderPowerOffResponse cardReaderPowerOffResponse; + /** + * The Reconciliation response. + */ + @XmlElement(name = "ReconciliationResponse") + @Schema(description = "Content of the Reconciliation Response message.") + protected ReconciliationResponse reconciliationResponse; + /** + * The Reversal response. + */ + @XmlElement(name = "ReversalResponse") + @Schema(description = "Content of the Reversal Response message.") + protected ReversalResponse reversalResponse; + /** + * The Sound response. + */ + @XmlElement(name = "SoundResponse") + @Schema(description = "Content of the Sound Response message.") + protected SoundResponse soundResponse; + /** + * The Stored value response. + */ + @XmlElement(name = "StoredValueResponse") + @Schema(description = "Content of the Stored Value Response message.") + protected StoredValueResponse storedValueResponse; + /** + * The Transaction status response. + */ + @XmlElement(name = "TransactionStatusResponse") + @Schema(description = "Content of the TransactionStatus Response message.") + protected TransactionStatusResponse transactionStatusResponse; + /** + * The Transmit response. + */ + @XmlElement(name = "TransmitResponse") + @Schema(description = "Content of the Transmit Response message.") + protected TransmitResponse transmitResponse; + /** + * The Security trailer. + */ + @XmlElement(name = "SecurityTrailer") + @Schema(description = "Protection of the whole message") + protected ContentInformation securityTrailer; + + /** + * Gets the value of the messageHeader property. + * + * @return possible object is {@link MessageHeader } + */ + public MessageHeader getMessageHeader() { + return messageHeader; + } + + /** + * Sets the value of the messageHeader property. + * + * @param value allowed object is {@link MessageHeader } + */ + public void setMessageHeader(MessageHeader value) { + this.messageHeader = value; + } + + /** + * Gets the value of the balanceInquiryResponse property. + * + * @return possible object is {@link BalanceInquiryResponse } + */ + public BalanceInquiryResponse getBalanceInquiryResponse() { + return balanceInquiryResponse; + } + + /** + * Sets the value of the balanceInquiryResponse property. + * + * @param value allowed object is {@link BalanceInquiryResponse } + */ + public void setBalanceInquiryResponse(BalanceInquiryResponse value) { + this.balanceInquiryResponse = value; + } + + /** + * Gets the value of the batchResponse property. + * + * @return possible object is {@link BatchResponse } + */ + public BatchResponse getBatchResponse() { + return batchResponse; + } + + /** + * Sets the value of the batchResponse property. + * + * @param value allowed object is {@link BatchResponse } + */ + public void setBatchResponse(BatchResponse value) { + this.batchResponse = value; + } + + /** + * Gets the value of the cardAcquisitionResponse property. + * + * @return possible object is {@link CardAcquisitionResponse } + */ + public CardAcquisitionResponse getCardAcquisitionResponse() { + return cardAcquisitionResponse; + } + + /** + * Sets the value of the cardAcquisitionResponse property. + * + * @param value allowed object is {@link CardAcquisitionResponse } + */ + public void setCardAcquisitionResponse(CardAcquisitionResponse value) { + this.cardAcquisitionResponse = value; + } + + /** + * Gets the value of the adminResponse property. + * + * @return possible object is {@link AdminResponse } + */ + public AdminResponse getAdminResponse() { + return adminResponse; + } + + /** + * Sets the value of the adminResponse property. + * + * @param value allowed object is {@link AdminResponse } + */ + public void setAdminResponse(AdminResponse value) { + this.adminResponse = value; + } + + /** + * Gets the value of the diagnosisResponse property. + * + * @return possible object is {@link DiagnosisResponse } + */ + public DiagnosisResponse getDiagnosisResponse() { + return diagnosisResponse; + } + + /** + * Sets the value of the diagnosisResponse property. + * + * @param value allowed object is {@link DiagnosisResponse } + */ + public void setDiagnosisResponse(DiagnosisResponse value) { + this.diagnosisResponse = value; + } + + /** + * Gets the value of the displayResponse property. + * + * @return possible object is {@link DisplayResponse } + */ + public DisplayResponse getDisplayResponse() { + return displayResponse; + } + + /** + * Sets the value of the displayResponse property. + * + * @param value allowed object is {@link DisplayResponse } + */ + public void setDisplayResponse(DisplayResponse value) { + this.displayResponse = value; + } + + /** + * Gets the value of the enableServiceResponse property. + * + * @return possible object is {@link EnableServiceResponse } + */ + public EnableServiceResponse getEnableServiceResponse() { + return enableServiceResponse; + } + + /** + * Sets the value of the enableServiceResponse property. + * + * @param value allowed object is {@link EnableServiceResponse } + */ + public void setEnableServiceResponse(EnableServiceResponse value) { + this.enableServiceResponse = value; + } + + /** + * Gets the value of the getTotalsResponse property. + * + * @return possible object is {@link GetTotalsResponse } + */ + public GetTotalsResponse getGetTotalsResponse() { + return getTotalsResponse; + } + + /** + * Sets the value of the getTotalsResponse property. + * + * @param value allowed object is {@link GetTotalsResponse } + */ + public void setGetTotalsResponse(GetTotalsResponse value) { + this.getTotalsResponse = value; + } + + /** + * Gets the value of the inputResponse property. + * + * @return possible object is {@link InputResponse } + */ + public InputResponse getInputResponse() { + return inputResponse; + } + + /** + * Sets the value of the inputResponse property. + * + * @param value allowed object is {@link InputResponse } + */ + public void setInputResponse(InputResponse value) { + this.inputResponse = value; + } + + /** + * Gets the value of the loginResponse property. + * + * @return possible object is {@link LoginResponse } + */ + public LoginResponse getLoginResponse() { + return loginResponse; + } + + /** + * Sets the value of the loginResponse property. + * + * @param value allowed object is {@link LoginResponse } + */ + public void setLoginResponse(LoginResponse value) { + this.loginResponse = value; + } + + /** + * Gets the value of the logoutResponse property. + * + * @return possible object is {@link LogoutResponse } + */ + public LogoutResponse getLogoutResponse() { + return logoutResponse; + } + + /** + * Sets the value of the logoutResponse property. + * + * @param value allowed object is {@link LogoutResponse } + */ + public void setLogoutResponse(LogoutResponse value) { + this.logoutResponse = value; + } + + /** + * Gets the value of the loyaltyResponse property. + * + * @return possible object is {@link LoyaltyResponse } + */ + public LoyaltyResponse getLoyaltyResponse() { + return loyaltyResponse; + } + + /** + * Sets the value of the loyaltyResponse property. + * + * @param value allowed object is {@link LoyaltyResponse } + */ + public void setLoyaltyResponse(LoyaltyResponse value) { + this.loyaltyResponse = value; + } + + /** + * Gets the value of the paymentResponse property. + * + * @return possible object is {@link PaymentResponse } + */ + public PaymentResponse getPaymentResponse() { + return paymentResponse; + } + + /** + * Sets the value of the paymentResponse property. + * + * @param value allowed object is {@link PaymentResponse } + */ + public void setPaymentResponse(PaymentResponse value) { + this.paymentResponse = value; + } + + /** + * Gets the value of the pinResponse property. + * + * @return possible object is {@link PINResponse } + */ + public PINResponse getPINResponse() { + return pinResponse; + } + + /** + * Sets the value of the pinResponse property. + * + * @param value allowed object is {@link PINResponse } + */ + public void setPINResponse(PINResponse value) { + this.pinResponse = value; + } + + /** + * Gets the value of the printResponse property. + * + * @return possible object is {@link PrintResponse } + */ + public PrintResponse getPrintResponse() { + return printResponse; + } + + /** + * Sets the value of the printResponse property. + * + * @param value allowed object is {@link PrintResponse } + */ + public void setPrintResponse(PrintResponse value) { + this.printResponse = value; + } + + /** + * Gets the value of the cardReaderInitResponse property. + * + * @return possible object is {@link CardReaderInitResponse } + */ + public CardReaderInitResponse getCardReaderInitResponse() { + return cardReaderInitResponse; + } + + /** + * Sets the value of the cardReaderInitResponse property. + * + * @param value allowed object is {@link CardReaderInitResponse } + */ + public void setCardReaderInitResponse(CardReaderInitResponse value) { + this.cardReaderInitResponse = value; + } + + /** + * Gets the value of the cardReaderAPDUResponse property. + * + * @return possible object is {@link CardReaderAPDUResponse } + */ + public CardReaderAPDUResponse getCardReaderAPDUResponse() { + return cardReaderAPDUResponse; + } + + /** + * Sets the value of the cardReaderAPDUResponse property. + * + * @param value allowed object is {@link CardReaderAPDUResponse } + */ + public void setCardReaderAPDUResponse(CardReaderAPDUResponse value) { + this.cardReaderAPDUResponse = value; + } + + /** + * Gets the value of the cardReaderPowerOffResponse property. + * + * @return possible object is {@link CardReaderPowerOffResponse } + */ + public CardReaderPowerOffResponse getCardReaderPowerOffResponse() { + return cardReaderPowerOffResponse; + } + + /** + * Sets the value of the cardReaderPowerOffResponse property. + * + * @param value allowed object is {@link CardReaderPowerOffResponse } + */ + public void setCardReaderPowerOffResponse(CardReaderPowerOffResponse value) { + this.cardReaderPowerOffResponse = value; + } + + /** + * Gets the value of the reconciliationResponse property. + * + * @return possible object is {@link ReconciliationResponse } + */ + public ReconciliationResponse getReconciliationResponse() { + return reconciliationResponse; + } + + /** + * Sets the value of the reconciliationResponse property. + * + * @param value allowed object is {@link ReconciliationResponse } + */ + public void setReconciliationResponse(ReconciliationResponse value) { + this.reconciliationResponse = value; + } + + /** + * Gets the value of the reversalResponse property. + * + * @return possible object is {@link ReversalResponse } + */ + public ReversalResponse getReversalResponse() { + return reversalResponse; + } + + /** + * Sets the value of the reversalResponse property. + * + * @param value allowed object is {@link ReversalResponse } + */ + public void setReversalResponse(ReversalResponse value) { + this.reversalResponse = value; + } + + /** + * Gets the value of the soundResponse property. + * + * @return possible object is {@link SoundResponse } + */ + public SoundResponse getSoundResponse() { + return soundResponse; + } + + /** + * Sets the value of the soundResponse property. + * + * @param value allowed object is {@link SoundResponse } + */ + public void setSoundResponse(SoundResponse value) { + this.soundResponse = value; + } + + /** + * Gets the value of the storedValueResponse property. + * + * @return possible object is {@link StoredValueResponse } + */ + public StoredValueResponse getStoredValueResponse() { + return storedValueResponse; + } + + /** + * Sets the value of the storedValueResponse property. + * + * @param value allowed object is {@link StoredValueResponse } + */ + public void setStoredValueResponse(StoredValueResponse value) { + this.storedValueResponse = value; + } + + /** + * Gets the value of the transactionStatusResponse property. + * + * @return possible object is {@link TransactionStatusResponse } + */ + public TransactionStatusResponse getTransactionStatusResponse() { + return transactionStatusResponse; + } + + /** + * Sets the value of the transactionStatusResponse property. + * + * @param value allowed object is {@link TransactionStatusResponse } + */ + public void setTransactionStatusResponse(TransactionStatusResponse value) { + this.transactionStatusResponse = value; + } + + /** + * Gets the value of the transmitResponse property. + * + * @return possible object is {@link TransmitResponse } + */ + public TransmitResponse getTransmitResponse() { + return transmitResponse; + } + + /** + * Sets the value of the transmitResponse property. + * + * @param value allowed object is {@link TransmitResponse } + */ + public void setTransmitResponse(TransmitResponse value) { + this.transmitResponse = value; + } + + /** + * Gets the value of the securityTrailer property. + * + * @return possible object is {@link ContentInformation } + */ + public ContentInformation getSecurityTrailer() { + return securityTrailer; + } + + /** + * Sets the value of the securityTrailer property. + * + * @param value allowed object is {@link ContentInformation } + */ + public void setSecurityTrailer(ContentInformation value) { + this.securityTrailer = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SensitiveCardData.java b/src/main/java/com/adyen/model/nexo/SensitiveCardData.java new file mode 100644 index 000000000..3e874b414 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SensitiveCardData.java @@ -0,0 +1,156 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Sensitive information related to the payment card, entered or read by the Sale System. -- Usage: This data structure could be CMS protected (EnvelopedData). In this case the data structure SensitiveCardData is replaced by the data structure ProtectedCardData of type ContentInformationType. When this data is protected, the exact + * + *

Java class for SensitiveCardData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SensitiveCardData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="TrackData" type="{}TrackData" maxOccurs="4" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="PAN" type="{}PAN" />
+ *       <attribute name="CardSeqNumb" type="{}CardSeqNumb" />
+ *       <attribute name="ExpiryDate" type="{}ExpiryDate" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SensitiveCardData", propOrder = { + "trackData" +}) +public class SensitiveCardData { + + /** + * The Track data. + */ + @XmlElement(name = "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") + @Schema(description = "Primary Account Number --Rule: ", minLength = 8, maxLength = 28) + protected String pan; + /** + * The Card seq numb. + */ + @XmlElement(name = "CardSeqNumb") + @Schema(description = "Card Sequence Number --Rule: if EntryMode is File, Keyed or Manual", minLength = 2, maxLength = 3) + protected String cardSeqNumb; + /** + * The Expiry date. + */ + @XmlElement(name = "ExpiryDate") + @Schema(description = "Date after which the card cannot be used. --Rule: if EntryMode is File", minLength = 4, maxLength = 4) + protected String expiryDate; + + /** + * Gets the value of the trackData property. + *

+ *

+ *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the trackData property. + *

+ *

+ *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getTrackData().add(newItem);
+     * 
+ *

+ *

+ *

+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link TrackData } + * + * @return the track data + */ + public List getTrackData() { + if (trackData == null) { + trackData = new ArrayList<>(); + } + return this.trackData; + } + + /** + * Gets the value of the pan property. + * + * @return possible object is {@link String } + */ + public String getPAN() { + return pan; + } + + /** + * Sets the value of the pan property. + * + * @param value allowed object is {@link String } + */ + public void setPAN(String value) { + this.pan = value; + } + + /** + * Gets the value of the cardSeqNumb property. + * + * @return possible object is {@link String } + */ + public String getCardSeqNumb() { + return cardSeqNumb; + } + + /** + * Sets the value of the cardSeqNumb property. + * + * @param value allowed object is {@link String } + */ + public void setCardSeqNumb(String value) { + this.cardSeqNumb = value; + } + + /** + * Gets the value of the expiryDate property. + * + * @return possible object is {@link String } + */ + public String getExpiryDate() { + return expiryDate; + } + + /** + * Sets the value of the expiryDate property. + * + * @param value allowed object is {@link String } + */ + public void setExpiryDate(String value) { + this.expiryDate = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SensitiveMobileData.java b/src/main/java/com/adyen/model/nexo/SensitiveMobileData.java new file mode 100644 index 000000000..63b7e99d7 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SensitiveMobileData.java @@ -0,0 +1,107 @@ +package com.adyen.model.nexo; + +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 could be CMS protected (EnvelopedData). In this case the data structure SensitiveMobileData is replaced by the data structure ProtectedMobileData of type ContentInformationType. When this data is protected, the exact + * + *

Java class for SensitiveMobileData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SensitiveMobileData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="MSISDN" use="required" type="{}MSISDN" />
+ *       <attribute name="IMSI" type="{}IMSI" />
+ *       <attribute name="IMEI" type="{}IMEI" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SensitiveMobileData") +public class SensitiveMobileData { + + /** + * The Msisdn. + */ + @XmlElement(name = "MSISDN", required = true) + @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") + @Schema(description = "International Mobile Subscriber Identity. --Rule: If data available") + protected String imsi; + /** + * The Imei. + */ + @XmlElement(name = "IMEI") + @Schema(description = "International Mobile Equipement Identity. --Rule: If data available") + protected String imei; + + /** + * Gets the value of the msisdn property. + * + * @return possible object is {@link String } + */ + public String getMSISDN() { + return msisdn; + } + + /** + * Sets the value of the msisdn property. + * + * @param value allowed object is {@link String } + */ + public void setMSISDN(String value) { + this.msisdn = value; + } + + /** + * Gets the value of the imsi property. + * + * @return possible object is {@link String } + */ + public String getIMSI() { + return imsi; + } + + /** + * Sets the value of the imsi property. + * + * @param value allowed object is {@link String } + */ + public void setIMSI(String value) { + this.imsi = value; + } + + /** + * Gets the value of the imei property. + * + * @return possible object is {@link String } + */ + public String getIMEI() { + return imei; + } + + /** + * Sets the value of the imei property. + * + * @param value allowed object is {@link String } + */ + public void setIMEI(String value) { + this.imei = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/ServiceProfilesType.java b/src/main/java/com/adyen/model/nexo/ServiceProfilesType.java new file mode 100644 index 000000000..500f61912 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ServiceProfilesType.java @@ -0,0 +1,132 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for ServiceProfilesType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="ServiceProfilesType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Synchro"/>
+ *     <enumeration value="Batch"/>
+ *     <enumeration value="OneTimeRes"/>
+ *     <enumeration value="Reservation"/>
+ *     <enumeration value="Loyalty"/>
+ *     <enumeration value="StoredValue"/>
+ *     <enumeration value="PIN"/>
+ *     <enumeration value="CardReader"/>
+ *     <enumeration value="Sound"/>
+ *     <enumeration value="Communication"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "ServiceProfilesType") +@XmlEnum +public enum ServiceProfilesType { + + + /** + * CardAcquisition and EnableService could be requested by the Sale System to the POI System. + */ + @XmlEnumValue("Synchro") + @Schema(description = "CardAcquisition and EnableService could be requested by the Sale System to the POI System.") + SYNCHRO("Synchro"), + + /** + * 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") + @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") + @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") + @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") + @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") + @Schema(description = "Stored Value service could be requested by the Sale System") + STORED_VALUE("StoredValue"), + + /** + * The Sale System could request the PIN validation services. + */ + PIN("PIN"), + + /** + * The Sale System could request Card Reader services. + */ + @XmlEnumValue("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") + @Schema(description = "To produce various forms of sounds to a customer or an operator interface.") + SOUND("Sound"), + + /** + * The POI or Sale System could request communication through the Transmit device messages exchange. + */ + @XmlEnumValue("Communication") + @Schema(description = "The POI or Sale System could request communication through the Transmit device messages exchange.") + COMMUNICATION("Communication"); + private final String value; + + ServiceProfilesType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value service profiles type. + * + * @param v the v + * @return the service profiles type + */ + public static ServiceProfilesType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/ServicesEnabledType.java b/src/main/java/com/adyen/model/nexo/ServicesEnabledType.java new file mode 100644 index 000000000..d23e5ed44 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/ServicesEnabledType.java @@ -0,0 +1,78 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for ServicesEnabledType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="ServicesEnabledType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="CardAcquisition"/>
+ *     <enumeration value="Payment"/>
+ *     <enumeration value="Loyalty"/>
+ *   </restriction>
+ * </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") + @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)") + CARD_ACQUISITION("CardAcquisition"), + + /** + * 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") + @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)") + PAYMENT("Payment"), + + /** + * 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") + @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)") + LOYALTY("Loyalty"); + private final String value; + + ServicesEnabledType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value services enabled type. + * + * @param v the v + * @return the services enabled type + */ + public static ServicesEnabledType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SignaturePoint.java b/src/main/java/com/adyen/model/nexo/SignaturePoint.java new file mode 100644 index 000000000..c74e19190 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SignaturePoint.java @@ -0,0 +1,82 @@ +package com.adyen.model.nexo; + +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 Coordinates of a point of the written signature where the pen changes direction or lift where (X and Y).When the signer lifts the pen, both X and Y have the value "FFFF". + * + *

Java class for SignaturePoint complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignaturePoint">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="X" use="required" type="{}X" />
+ *       <attribute name="Y" use="required" type="{}Y" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignaturePoint") +public class SignaturePoint { + + /** + * The X. + */ + @XmlElement(name = "X", required = true) + @Schema(description = "Abscissa of a point coordinates.") + protected String x; + /** + * The Y. + */ + @XmlElement(name = "Y", required = true) + @Schema(description = "Ordinate of a point coordinates.") + protected String y; + + /** + * Gets the value of the x property. + * + * @return possible object is {@link String } + */ + public String getX() { + return x; + } + + /** + * Sets the value of the x property. + * + * @param value allowed object is {@link String } + */ + public void setX(String value) { + this.x = value; + } + + /** + * Gets the value of the y property. + * + * @return possible object is {@link String } + */ + public String getY() { + return y; + } + + /** + * Sets the value of the y property. + * + * @param value allowed object is {@link String } + */ + public void setY(String value) { + this.y = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SignedData.java b/src/main/java/com/adyen/model/nexo/SignedData.java new file mode 100644 index 000000000..09bff431f --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SignedData.java @@ -0,0 +1,196 @@ +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Cryptographic Message Syntax (CMS) data structure containing signed data -- Reference: RFC 3852: Cryptographic Message Syntax (CMS) -- Usage: This data structure contains: the version of the data structure (which is v1 in EPAS protocol context) the identifiers of the messageType digest algorithms the encapsulated content the certificates for the verification of the signature + * + *

Java class for SignedData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignedData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DigestAlgorithm" type="{}AlgorithmIdentifier" maxOccurs="unbounded"/>
+ *         <element name="EncapsulatedContent" type="{}EncapsulatedContent"/>
+ *         <element name="Certificate" type="{}Certificate" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Signer" type="{}Signer" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="Version" type="{}VersionType" default="v1" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignedData", propOrder = { + "digestAlgorithm", + "encapsulatedContent", + "certificate", + "signer" +}) +public class SignedData { + + /** + * The Digest algorithm. + */ + @XmlElement(name = "DigestAlgorithm", required = true) + protected List digestAlgorithm; + /** + * The Encapsulated content. + */ + @XmlElement(name = "EncapsulatedContent", required = true) + protected EncapsulatedContent encapsulatedContent; + /** + * The Certificate. + */ + @XmlElement(name = "Certificate") + protected List certificate; + /** + * The Signer. + */ + @XmlElement(name = "Signer", required = true) + protected List signer; + /** + * The Version. + */ + @XmlElement(name = "Version") + protected VersionType version; + + /** + * Gets the value of the digestAlgorithm property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the digestAlgorithm property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getDigestAlgorithm().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link AlgorithmIdentifier } + * + * @return the digest algorithm + */ + public List getDigestAlgorithm() { + if (digestAlgorithm == null) { + digestAlgorithm = new ArrayList<>(); + } + return this.digestAlgorithm; + } + + /** + * Gets the value of the encapsulatedContent property. + * + * @return possible object is {@link EncapsulatedContent } + */ + public EncapsulatedContent getEncapsulatedContent() { + return encapsulatedContent; + } + + /** + * Sets the value of the encapsulatedContent property. + * + * @param value allowed object is {@link EncapsulatedContent } + */ + public void setEncapsulatedContent(EncapsulatedContent value) { + this.encapsulatedContent = value; + } + + /** + * Gets the value of the certificate property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the certificate property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getCertificate().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * byte[] + * + * @return the certificate + */ + public List getCertificate() { + if (certificate == null) { + certificate = new ArrayList<>(); + } + return this.certificate; + } + + /** + * Gets the value of the signer property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the signer property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getSigner().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link Signer } + * + * @return the signer + */ + public List getSigner() { + if (signer == null) { + signer = new ArrayList<>(); + } + return this.signer; + } + + /** + * Gets the value of the version property. + * + * @return possible object is {@link VersionType } + */ + public VersionType getVersion() { + if (version == null) { + return VersionType.V_1; + } else { + return version; + } + } + + /** + * Sets the value of the version property. + * + * @param value allowed object is {@link VersionType } + */ + public void setVersion(VersionType value) { + this.version = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/Signer.java b/src/main/java/com/adyen/model/nexo/Signer.java new file mode 100644 index 000000000..8c86ba29f --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/Signer.java @@ -0,0 +1,161 @@ +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; + + +/** + * Definition: Cryptographic Message Syntax (CMS) data structure containing signer information -- Reference: RFC 3852: Cryptographic Message Syntax (CMS) -- Usage: This data structure contains: the version of the data structure (which is v1 in EPAS protocol context) the identifiers of the messageType digest algorithms the encapsulated content the information about the signer + * + *

Java class for Signer complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Signer">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SignerIdentifier" type="{}SignerIdentifier"/>
+ *         <element name="DigestAlgorithm" type="{}AlgorithmIdentifier"/>
+ *         <element name="SignatureAlgorithm" type="{}AlgorithmIdentifier"/>
+ *         <element name="Signature" type="{}Signature"/>
+ *       </sequence>
+ *       <attribute name="Version" type="{}VersionType" default="v1" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Signer", propOrder = { + "signerIdentifier", + "digestAlgorithm", + "signatureAlgorithm", + "signature" +}) +public class Signer { + + /** + * The Signer identifier. + */ + @XmlElement(name = "SignerIdentifier", required = true) + protected SignerIdentifier signerIdentifier; + /** + * The Digest algorithm. + */ + @XmlElement(name = "DigestAlgorithm", required = true) + protected AlgorithmIdentifier digestAlgorithm; + /** + * The Signature algorithm. + */ + @XmlElement(name = "SignatureAlgorithm", required = true) + protected AlgorithmIdentifier signatureAlgorithm; + /** + * The Signature. + */ + @XmlElement(name = "Signature", required = true) + protected byte[] signature; + /** + * The Version. + */ + @XmlElement(name = "Version") + protected VersionType version; + + /** + * Gets the value of the signerIdentifier property. + * + * @return possible object is {@link SignerIdentifier } + */ + public SignerIdentifier getSignerIdentifier() { + return signerIdentifier; + } + + /** + * Sets the value of the signerIdentifier property. + * + * @param value allowed object is {@link SignerIdentifier } + */ + public void setSignerIdentifier(SignerIdentifier value) { + this.signerIdentifier = value; + } + + /** + * Gets the value of the digestAlgorithm property. + * + * @return possible object is {@link AlgorithmIdentifier } + */ + public AlgorithmIdentifier getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * Sets the value of the digestAlgorithm property. + * + * @param value allowed object is {@link AlgorithmIdentifier } + */ + public void setDigestAlgorithm(AlgorithmIdentifier value) { + this.digestAlgorithm = value; + } + + /** + * Gets the value of the signatureAlgorithm property. + * + * @return possible object is {@link AlgorithmIdentifier } + */ + public AlgorithmIdentifier getSignatureAlgorithm() { + return signatureAlgorithm; + } + + /** + * Sets the value of the signatureAlgorithm property. + * + * @param value allowed object is {@link AlgorithmIdentifier } + */ + public void setSignatureAlgorithm(AlgorithmIdentifier value) { + this.signatureAlgorithm = value; + } + + /** + * Gets the value of the signature property. + * + * @return possible object is byte[] + */ + public byte[] getSignature() { + return signature; + } + + /** + * Sets the value of the signature property. + * + * @param value allowed object is byte[] + */ + public void setSignature(byte[] value) { + this.signature = value; + } + + /** + * Gets the value of the version property. + * + * @return possible object is {@link VersionType } + */ + public VersionType getVersion() { + if (version == null) { + return VersionType.V_1; + } else { + return version; + } + } + + /** + * Sets the value of the version property. + * + * @param value allowed object is {@link VersionType } + */ + public void setVersion(VersionType value) { + this.version = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SignerIdentifier.java b/src/main/java/com/adyen/model/nexo/SignerIdentifier.java new file mode 100644 index 000000000..ad7bb2f45 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SignerIdentifier.java @@ -0,0 +1,58 @@ +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; + + +/** + * Definition: Cryptographic Message Syntax (CMS) data structure containing the Signer Identifier -- Reference: RFC 3852: Cryptographic Message Syntax (CMS) -- Usage: This data structure contains: the issuer name (see X.501-88) the certificate serial number (see X.509-97) + * + *

Java class for SignerIdentifier complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SignerIdentifier">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="IssuerAndSerialNumber" type="{}IssuerAndSerialNumber"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SignerIdentifier", propOrder = { + "issuerAndSerialNumber" +}) +public class SignerIdentifier { + + /** + * The Issuer and serial number. + */ + @XmlElement(name = "IssuerAndSerialNumber", required = true) + protected IssuerAndSerialNumber issuerAndSerialNumber; + + /** + * Gets the value of the issuerAndSerialNumber property. + * + * @return possible object is {@link IssuerAndSerialNumber } + */ + public IssuerAndSerialNumber getIssuerAndSerialNumber() { + return issuerAndSerialNumber; + } + + /** + * Sets the value of the issuerAndSerialNumber property. + * + * @param value allowed object is {@link IssuerAndSerialNumber } + */ + public void setIssuerAndSerialNumber(IssuerAndSerialNumber value) { + this.issuerAndSerialNumber = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SoundActionType.java b/src/main/java/com/adyen/model/nexo/SoundActionType.java new file mode 100644 index 000000000..ac4a3ee30 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SoundActionType.java @@ -0,0 +1,78 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for SoundActionType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="SoundActionType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="StartSound"/>
+ *     <enumeration value="StopSound"/>
+ *     <enumeration value="SetDefaultVolume"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "SoundActionType") +@XmlEnum +public enum SoundActionType { + + + /** + * Start the sound as specified in the messageType. + */ + @XmlEnumValue("StartSound") + @Schema(description = "Start the sound as specified in the message.") + START_SOUND("StartSound"), + + /** + * Stop the sound in progress. + */ + @XmlEnumValue("StopSound") + @Schema(description = "Stop the sound in progress.") + STOP_SOUND("StopSound"), + + /** + * Set the default volume of sounds. + */ + @XmlEnumValue("SetDefaultVolume") + @Schema(description = "Set the default volume of sounds.") + SET_DEFAULT_VOLUME("SetDefaultVolume"); + private final String value; + + SoundActionType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value sound action type. + * + * @param v the v + * @return the sound action type + */ + public static SoundActionType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SoundContent.java b/src/main/java/com/adyen/model/nexo/SoundContent.java new file mode 100644 index 000000000..3ac9addd4 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SoundContent.java @@ -0,0 +1,129 @@ +package com.adyen.model.nexo; + +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. + * + *

Java class for SoundContent complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SoundContent">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="SoundFormat" type="{}SoundFormatType" />
+ *       <attribute name="Language" type="{}ISOLanguage2A" />
+ *       <attribute name="ReferenceID" type="{}ReferenceID" />
+ *       <attribute name="Text" type="{}Text" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SoundContent") +public class SoundContent { + + @XmlElement(name = "SoundFormat") + @Schema(description = "Type of sound to play.") + protected SoundFormatType soundFormat; + @XmlElement(name = "Language") + @Schema(description = "Identification of a language.") + protected String language; + + @XmlElement(name = "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") + @Schema(description = "Content of text message to display, print or play.") + protected String text; + + /** + * Gets the value of the soundFormat property. + * + * @return possible object is + * {@link SoundFormatType } + */ + public SoundFormatType getSoundFormat() { + return soundFormat; + } + + /** + * Sets the value of the soundFormat property. + * + * @param value allowed object is + * {@link SoundFormatType } + */ + public void setSoundFormat(SoundFormatType value) { + this.soundFormat = value; + } + + /** + * Gets the value of the language property. + * + * @return possible object is + * {@link String } + */ + public String getLanguage() { + return language; + } + + /** + * Sets the value of the language property. + * + * @param value allowed object is + * {@link String } + */ + public void setLanguage(String value) { + this.language = value; + } + + /** + * Gets the value of the referenceID property. + * + * @return possible object is + * {@link String } + */ + public String getReferenceID() { + return referenceID; + } + + /** + * Sets the value of the referenceID property. + * + * @param value allowed object is + * {@link String } + */ + public void setReferenceID(String value) { + this.referenceID = value; + } + + /** + * Gets the value of the text property. + * + * @return possible object is + * {@link String } + */ + public String getText() { + return text; + } + + /** + * Sets the value of the text property. + * + * @param value allowed object is + * {@link String } + */ + public void setText(String value) { + this.text = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SoundFormatType.java b/src/main/java/com/adyen/model/nexo/SoundFormatType.java new file mode 100644 index 000000000..c7c62f76b --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SoundFormatType.java @@ -0,0 +1,78 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for SoundFormatType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="SoundFormatType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="SoundRef"/>
+ *     <enumeration value="MessageRef"/>
+ *     <enumeration value="Text"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "SoundFormatType") +@XmlEnum +public enum SoundFormatType { + + + /** + * Preloaded sound File. + */ + @XmlEnumValue("SoundRef") + @Schema(description = "Preloaded sound File.") + SOUND_REF("SoundRef"), + + /** + * Reference of a preloaded text to play. + */ + @XmlEnumValue("MessageRef") + @Schema(description = "Reference of a preloaded text to play.") + MESSAGE_REF("MessageRef"), + + /** + * Text to play. + */ + @XmlEnumValue("Text") + @Schema(description = "Text to play.") + TEXT("Text"); + private final String value; + + SoundFormatType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value sound format type. + * + * @param v the v + * @return the sound format type + */ + public static SoundFormatType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SoundRequest.java b/src/main/java/com/adyen/model/nexo/SoundRequest.java new file mode 100644 index 000000000..adba06139 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SoundRequest.java @@ -0,0 +1,141 @@ +package com.adyen.model.nexo; + +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 java.math.BigInteger; + + +/** + * Definition: Content of the Sound Request messageType. -- Usage: It conveys the data to start a sound, stop a sound, or modify the default sound volume. The sound to play may be a preloaded sound or a text to play. + * + *

Java class for SoundRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SoundRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SoundContent" type="{}SoundContent"/>
+ *       </sequence>
+ *       <attribute name="ResponseMode" type="{}ResponseModeType" default="NotRequired" />
+ *       <attribute name="SoundAction" use="required" type="{}SoundActionType" />
+ *       <attribute name="SoundVolume" type="{}SoundVolume" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SoundRequest", propOrder = { + "soundContent" +}) +public class SoundRequest { + + /** + * The Sound content. + */ + @XmlElement(name = "SoundContent", required = true) + @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") + @Schema(description = "Message response awaited by the initiator of the Request") + protected ResponseModeType responseMode; + /** + * The Sound action. + */ + @XmlElement(name = "SoundAction", required = true) + @Schema(description = "Type of action to perform on the sound.") + protected SoundActionType soundAction; + /** + * The Sound volume. + */ + @XmlElement(name = "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") + protected BigInteger soundVolume; + + /** + * Gets the value of the soundContent property. + * + * @return possible object is {@link SoundContent } + */ + public SoundContent getSoundContent() { + return soundContent; + } + + /** + * Sets the value of the soundContent property. + * + * @param value allowed object is {@link SoundContent } + */ + public void setSoundContent(SoundContent value) { + this.soundContent = value; + } + + /** + * Gets the value of the responseMode property. + * + * @return possible object is {@link ResponseModeType } + */ + public ResponseModeType getResponseMode() { + if (responseMode == null) { + return ResponseModeType.NOT_REQUIRED; + } else { + return responseMode; + } + } + + /** + * Sets the value of the responseMode property. + * + * @param value allowed object is {@link ResponseModeType } + */ + public void setResponseMode(ResponseModeType value) { + this.responseMode = value; + } + + /** + * Gets the value of the soundAction property. + * + * @return possible object is {@link SoundActionType } + */ + public SoundActionType getSoundAction() { + return soundAction; + } + + /** + * Sets the value of the soundAction property. + * + * @param value allowed object is {@link SoundActionType } + */ + public void setSoundAction(SoundActionType value) { + this.soundAction = value; + } + + /** + * Gets the value of the soundVolume property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getSoundVolume() { + return soundVolume; + } + + /** + * Sets the value of the soundVolume property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setSoundVolume(BigInteger value) { + this.soundVolume = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SoundResponse.java b/src/main/java/com/adyen/model/nexo/SoundResponse.java new file mode 100644 index 000000000..6d59866cf --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SoundResponse.java @@ -0,0 +1,61 @@ +package com.adyen.model.nexo; + +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 Sound request. The response may be absent, at the beginning of the processing, or at the end of the processing. + * + *

Java class for SoundResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SoundResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SoundResponse", propOrder = { + "response" +}) +public class SoundResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/SponsoredMerchant.java b/src/main/java/com/adyen/model/nexo/SponsoredMerchant.java new file mode 100644 index 000000000..c3c935e48 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/SponsoredMerchant.java @@ -0,0 +1,157 @@ +package com.adyen.model.nexo; + +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 acceptor. -- Usage: Identifies the merchant purchasing items, using the payment facilitator to perform the payment of the items. + * + *

Java class for SponsoredMerchant complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="SponsoredMerchant">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="MerchantName" use="required" type="{}MerchantName" />
+ *       <attribute name="MerchantAddress" type="{}MerchantAddress" />
+ *       <attribute name="MerchantCountry" use="required" type="{}MerchantCountry" />
+ *       <attribute name="MerchantCategoryCode" use="required" type="{}MerchantCategoryCode" />
+ *       <attribute name="RegistrationID" use="required" type="{}RegistrationID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SponsoredMerchant") +public class SponsoredMerchant { + + /** + * The Merchant name. + */ + @XmlElement(name = "MerchantName", required = true) + @Schema(description = "Unformatted name of the merchant.") + protected String merchantName; + /** + * The Merchant address. + */ + @XmlElement(name = "MerchantAddress") + @Schema(description = "Unformatted address of the merchant.") + protected String merchantAddress; + /** + * The Merchant country. + */ + @XmlElement(name = "MerchantCountry", required = true) + @Schema(description = "Country of the merchant.") + protected String merchantCountry; + /** + * The Merchant category code. + */ + @XmlElement(name = "MerchantCategoryCode", required = true) + @Schema(description = "The code which identifies the category of the transaction (MCC).") + protected String merchantCategoryCode; + /** + * The Registration id. + */ + @XmlElement(name = "RegistrationID", required = true) + @Schema(description = "Identification of a registered entity.") + protected String registrationID; + + /** + * Gets the value of the merchantName property. + * + * @return possible object is {@link String } + */ + public String getMerchantName() { + return merchantName; + } + + /** + * Sets the value of the merchantName property. + * + * @param value allowed object is {@link String } + */ + public void setMerchantName(String value) { + this.merchantName = value; + } + + /** + * Gets the value of the merchantAddress property. + * + * @return possible object is {@link String } + */ + public String getMerchantAddress() { + return merchantAddress; + } + + /** + * Sets the value of the merchantAddress property. + * + * @param value allowed object is {@link String } + */ + public void setMerchantAddress(String value) { + this.merchantAddress = value; + } + + /** + * Gets the value of the merchantCountry property. + * + * @return possible object is {@link String } + */ + public String getMerchantCountry() { + return merchantCountry; + } + + /** + * Sets the value of the merchantCountry property. + * + * @param value allowed object is {@link String } + */ + public void setMerchantCountry(String value) { + this.merchantCountry = value; + } + + /** + * Gets the value of the merchantCategoryCode property. + * + * @return possible object is {@link String } + */ + public String getMerchantCategoryCode() { + return merchantCategoryCode; + } + + /** + * Sets the value of the merchantCategoryCode property. + * + * @param value allowed object is {@link String } + */ + public void setMerchantCategoryCode(String value) { + this.merchantCategoryCode = value; + } + + /** + * Gets the value of the registrationID property. + * + * @return possible object is {@link String } + */ + public String getRegistrationID() { + return registrationID; + } + + /** + * Sets the value of the registrationID property. + * + * @param value allowed object is {@link String } + */ + public void setRegistrationID(String value) { + this.registrationID = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/StoredValueAccountID.java b/src/main/java/com/adyen/model/nexo/StoredValueAccountID.java new file mode 100644 index 000000000..38c7baddc --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/StoredValueAccountID.java @@ -0,0 +1,212 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Identification of the stored value account or the stored value card -- Usage: It contains the identifications of the stored value account or the stored value card, and the associated product sold by the Sale System for stored value requests. + * + *

Java class for StoredValueAccountID complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="StoredValueAccountID">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="StoredValueAccountType" use="required" type="{}StoredValueAccountType" />
+ *       <attribute name="StoredValueProvider" type="{}StoredValueProvider" />
+ *       <attribute name="OwnerName" type="{}OwnerName" />
+ *       <attribute name="ExpiryDate" type="{}ExpiryDate" />
+ *       <attribute name="EntryMode" use="required" type="{}EntryMode" />
+ *       <attribute name="IdentificationType" use="required" type="{}IdentificationType" />
+ *       <attribute name="StoredValueID" use="required" type="{}StoredValueID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "StoredValueAccountID") +public class StoredValueAccountID { + + @XmlElement(name = "StoredValueAccountType", required = true) + @Schema(description = "Type of stored value account") + protected StoredValueAccountType storedValueAccountType; + + @XmlElement(name = "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") + @Schema(description = "Owner name of an account --Rule: If available for the card or account.") + protected String ownerName; + + @XmlElement(name = "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) + @Schema(description = "Entry mode of the payment instrument information") + protected List entryMode; + @XmlElement(name = "IdentificationType", required = true) + @Schema(description = "Type of account identification") + protected IdentificationType identificationType; + @XmlElement(name = "StoredValueID", required = true) + @Schema(description = "Stored value account identification") + protected String storedValueID; + + /** + * Gets the value of the storedValueAccountType property. + * + * @return possible object is + * {@link StoredValueAccountType } + */ + public StoredValueAccountType getStoredValueAccountType() { + return storedValueAccountType; + } + + /** + * Sets the value of the storedValueAccountType property. + * + * @param value allowed object is + * {@link StoredValueAccountType } + */ + public void setStoredValueAccountType(StoredValueAccountType value) { + this.storedValueAccountType = value; + } + + /** + * Gets the value of the storedValueProvider property. + * + * @return possible object is + * {@link String } + */ + public String getStoredValueProvider() { + return storedValueProvider; + } + + /** + * Sets the value of the storedValueProvider property. + * + * @param value allowed object is + * {@link String } + */ + public void setStoredValueProvider(String value) { + this.storedValueProvider = value; + } + + /** + * Gets the value of the ownerName property. + * + * @return possible object is + * {@link String } + */ + public String getOwnerName() { + return ownerName; + } + + /** + * Sets the value of the ownerName property. + * + * @param value allowed object is + * {@link String } + */ + public void setOwnerName(String value) { + this.ownerName = value; + } + + /** + * Gets the value of the expiryDate property. + * + * @return possible object is + * {@link String } + */ + public String getExpiryDate() { + return expiryDate; + } + + /** + * Sets the value of the expiryDate property. + * + * @param value allowed object is + * {@link String } + */ + public void setExpiryDate(String value) { + this.expiryDate = value; + } + + /** + * Gets the value of the entryMode property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the entryMode property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEntryMode().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EntryModeType } + */ + public List getEntryMode() { + if (entryMode == null) { + entryMode = new ArrayList<>(); + } + return this.entryMode; + } + + /** + * Gets the value of the identificationType property. + * + * @return possible object is + * {@link IdentificationType } + */ + public IdentificationType getIdentificationType() { + return identificationType; + } + + /** + * Sets the value of the identificationType property. + * + * @param value allowed object is + * {@link IdentificationType } + */ + public void setIdentificationType(IdentificationType value) { + this.identificationType = value; + } + + /** + * Gets the value of the storedValueID property. + * + * @return possible object is + * {@link String } + */ + public String getStoredValueID() { + return storedValueID; + } + + /** + * Sets the value of the storedValueID property. + * + * @param value allowed object is + * {@link String } + */ + public void setStoredValueID(String value) { + this.storedValueID = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/StoredValueAccountStatus.java b/src/main/java/com/adyen/model/nexo/StoredValueAccountStatus.java new file mode 100644 index 000000000..d4747ffbf --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/StoredValueAccountStatus.java @@ -0,0 +1,87 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; + + +/** + * Definition: Data related to the result of the stored value card transaction. -- Usage: It contains: - the identification of the stored value accounts or the stored value cards - the identification of the transaction by the stored value host - the balance of the stored value account if relevant + * + *

Java class for StoredValueAccountStatus complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="StoredValueAccountStatus">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="StoredValueAccountID" type="{}StoredValueAccountID"/>
+ *       </sequence>
+ *       <attribute name="CurrentBalance" type="{}SimpleAmountType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "StoredValueAccountStatus", propOrder = { + "storedValueAccountID" +}) +public class StoredValueAccountStatus { + + /** + * The Stored value account id. + */ + @XmlElement(name = "StoredValueAccountID", required = true) + @Schema(description = "Identification of the stored value account or the stored value card") + protected StoredValueAccountID storedValueAccountID; + /** + * The Current balance. + */ + @XmlElement(name = "CurrentBalance") + @Schema(description = "Balance of an account. --Rule: if relevant and known") + protected BigDecimal currentBalance; + + /** + * Gets the value of the storedValueAccountID property. + * + * @return possible object is {@link StoredValueAccountID } + */ + public StoredValueAccountID getStoredValueAccountID() { + return storedValueAccountID; + } + + /** + * Sets the value of the storedValueAccountID property. + * + * @param value allowed object is {@link StoredValueAccountID } + */ + public void setStoredValueAccountID(StoredValueAccountID value) { + this.storedValueAccountID = value; + } + + /** + * Gets the value of the currentBalance property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getCurrentBalance() { + return currentBalance; + } + + /** + * Sets the value of the currentBalance property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setCurrentBalance(BigDecimal value) { + this.currentBalance = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/StoredValueAccountType.java b/src/main/java/com/adyen/model/nexo/StoredValueAccountType.java new file mode 100644 index 000000000..578aa8f8b --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/StoredValueAccountType.java @@ -0,0 +1,78 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for StoredValueAccountType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="StoredValueAccountType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="GiftCard"/>
+ *     <enumeration value="PhoneCard"/>
+ *     <enumeration value="Other"/>
+ *   </restriction>
+ * </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") + @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") + @Schema(description = "Stored value instrument used to pay telephone services (e.g. card or identifier).") + PHONE_CARD("PhoneCard"), + + /** + * Other stored value instrument. + */ + @XmlEnumValue("Other") + @Schema(description = "Other stored value instrument.") + OTHER("Other"); + private final String value; + + StoredValueAccountType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value stored value account type. + * + * @param v the v + * @return the stored value account type + */ + public static StoredValueAccountType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/StoredValueData.java b/src/main/java/com/adyen/model/nexo/StoredValueData.java new file mode 100644 index 000000000..3af26359c --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/StoredValueData.java @@ -0,0 +1,238 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; + + +/** + * Definition: Data related to the stored value card. -- Usage: It contains: - the identification of the stored value accounts or the stored value cards, if provided by the Sale System, and - the associated products sold by the Sale System.. + * + *

Java class for StoredValueData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="StoredValueData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="StoredValueAccountID" type="{}StoredValueAccountID" minOccurs="0"/>
+ *         <element name="OriginalPOITransaction" type="{}OriginalPOITransaction" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="StoredValueProvider" type="{}StoredValueProvider" />
+ *       <attribute name="StoredValueTransaction" use="required" type="{}StoredValueTransactionType" />
+ *       <attribute name="ProductCode" type="{}ProductCode" />
+ *       <attribute name="EanUpc" type="{}EanUpc" />
+ *       <attribute name="ItemAmount" use="required" type="{}SimpleAmountType" />
+ *       <attribute name="Currency" use="required" type="{}ISOCurrency3A" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "StoredValueData", propOrder = { + "storedValueAccountID", + "originalPOITransaction" +}) +public class StoredValueData { + + /** + * The Stored value account id. + */ + @XmlElement(name = "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") + @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") + @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) + @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") + @Schema(description = "Product code of item purchased with the transaction.", minLength = 1, maxLength = 20) + protected String productCode; + /** + * The Ean upc. + */ + @XmlElement(name = "EanUpc") + @Schema(description = "Standard product code of item purchased with the transaction.") + protected String eanUpc; + /** + * The Item amount. + */ + @XmlElement(name = "ItemAmount", required = true) + @Schema(description = "Total amount of the item line.") + protected BigDecimal itemAmount; + /** + * The Currency. + */ + @XmlElement(name = "Currency", required = true) + @Schema(description = "Currency of a monetary amount.") + protected String currency; + + /** + * Gets the value of the storedValueAccountID property. + * + * @return possible object is {@link StoredValueAccountID } + */ + public StoredValueAccountID getStoredValueAccountID() { + return storedValueAccountID; + } + + /** + * Sets the value of the storedValueAccountID property. + * + * @param value allowed object is {@link StoredValueAccountID } + */ + public void setStoredValueAccountID(StoredValueAccountID value) { + this.storedValueAccountID = value; + } + + /** + * Gets the value of the originalPOITransaction property. + * + * @return possible object is {@link OriginalPOITransaction } + */ + public OriginalPOITransaction getOriginalPOITransaction() { + return originalPOITransaction; + } + + /** + * Sets the value of the originalPOITransaction property. + * + * @param value allowed object is {@link OriginalPOITransaction } + */ + public void setOriginalPOITransaction(OriginalPOITransaction value) { + this.originalPOITransaction = value; + } + + /** + * Gets the value of the storedValueProvider property. + * + * @return possible object is {@link String } + */ + public String getStoredValueProvider() { + return storedValueProvider; + } + + /** + * Sets the value of the storedValueProvider property. + * + * @param value allowed object is {@link String } + */ + public void setStoredValueProvider(String value) { + this.storedValueProvider = value; + } + + /** + * Gets the value of the storedValueTransactionType property. + * + * @return possible object is {@link StoredValueTransactionType } + */ + public StoredValueTransactionType getStoredValueTransactionType() { + return storedValueTransactionType; + } + + /** + * Sets the value of the storedValueTransactionType property. + * + * @param value allowed object is {@link StoredValueTransactionType } + */ + public void setStoredValueTransactionType(StoredValueTransactionType value) { + this.storedValueTransactionType = value; + } + + /** + * Gets the value of the productCode property. + * + * @return possible object is {@link String } + */ + public String getProductCode() { + return productCode; + } + + /** + * Sets the value of the productCode property. + * + * @param value allowed object is {@link String } + */ + public void setProductCode(String value) { + this.productCode = value; + } + + /** + * Gets the value of the eanUpc property. + * + * @return possible object is {@link String } + */ + public String getEanUpc() { + return eanUpc; + } + + /** + * Sets the value of the eanUpc property. + * + * @param value allowed object is {@link String } + */ + public void setEanUpc(String value) { + this.eanUpc = value; + } + + /** + * Gets the value of the itemAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getItemAmount() { + return itemAmount; + } + + /** + * Sets the value of the itemAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setItemAmount(BigDecimal value) { + this.itemAmount = value; + } + + /** + * Gets the value of the currency property. + * + * @return possible object is {@link String } + */ + public String getCurrency() { + return currency; + } + + /** + * Sets the value of the currency property. + * + * @param value allowed object is {@link String } + */ + public void setCurrency(String value) { + this.currency = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/StoredValueRequest.java b/src/main/java/com/adyen/model/nexo/StoredValueRequest.java new file mode 100644 index 000000000..4f1392332 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/StoredValueRequest.java @@ -0,0 +1,132 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Stored Value Request messageType. -- Usage: It conveys Information related to the Stored Value transaction to process + * + *

Java class for StoredValueRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="StoredValueRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SaleData" type="{}SaleData"/>
+ *         <element name="StoredValueData" type="{}StoredValueData" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="CustomerLanguage" type="{}ISOLanguage2A" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "StoredValueRequest", propOrder = { + "saleData", + "storedValueData" +}) +public class StoredValueRequest { + + /** + * The Sale data. + */ + @XmlElement(name = "SaleData", required = true) + @Schema(description = "Data related to the Sale System.") + protected SaleData saleData; + /** + * The Stored value data. + */ + @XmlElement(name = "StoredValueData", required = true) + @Schema(description = "Data related to the stored value card.") + protected List storedValueData; + /** + * The Customer language. + */ + @XmlElement(name = "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; + + /** + * Gets the value of the saleData property. + * + * @return possible object is {@link SaleData } + */ + public SaleData getSaleData() { + return saleData; + } + + /** + * Sets the value of the saleData property. + * + * @param value allowed object is {@link SaleData } + */ + public void setSaleData(SaleData value) { + this.saleData = value; + } + + /** + * Gets the value of the storedValueData property. + *

+ *

+ *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the storedValueData property. + *

+ *

+ *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getStoredValueData().add(newItem);
+     * 
+ *

+ *

+ *

+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link StoredValueData } + * + * @return the stored value data + */ + public List getStoredValueData() { + if (storedValueData == null) { + storedValueData = new ArrayList<>(); + } + return this.storedValueData; + } + + /** + * Gets the value of the customerLanguage property. + * + * @return possible object is {@link String } + */ + public String getCustomerLanguage() { + return customerLanguage; + } + + /** + * Sets the value of the customerLanguage property. + * + * @param value allowed object is {@link String } + */ + public void setCustomerLanguage(String value) { + this.customerLanguage = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/StoredValueResponse.java b/src/main/java/com/adyen/model/nexo/StoredValueResponse.java new file mode 100644 index 000000000..ab3146a97 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/StoredValueResponse.java @@ -0,0 +1,167 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the Stored Value Response messageType. -- Usage: It conveys Information related to the Stored Value transaction processed by the POI System. + * + *

Java class for StoredValueResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="StoredValueResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="SaleData" type="{}SaleData"/>
+ *         <element name="POIData" type="{}POIData"/>
+ *         <element name="StoredValueResult" type="{}StoredValueResult" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "StoredValueResponse", propOrder = { + "response", + "saleData", + "poiData", + "storedValueResult", + "paymentReceipt" +}) +public class StoredValueResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Sale data. + */ + @XmlElement(name = "SaleData", required = true) + @Schema(description = "Data related to the Sale System.") + protected SaleData saleData; + /** + * The Poi data. + */ + @XmlElement(name = "POIData", required = true) + @Schema(description = "Data related to the POI System.") + protected POIData poiData; + /** + * The Stored value result. + */ + @XmlElement(name = "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") + protected List paymentReceipt; + + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the saleData property. + * + * @return possible object is {@link SaleData } + */ + public SaleData getSaleData() { + return saleData; + } + + /** + * Sets the value of the saleData property. + * + * @param value allowed object is {@link SaleData } + */ + public void setSaleData(SaleData value) { + this.saleData = value; + } + + /** + * Gets the value of the poiData property. + * + * @return possible object is {@link POIData } + */ + public POIData getPOIData() { + return poiData; + } + + /** + * Sets the value of the poiData property. + * + * @param value allowed object is {@link POIData } + */ + public void setPOIData(POIData value) { + this.poiData = value; + } + /** + * Gets the value of the storedValueResult property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the storedValueResult property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getStoredValueResult().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link StoredValueResult } + * + * @return the stored value result + */ + public List getStoredValueResult() { + if (storedValueResult == null) { + storedValueResult = new ArrayList<>(); + } + return this.storedValueResult; + } + + public List getPaymentReceipt() { + return paymentReceipt; + } + + public void setPaymentReceipt(List paymentReceipt) { + this.paymentReceipt = paymentReceipt; + } + + +} diff --git a/src/main/java/com/adyen/model/nexo/StoredValueResult.java b/src/main/java/com/adyen/model/nexo/StoredValueResult.java new file mode 100644 index 000000000..74098e3ea --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/StoredValueResult.java @@ -0,0 +1,213 @@ +package com.adyen.model.nexo; + +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 java.math.BigDecimal; + + +/** + * Definition: Result of loading/reloading a stored value card.. -- Usage: For each stored value card loaded or reloaded, in the StoredValue response messageType + * + *

Java class for StoredValueResult complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="StoredValueResult">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="StoredValueAccountStatus" type="{}StoredValueAccountStatus"/>
+ *         <element name="HostTransactionID" type="{}TransactionIdentification" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="StoredValueTransaction" use="required" type="{}StoredValueTransactionType" />
+ *       <attribute name="ProductCode" use="required" type="{}ProductCode" />
+ *       <attribute name="EanUpc" type="{}EanUpc" />
+ *       <attribute name="ItemAmount" use="required" type="{}SimpleAmountType" />
+ *       <attribute name="Currency" use="required" type="{}ISOCurrency3A" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "StoredValueResult", propOrder = { + "storedValueAccountStatus", + "hostTransactionID" +}) +public class StoredValueResult { + + /** + * The Stored value account status. + */ + @XmlElement(name = "StoredValueAccountStatus", required = true) + @Schema(description = "Data related to the result of the stored value card transaction.") + protected StoredValueAccountStatus storedValueAccountStatus; + /** + * The Host transaction id. + */ + @XmlElement(name = "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) + @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) + @Schema(description = "Product code of item purchased with the transaction. --Rule: Copy") + protected String productCode; + /** + * The Ean upc. + */ + @XmlElement(name = "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) + @Schema(description = "Total amount of the item line.") + protected BigDecimal itemAmount; + /** + * The Currency. + */ + @XmlElement(name = "Currency", required = true) + @Schema(description = "Currency of a monetary amount. --Rule: Copy") + protected String currency; + + /** + * Gets the value of the storedValueAccountStatus property. + * + * @return possible object is {@link StoredValueAccountStatus } + */ + public StoredValueAccountStatus getStoredValueAccountStatus() { + return storedValueAccountStatus; + } + + /** + * Sets the value of the storedValueAccountStatus property. + * + * @param value allowed object is {@link StoredValueAccountStatus } + */ + public void setStoredValueAccountStatus(StoredValueAccountStatus value) { + this.storedValueAccountStatus = value; + } + + /** + * Gets the value of the hostTransactionID property. + * + * @return possible object is {@link TransactionIdentification } + */ + public TransactionIdentification getHostTransactionID() { + return hostTransactionID; + } + + /** + * Sets the value of the hostTransactionID property. + * + * @param value allowed object is {@link TransactionIdentification } + */ + public void setHostTransactionID(TransactionIdentification value) { + this.hostTransactionID = value; + } + + /** + * Gets the value of the storedValueTransactionType property. + * + * @return possible object is {@link StoredValueTransactionType } + */ + public StoredValueTransactionType getStoredValueTransactionType() { + return storedValueTransactionType; + } + + /** + * Sets the value of the storedValueTransactionType property. + * + * @param value allowed object is {@link StoredValueTransactionType } + */ + public void setStoredValueTransactionType(StoredValueTransactionType value) { + this.storedValueTransactionType = value; + } + + /** + * Gets the value of the productCode property. + * + * @return possible object is {@link String } + */ + public String getProductCode() { + return productCode; + } + + /** + * Sets the value of the productCode property. + * + * @param value allowed object is {@link String } + */ + public void setProductCode(String value) { + this.productCode = value; + } + + /** + * Gets the value of the eanUpc property. + * + * @return possible object is {@link String } + */ + public String getEanUpc() { + return eanUpc; + } + + /** + * Sets the value of the eanUpc property. + * + * @param value allowed object is {@link String } + */ + public void setEanUpc(String value) { + this.eanUpc = value; + } + + /** + * Gets the value of the itemAmount property. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getItemAmount() { + return itemAmount; + } + + /** + * Sets the value of the itemAmount property. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setItemAmount(BigDecimal value) { + this.itemAmount = value; + } + + /** + * Gets the value of the currency property. + * + * @return possible object is {@link String } + */ + public String getCurrency() { + return currency; + } + + /** + * Sets the value of the currency property. + * + * @param value allowed object is {@link String } + */ + public void setCurrency(String value) { + this.currency = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/StoredValueTransactionType.java b/src/main/java/com/adyen/model/nexo/StoredValueTransactionType.java new file mode 100644 index 000000000..746437952 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/StoredValueTransactionType.java @@ -0,0 +1,102 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for StoredValueTransactionType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="StoredValueTransactionType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Reserve"/>
+ *     <enumeration value="Activate"/>
+ *     <enumeration value="Load"/>
+ *     <enumeration value="Unload"/>
+ *     <enumeration value="Reverse"/>
+ *     <enumeration value="Duplicate"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "StoredValueTransactionType") +@XmlEnum +public enum StoredValueTransactionType { + + + /** + * Reserve the account (e.g. get an activation code) + */ + @XmlEnumValue("Reserve") + @Schema(description = "Reserve the account (e.g. get an activation code)") + RESERVE("Reserve"), + + /** + * Activate the account or the card + */ + @XmlEnumValue("Activate") + @Schema(description = "Activate the account or the card") + ACTIVATE("Activate"), + + /** + * Load the account or the card with money + */ + @XmlEnumValue("Load") + @Schema(description = "Load the account or the card with money") + LOAD("Load"), + + /** + * Unload the account + */ + @XmlEnumValue("Unload") + @Schema(description = "Unload the account") + UNLOAD("Unload"), + + /** + * Reverse an activation or loading. + */ + @XmlEnumValue("Reverse") + @Schema(description = "Reverse an activation or loading.") + REVERSE("Reverse"), + + /** + * Duplicate the code or number provided by the loading or activation + */ + @XmlEnumValue("Duplicate") + @Schema(description = "Duplicate the code or number provided by the loading or activation") + DUPLICATE("Duplicate"); + private final String value; + + StoredValueTransactionType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value stored value transaction type. + * + * @param v the v + * @return the stored value transaction type + */ + public static StoredValueTransactionType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/TerminalEnvironmentType.java b/src/main/java/com/adyen/model/nexo/TerminalEnvironmentType.java new file mode 100644 index 000000000..c867987b2 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/TerminalEnvironmentType.java @@ -0,0 +1,78 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for TerminalEnvironmentType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="TerminalEnvironmentType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Attended"/>
+ *     <enumeration value="SemiAttended"/>
+ *     <enumeration value="Unattended"/>
+ *   </restriction>
+ * </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") + @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") + ATTENDED("Attended"), + + /** + * 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") + @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") + SEMI_ATTENDED("SemiAttended"), + + /** + * 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") + @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") + UNATTENDED("Unattended"); + private final String value; + + TerminalEnvironmentType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value terminal environment type. + * + * @param v the v + * @return the terminal environment type + */ + public static TerminalEnvironmentType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/TokenRequestedType.java b/src/main/java/com/adyen/model/nexo/TokenRequestedType.java new file mode 100644 index 000000000..99f354194 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/TokenRequestedType.java @@ -0,0 +1,70 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for TokenRequestedType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="TokenRequestedType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Transaction"/>
+ *     <enumeration value="Customer"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "TokenRequestedType") +@XmlEnum +public enum TokenRequestedType { + + + /** + * The token is generated to recognise a customer during the time of a transaction. + */ + @XmlEnumValue("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") + @Schema(description = "The token is generated to recognise a customer for a longer period.") + CUSTOMER("Customer"); + private final String value; + + TokenRequestedType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value token requested type. + * + * @param v the v + * @return the token requested type + */ + public static TokenRequestedType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/TotalDetailsType.java b/src/main/java/com/adyen/model/nexo/TotalDetailsType.java new file mode 100644 index 000000000..86e5cde4e --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/TotalDetailsType.java @@ -0,0 +1,92 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for TotalDetailsType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="TotalDetailsType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="POIID"/>
+ *     <enumeration value="SaleID"/>
+ *     <enumeration value="OperatorID"/>
+ *     <enumeration value="ShiftNumber"/>
+ *     <enumeration value="TotalsGroupID"/>
+ *   </restriction>
+ * </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") + @Schema(description = "Give the totals result per SaleID value.") + SALE_ID("SaleID"), + + /** + * Give the totals result per OperatorID value. + */ + @XmlEnumValue("OperatorID") + @Schema(description = "Give the totals result per OperatorID value.") + OPERATOR_ID("OperatorID"), + + /** + * Give the totals result per ShiftNumber value. + */ + @XmlEnumValue("ShiftNumber") + @Schema(description = "Give the totals result per ShiftNumber value.") + SHIFT_NUMBER("ShiftNumber"), + + /** + * Give the totals result per TotalsGroupID value. + */ + @XmlEnumValue("TotalsGroupID") + @Schema(description = "Give the totals result per TotalsGroupID value.") + TOTALS_GROUP_ID("TotalsGroupID"); + private final String value; + + TotalDetailsType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value total details type. + * + * @param v the v + * @return the total details type + */ + public static TotalDetailsType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/TotalFilter.java b/src/main/java/com/adyen/model/nexo/TotalFilter.java new file mode 100644 index 000000000..a1ead7380 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/TotalFilter.java @@ -0,0 +1,157 @@ +package com.adyen.model.nexo; + +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 for a (or a combination of) particular value of the POI Terminal, Sale Terminal, Cashier, Shift or TotalsGroupID. + * + *

Java class for TotalFilter complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TotalFilter">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="POIID" type="{}POIID" />
+ *       <attribute name="SaleID" type="{}SaleID" />
+ *       <attribute name="OperatorID" type="{}OperatorID" />
+ *       <attribute name="ShiftNumber" type="{}ShiftNumber" />
+ *       <attribute name="TotalsGroupID" type="{}TotalsGroupID" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TotalFilter") +public class TotalFilter { + + /** + * The Poiid. + */ + @XmlElement(name = "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") + @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") + @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") + @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") + @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", minLength = 1, maxLength = 16) + protected String totalsGroupID; + + /** + * Gets the value of the poiid property. + * + * @return possible object is {@link String } + */ + public String getPOIID() { + return poiid; + } + + /** + * Sets the value of the poiid property. + * + * @param value allowed object is {@link String } + */ + public void setPOIID(String value) { + this.poiid = value; + } + + /** + * Gets the value of the saleID property. + * + * @return possible object is {@link String } + */ + public String getSaleID() { + return saleID; + } + + /** + * Sets the value of the saleID property. + * + * @param value allowed object is {@link String } + */ + public void setSaleID(String value) { + this.saleID = value; + } + + /** + * Gets the value of the operatorID property. + * + * @return possible object is {@link String } + */ + public String getOperatorID() { + return operatorID; + } + + /** + * Sets the value of the operatorID property. + * + * @param value allowed object is {@link String } + */ + public void setOperatorID(String value) { + this.operatorID = value; + } + + /** + * Gets the value of the shiftNumber property. + * + * @return possible object is {@link String } + */ + public String getShiftNumber() { + return shiftNumber; + } + + /** + * Sets the value of the shiftNumber property. + * + * @param value allowed object is {@link String } + */ + public void setShiftNumber(String value) { + this.shiftNumber = value; + } + + /** + * Gets the value of the totalsGroupID property. + * + * @return possible object is {@link String } + */ + public String getTotalsGroupID() { + return totalsGroupID; + } + + /** + * Sets the value of the totalsGroupID property. + * + * @param value allowed object is {@link String } + */ + public void setTotalsGroupID(String value) { + this.totalsGroupID = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/TrackData.java b/src/main/java/com/adyen/model/nexo/TrackData.java new file mode 100644 index 000000000..48577b61f --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/TrackData.java @@ -0,0 +1,112 @@ +package com.adyen.model.nexo; + +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 -- Usage: Generic data structure for a card track, used when the magstripe card reader is located on the Sale Terminal, or for magstripe Card Reader device request. The data structure is also used to store the line at the bottom of a bank check + * + *

Java class for TrackData complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TrackData">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="TrackValue" type="{}TrackValue" />
+ *       <attribute name="TrackNumb" type="{}TrackNumb" default="2" />
+ *       <attribute name="TrackFormat" type="{}TrackFormatType" default="ISO" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TrackData") +public class TrackData { + + @XmlElement(name = "TrackValue") + @Schema(description = "Card track content", minLength = 1, maxLength = 104) + protected String trackValue; + @XmlElement(name = "TrackNumb") + @Schema(description = "Card track number") + protected Integer trackNumb; + @XmlElement(name = "TrackFormat") + @Schema(description = "Card track format") + protected TrackFormatType trackFormat; + + /** + * Gets the value of the trackValue property. + * + * @return possible object is + * {@link String } + */ + public String getTrackValue() { + return trackValue; + } + + /** + * Sets the value of the trackValue property. + * + * @param value allowed object is + * {@link String } + */ + public void setTrackValue(String value) { + this.trackValue = value; + } + + /** + * Gets the value of the trackNumb property. + * + * @return possible object is + * {@link Integer } + */ + public int getTrackNumb() { + if (trackNumb == null) { + return 2; + } else { + return trackNumb; + } + } + + /** + * Sets the value of the trackNumb property. + * + * @param value allowed object is + * {@link Integer } + */ + public void setTrackNumb(Integer value) { + this.trackNumb = value; + } + + /** + * Gets the value of the trackFormat property. + * + * @return possible object is + * {@link TrackFormatType } + */ + public TrackFormatType getTrackFormat() { + if (trackFormat == null) { + return TrackFormatType.ISO; + } else { + return trackFormat; + } + } + + /** + * Sets the value of the trackFormat property. + * + * @param value allowed object is + * {@link TrackFormatType } + */ + public void setTrackFormat(TrackFormatType value) { + this.trackFormat = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/TrackFormatType.java b/src/main/java/com/adyen/model/nexo/TrackFormatType.java new file mode 100644 index 000000000..1292dba94 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/TrackFormatType.java @@ -0,0 +1,98 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for TrackFormatType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="TrackFormatType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="ISO"/>
+ *     <enumeration value="JIS-I"/>
+ *     <enumeration value="JIS-II"/>
+ *     <enumeration value="AAMVA"/>
+ *     <enumeration value="CMC-7"/>
+ *     <enumeration value="E-13B"/>
+ *   </restriction>
+ * </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") + @Schema(description = "Japenese track format I") + JIS_I("JIS-I"), + + /** + * Japenese track format II + */ + @XmlEnumValue("JIS-II") + @Schema(description = "Japenese track format II") + JIS_II("JIS-II"), + + /** + * American driver license + */ + AAMVA("AAMVA"), + + /** + * ((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") + @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.") + CMC_7("CMC-7"), + + /** + * (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") + @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.") + E_13_B("E-13B"); + private final String value; + + TrackFormatType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value track format type. + * + * @param v the v + * @return the track format type + */ + public static TrackFormatType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/TransactionActionType.java b/src/main/java/com/adyen/model/nexo/TransactionActionType.java new file mode 100644 index 000000000..00b40f042 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/TransactionActionType.java @@ -0,0 +1,70 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for TransactionActionType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="TransactionActionType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="StartTransaction"/>
+ *     <enumeration value="AbortTransaction"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "TransactionActionType") +@XmlEnum +public enum TransactionActionType { + + + /** + * Start a transaction by a swipe ahead mechanism, with the services which are enabled. + */ + @XmlEnumValue("StartTransaction") + @Schema(description = "Start a transaction by a swipe ahead mechanism, with the services which are enabled.") + START_TRANSACTION("StartTransaction"), + + /** + * Abort a transaction started either by a CardAcquisition or EnableService with TransactionAction to "StartTransaction", not followed by a service request from + */ + @XmlEnumValue("AbortTransaction") + @Schema(description = "Abort a transaction started either by a CardAcquisition or EnableService with TransactionAction to \"StartTransaction\", not followed by a service request from") + ABORT_TRANSACTION("AbortTransaction"); + private final String value; + + TransactionActionType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value transaction action type. + * + * @param v the v + * @return the transaction action type + */ + public static TransactionActionType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/TransactionConditions.java b/src/main/java/com/adyen/model/nexo/TransactionConditions.java new file mode 100644 index 000000000..d77358808 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/TransactionConditions.java @@ -0,0 +1,322 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Conditions on which the transaction must be processed. + * + *

Java class for TransactionConditions complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TransactionConditions">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="AllowedPaymentBrand" type="{}AllowedPaymentBrand" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="AcquirerID" type="{}AcquirerID" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="AllowedLoyaltyBrand" type="{}AllowedLoyaltyBrand" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="ForceEntryMode" type="{}ForceEntryMode" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="DebitPreferredFlag" type="{}DebitPreferredFlag" default="false" />
+ *       <attribute name="LoyaltyHandling" type="{}LoyaltyHandlingType" default="Forbidden" />
+ *       <attribute name="CustomerLanguage" type="{}ISOLanguage2A" />
+ *       <attribute name="ForceOnlineFlag" type="{}ForceOnlineFlag" default="false" />
+ *       <attribute name="MerchantCategoryCode" type="{}MerchantCategoryCode" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TransactionConditions", propOrder = { + "allowedPaymentBrand", + "acquirerID", + "allowedLoyaltyBrand", + "forceEntryMode" +}) +public class TransactionConditions { + + /** + * The Allowed payment brand. + */ + @XmlElement(name = "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") + @Schema(description = "Identification of the Acquirer --Rule: Restrict to these Acquirer if present") + protected List acquirerID; + /** + * The Allowed loyalty brand. + */ + @XmlElement(name = "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") + @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") + @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") + @Schema(description = "Type of Loyalty processing requested by the Sale System.") + protected LoyaltyHandlingType loyaltyHandling; + /** + * The Customer language. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "The code which identifies the category of the transaction (MCC). --Rule: The payment implies a specific MCC.", minLength = 3, maxLength = 4) + protected String merchantCategoryCode; + + /** + * Gets the value of the allowedPaymentBrand property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the allowedPaymentBrand property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getAllowedPaymentBrand().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * @return the allowed payment brand + */ + public List getAllowedPaymentBrand() { + if (allowedPaymentBrand == null) { + allowedPaymentBrand = new ArrayList<>(); + } + return this.allowedPaymentBrand; + } + + /** + * Gets the value of the acquirerID property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the acquirerID property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getAcquirerID().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * @return the acquirer id + */ + public List getAcquirerID() { + if (acquirerID == null) { + acquirerID = new ArrayList<>(); + } + return this.acquirerID; + } + + /** + * Gets the value of the allowedLoyaltyBrand property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the allowedLoyaltyBrand property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getAllowedLoyaltyBrand().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * @return the allowed loyalty brand + */ + public List getAllowedLoyaltyBrand() { + if (allowedLoyaltyBrand == null) { + allowedLoyaltyBrand = new ArrayList<>(); + } + return this.allowedLoyaltyBrand; + } + + /** + * Gets the value of the forceEntryMode property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the forceEntryMode property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getForceEntryMode().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link ForceEntryModeType } + * + * @return the force entry mode + */ + public List getForceEntryMode() { + if (forceEntryMode == null) { + forceEntryMode = new ArrayList<>(); + } + return this.forceEntryMode; + } + + /** + * Gets the value of the debitPreferredFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isDebitPreferredFlag() { + if (debitPreferredFlag == null) { + return false; + } else { + return debitPreferredFlag; + } + } + + /** + * Sets the value of the debitPreferredFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setDebitPreferredFlag(Boolean value) { + this.debitPreferredFlag = value; + } + + /** + * Gets the value of the loyaltyHandling property. + * + * @return possible object is {@link LoyaltyHandlingType } + */ + public LoyaltyHandlingType getLoyaltyHandling() { + if (loyaltyHandling == null) { + return LoyaltyHandlingType.FORBIDDEN; + } else { + return loyaltyHandling; + } + } + + /** + * Sets the value of the loyaltyHandling property. + * + * @param value allowed object is {@link LoyaltyHandlingType } + */ + public void setLoyaltyHandling(LoyaltyHandlingType value) { + this.loyaltyHandling = value; + } + + /** + * Gets the value of the customerLanguage property. + * + * @return possible object is {@link String } + */ + public String getCustomerLanguage() { + return customerLanguage; + } + + /** + * Sets the value of the customerLanguage property. + * + * @param value allowed object is {@link String } + */ + public void setCustomerLanguage(String value) { + this.customerLanguage = value; + } + + /** + * Gets the value of the forceOnlineFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isForceOnlineFlag() { + if (forceOnlineFlag == null) { + return false; + } else { + return forceOnlineFlag; + } + } + + /** + * Sets the value of the forceOnlineFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setForceOnlineFlag(Boolean value) { + this.forceOnlineFlag = value; + } + + /** + * Gets the value of the merchantCategoryCode property. + * + * @return possible object is {@link String } + */ + public String getMerchantCategoryCode() { + return merchantCategoryCode; + } + + /** + * Sets the value of the merchantCategoryCode property. + * + * @param value allowed object is {@link String } + */ + public void setMerchantCategoryCode(String value) { + this.merchantCategoryCode = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/TransactionIdentification.java b/src/main/java/com/adyen/model/nexo/TransactionIdentification.java new file mode 100644 index 000000000..7272de5b8 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/TransactionIdentification.java @@ -0,0 +1,83 @@ +package com.adyen.model.nexo; + +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; + + +/** + * Definition: Identification of a transaction for the Sale System or the POI System. + * + *

Java class for TransactionIdentification complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TransactionIdentification">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="TransactionID" use="required" type="{}TransactionID" />
+ *       <attribute name="TimeStamp" use="required" type="{}TimeStamp" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TransactionIdentification") +public class TransactionIdentification { + + /** + * The Transaction id. + */ + @XmlElement(name = "TransactionID", required = true) + @Schema(description = "Unique identification of a transaction") + protected String transactionID; + /** + * The Time stamp. + */ + @XmlElement(name = "TimeStamp", required = true) + @Schema(description = "Date and time of a transaction for the Sale System, the POI System or the Acquirer.") + protected XMLGregorianCalendar timeStamp; + + /** + * Gets the value of the transactionID property. + * + * @return possible object is {@link String } + */ + public String getTransactionID() { + return transactionID; + } + + /** + * Sets the value of the transactionID property. + * + * @param value allowed object is {@link String } + */ + public void setTransactionID(String value) { + this.transactionID = value; + } + + /** + * Gets the value of the timeStamp property. + * + * @return possible object is {@link XMLGregorianCalendar } + */ + public XMLGregorianCalendar getTimeStamp() { + return timeStamp; + } + + /** + * Sets the value of the timeStamp property. + * + * @param value allowed object is {@link XMLGregorianCalendar } + */ + public void setTimeStamp(XMLGregorianCalendar value) { + this.timeStamp = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/TransactionStatusRequest.java b/src/main/java/com/adyen/model/nexo/TransactionStatusRequest.java new file mode 100644 index 000000000..3b9ae5c69 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/TransactionStatusRequest.java @@ -0,0 +1,131 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Content of the TransactionStatus Request messageType. -- Usage: It conveys Information requested for status of the last or current Payment, Loyalty or Reversal transaction. + * + *

Java class for TransactionStatusRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TransactionStatusRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MessageReference" type="{}MessageReference" minOccurs="0"/>
+ *         <element name="DocumentQualifier" type="{}DocumentQualifierType" maxOccurs="2" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="ReceiptReprintFlag" type="{}ReceiptReprintFlag" default="false" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TransactionStatusRequest", propOrder = { + "messageReference", + "documentQualifier" +}) +public class TransactionStatusRequest { + + /** + * The Message reference. + */ + @XmlElement(name = "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") + @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") + @Schema(description = "Request to reprint the POI receipt(s).") + protected Boolean receiptReprintFlag; + + /** + * Gets the value of the messageReference property. + * + * @return possible object is {@link MessageReference } + */ + public MessageReference getMessageReference() { + return messageReference; + } + + /** + * Sets the value of the messageReference property. + * + * @param value allowed object is {@link MessageReference } + */ + public void setMessageReference(MessageReference value) { + this.messageReference = value; + } + + /** + * Gets the value of the documentQualifier property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the documentQualifier property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getDocumentQualifier().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link DocumentQualifierType } + * + * @return the document qualifier + */ + public List getDocumentQualifier() { + if (documentQualifier == null) { + documentQualifier = new ArrayList<>(); + } + return this.documentQualifier; + } + + /** + * Gets the value of the receiptReprintFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isReceiptReprintFlag() { + if (receiptReprintFlag == null) { + return false; + } else { + return receiptReprintFlag; + } + } + + /** + * Sets the value of the receiptReprintFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setReceiptReprintFlag(Boolean value) { + this.receiptReprintFlag = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/TransactionStatusResponse.java b/src/main/java/com/adyen/model/nexo/TransactionStatusResponse.java new file mode 100644 index 000000000..af848d8b2 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/TransactionStatusResponse.java @@ -0,0 +1,113 @@ +package com.adyen.model.nexo; + +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 Information related to the status of the last or current Payment, Loyalty or Reversal transaction. + * + *

Java class for TransactionStatusResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TransactionStatusResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="MessageReference" type="{}MessageReference" minOccurs="0"/>
+ *         <element name="RepeatedMessageResponse" type="{}RepeatedMessageResponse" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TransactionStatusResponse", propOrder = { + "response", + "messageReference", + "repeatedMessageResponse" +}) +public class TransactionStatusResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Message reference. + */ + @XmlElement(name = "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") + @Schema(description = "Content of the requested Message Response. --Rule: If Result is Success (process completed)") + protected RepeatedMessageResponse repeatedMessageResponse; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the messageReference property. + * + * @return possible object is {@link MessageReference } + */ + public MessageReference getMessageReference() { + return messageReference; + } + + /** + * Sets the value of the messageReference property. + * + * @param value allowed object is {@link MessageReference } + */ + public void setMessageReference(MessageReference value) { + this.messageReference = value; + } + + /** + * Gets the value of the repeatedMessageResponse property. + * + * @return possible object is {@link RepeatedMessageResponse } + */ + public RepeatedMessageResponse getRepeatedMessageResponse() { + return repeatedMessageResponse; + } + + /** + * Sets the value of the repeatedMessageResponse property. + * + * @param value allowed object is {@link RepeatedMessageResponse } + */ + public void setRepeatedMessageResponse(RepeatedMessageResponse value) { + this.repeatedMessageResponse = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/TransactionToPerform.java b/src/main/java/com/adyen/model/nexo/TransactionToPerform.java new file mode 100644 index 000000000..f713fca36 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/TransactionToPerform.java @@ -0,0 +1,113 @@ +package com.adyen.model.nexo; + +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. + * + *

Java class for TransactionToPerform complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TransactionToPerform">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <element name="PaymentRequest" type="{}PaymentRequest" minOccurs="0"/>
+ *         <element name="LoyaltyRequest" type="{}LoyaltyRequest" minOccurs="0"/>
+ *         <element name="ReversalRequest" type="{}ReversalRequest" minOccurs="0"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TransactionToPerform", propOrder = { + "paymentRequest", + "loyaltyRequest", + "reversalRequest" +}) +public class TransactionToPerform { + + /** + * The Payment request. + */ + @XmlElement(name = "PaymentRequest") + @Schema(description = "Data related to the Payment transaction request.") + protected PaymentRequest paymentRequest; + /** + * The Loyalty request. + */ + @XmlElement(name = "LoyaltyRequest") + @Schema(description = "Data related to the Loyalty transaction request.") + protected LoyaltyRequest loyaltyRequest; + /** + * The Reversal request. + */ + @XmlElement(name = "ReversalRequest") + @Schema(description = "Data related to the Reveraal transaction request.") + protected ReversalRequest reversalRequest; + + /** + * Gets the value of the paymentRequest property. + * + * @return possible object is {@link PaymentRequest } + */ + public PaymentRequest getPaymentRequest() { + return paymentRequest; + } + + /** + * Sets the value of the paymentRequest property. + * + * @param value allowed object is {@link PaymentRequest } + */ + public void setPaymentRequest(PaymentRequest value) { + this.paymentRequest = value; + } + + /** + * Gets the value of the loyaltyRequest property. + * + * @return possible object is {@link LoyaltyRequest } + */ + public LoyaltyRequest getLoyaltyRequest() { + return loyaltyRequest; + } + + /** + * Sets the value of the loyaltyRequest property. + * + * @param value allowed object is {@link LoyaltyRequest } + */ + public void setLoyaltyRequest(LoyaltyRequest value) { + this.loyaltyRequest = value; + } + + /** + * Gets the value of the reversalRequest property. + * + * @return possible object is {@link ReversalRequest } + */ + public ReversalRequest getReversalRequest() { + return reversalRequest; + } + + /** + * Sets the value of the reversalRequest property. + * + * @param value allowed object is {@link ReversalRequest } + */ + public void setReversalRequest(ReversalRequest value) { + this.reversalRequest = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/TransactionTotals.java b/src/main/java/com/adyen/model/nexo/TransactionTotals.java new file mode 100644 index 000000000..e67e313d3 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/TransactionTotals.java @@ -0,0 +1,440 @@ +package com.adyen.model.nexo; + +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 java.util.ArrayList; +import java.util.List; + + +/** + * Definition: Result of the Sale to POI Reconciliation processing. -- Usage: If Result is Success, contains all the totals, classified as required by the Sale in the messageType request. At least, transaction totals are provided per Acquirer, Acquirer Settlement, and Card Brand. + * + *

Java class for TransactionTotals complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TransactionTotals">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="PaymentTotals" type="{}PaymentTotals" maxOccurs="10" minOccurs="0"/>
+ *         <element name="LoyaltyTotals" type="{}LoyaltyTotals" maxOccurs="6" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="PaymentInstrument" use="required" type="{}PaymentInstrumentType" />
+ *       <attribute name="AcquirerID" type="{}AcquirerID" />
+ *       <attribute name="ErrorCondition" type="{}ErrorConditionType" />
+ *       <attribute name="HostReconciliationID" type="{}HostReconciliationID" />
+ *       <attribute name="CardBrand" type="{}CardBrand" />
+ *       <attribute name="POIID" type="{}POIID" />
+ *       <attribute name="SaleID" type="{}SaleID" />
+ *       <attribute name="OperatorID" type="{}OperatorID" />
+ *       <attribute name="ShiftNumber" type="{}ShiftNumber" />
+ *       <attribute name="TotalsGroupID" type="{}TotalsGroupID" />
+ *       <attribute name="PaymentCurrency" type="{}ISOCurrency3A" />
+ *       <attribute name="LoyaltyUnit" type="{}LoyaltyUnitType" default="Point" />
+ *       <attribute name="LoyaltyCurrency" type="{}ISOCurrency3A" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TransactionTotals", propOrder = { + "paymentTotals", + "loyaltyTotals" +}) +public class TransactionTotals { + + /** + * The Payment totals. + */ + @XmlElement(name = "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") + @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) + @Schema(description = "Type of payment instrument.") + protected PaymentInstrumentType paymentInstrumentType; + /** + * The Acquirer id. + */ + @XmlElement(name = "AcquirerID") + @Schema(description = "Identification of the Acquirer --Rule: If available") + protected String acquirerID; + /** + * The Error condition. + */ + @XmlElement(name = "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") + @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") + @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") + @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") + @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") + @Schema(description = "Identification of the Cashier or Operator. --Rule: If requested in the message request") + protected String operatorID; + /** + * The Shift number. + */ + @XmlElement(name = "ShiftNumber") + @Schema(description = "Shift number. --Rule: If requested in the message request") + protected String shiftNumber; + /** + * The Totals group id. + */ + @XmlElement(name = "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") + @Schema(description = "Currency of a monetary amount.") + protected String paymentCurrency; + /** + * The Loyalty unit. + */ + @XmlElement(name = "LoyaltyUnit") + @Schema(description = "Unit of a loyalty amount.") + protected LoyaltyUnitType loyaltyUnit; + /** + * The Loyalty currency. + */ + @XmlElement(name = "LoyaltyCurrency") + @Schema(description = "Currency of a monetary amount. --Rule: If LoyaltyUnit is Monetary") + protected String loyaltyCurrency; + + /** + * Gets the value of the paymentTotals property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the paymentTotals property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getPaymentTotals().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link PaymentTotals } + * + * @return the payment totals + */ + public List getPaymentTotals() { + if (paymentTotals == null) { + paymentTotals = new ArrayList<>(); + } + return this.paymentTotals; + } + + /** + * Gets the value of the loyaltyTotals property. + *

+ *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the loyaltyTotals property. + *

+ *

+ * For example, to add a new item, do as follows: + *

+     *    getLoyaltyTotals().add(newItem);
+     * 
+ *

+ *

+ *

+ * Objects of the following type(s) are allowed in the list + * {@link LoyaltyTotals } + * + * @return the loyalty totals + */ + public List getLoyaltyTotals() { + if (loyaltyTotals == null) { + loyaltyTotals = new ArrayList<>(); + } + return this.loyaltyTotals; + } + + /** + * Gets the value of the paymentInstrumentType property. + * + * @return possible object is {@link PaymentInstrumentType } + */ + public PaymentInstrumentType getPaymentInstrumentType() { + return paymentInstrumentType; + } + + /** + * Sets the value of the paymentInstrumentType property. + * + * @param value allowed object is {@link PaymentInstrumentType } + */ + public void setPaymentInstrumentType(PaymentInstrumentType value) { + this.paymentInstrumentType = value; + } + + /** + * Gets the value of the acquirerID property. + * + * @return possible object is {@link String } + */ + public String getAcquirerID() { + return acquirerID; + } + + /** + * Sets the value of the acquirerID property. + * + * @param value allowed object is {@link String } + */ + public void setAcquirerID(String value) { + this.acquirerID = value; + } + + /** + * Gets the value of the errorCondition property. + * + * @return possible object is {@link ErrorConditionType } + */ + public ErrorConditionType getErrorCondition() { + return errorCondition; + } + + /** + * Sets the value of the errorCondition property. + * + * @param value allowed object is {@link ErrorConditionType } + */ + public void setErrorCondition(ErrorConditionType value) { + this.errorCondition = value; + } + + /** + * Gets the value of the hostReconciliationID property. + * + * @return possible object is {@link String } + */ + public String getHostReconciliationID() { + return hostReconciliationID; + } + + /** + * Sets the value of the hostReconciliationID property. + * + * @param value allowed object is {@link String } + */ + public void setHostReconciliationID(String value) { + this.hostReconciliationID = value; + } + + /** + * Gets the value of the cardBrand property. + * + * @return possible object is {@link String } + */ + public String getCardBrand() { + return cardBrand; + } + + /** + * Sets the value of the cardBrand property. + * + * @param value allowed object is {@link String } + */ + public void setCardBrand(String value) { + this.cardBrand = value; + } + + /** + * Gets the value of the poiid property. + * + * @return possible object is {@link String } + */ + public String getPOIID() { + return poiid; + } + + /** + * Sets the value of the poiid property. + * + * @param value allowed object is {@link String } + */ + public void setPOIID(String value) { + this.poiid = value; + } + + /** + * Gets the value of the saleID property. + * + * @return possible object is {@link String } + */ + public String getSaleID() { + return saleID; + } + + /** + * Sets the value of the saleID property. + * + * @param value allowed object is {@link String } + */ + public void setSaleID(String value) { + this.saleID = value; + } + + /** + * Gets the value of the operatorID property. + * + * @return possible object is {@link String } + */ + public String getOperatorID() { + return operatorID; + } + + /** + * Sets the value of the operatorID property. + * + * @param value allowed object is {@link String } + */ + public void setOperatorID(String value) { + this.operatorID = value; + } + + /** + * Gets the value of the shiftNumber property. + * + * @return possible object is {@link String } + */ + public String getShiftNumber() { + return shiftNumber; + } + + /** + * Sets the value of the shiftNumber property. + * + * @param value allowed object is {@link String } + */ + public void setShiftNumber(String value) { + this.shiftNumber = value; + } + + /** + * Gets the value of the totalsGroupID property. + * + * @return possible object is {@link String } + */ + public String getTotalsGroupID() { + return totalsGroupID; + } + + /** + * Sets the value of the totalsGroupID property. + * + * @param value allowed object is {@link String } + */ + public void setTotalsGroupID(String value) { + this.totalsGroupID = value; + } + + /** + * Gets the value of the paymentCurrency property. + * + * @return possible object is {@link String } + */ + public String getPaymentCurrency() { + return paymentCurrency; + } + + /** + * Sets the value of the paymentCurrency property. + * + * @param value allowed object is {@link String } + */ + public void setPaymentCurrency(String value) { + this.paymentCurrency = value; + } + + /** + * Gets the value of the loyaltyUnit property. + * + * @return possible object is {@link LoyaltyUnitType } + */ + public LoyaltyUnitType getLoyaltyUnit() { + if (loyaltyUnit == null) { + return LoyaltyUnitType.POINT; + } else { + return loyaltyUnit; + } + } + + /** + * Sets the value of the loyaltyUnit property. + * + * @param value allowed object is {@link LoyaltyUnitType } + */ + public void setLoyaltyUnit(LoyaltyUnitType value) { + this.loyaltyUnit = value; + } + + /** + * Gets the value of the loyaltyCurrency property. + * + * @return possible object is {@link String } + */ + public String getLoyaltyCurrency() { + return loyaltyCurrency; + } + + /** + * Sets the value of the loyaltyCurrency property. + * + * @param value allowed object is {@link String } + */ + public void setLoyaltyCurrency(String value) { + this.loyaltyCurrency = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/TransactionType.java b/src/main/java/com/adyen/model/nexo/TransactionType.java new file mode 100644 index 000000000..373d12105 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/TransactionType.java @@ -0,0 +1,206 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for TransactionType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="TransactionType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Debit"/>
+ *     <enumeration value="Credit"/>
+ *     <enumeration value="ReverseDebit"/>
+ *     <enumeration value="ReverseCredit"/>
+ *     <enumeration value="OneTimeReservation"/>
+ *     <enumeration value="CompletedDeffered"/>
+ *     <enumeration value="FirstReservation"/>
+ *     <enumeration value="UpdateReservation"/>
+ *     <enumeration value="CompletedReservation"/>
+ *     <enumeration value="CashAdvance"/>
+ *     <enumeration value="IssuerInstalment"/>
+ *     <enumeration value="Declined"/>
+ *     <enumeration value="Failed"/>
+ *     <enumeration value="Award"/>
+ *     <enumeration value="ReverseAward"/>
+ *     <enumeration value="Redemption"/>
+ *     <enumeration value="ReverseRedemption"/>
+ *     <enumeration value="Rebate"/>
+ *     <enumeration value="ReverseRebate"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "TransactionType") +@XmlEnum +public enum TransactionType { + + + /** + * Payment Debit transactions (e.g. if PaymentType is "Normal") + */ + @XmlEnumValue("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") + @Schema(description = "Payment Credit transactions (e.g. if PaymentType is \"Refund\")") + CREDIT("Credit"), + + /** + * Payment Reversal Debit transactions + */ + @XmlEnumValue("ReverseDebit") + @Schema(description = "Payment Reversal Debit transactions") + REVERSE_DEBIT("ReverseDebit"), + + /** + * Payment Reversal Credit transactions + */ + @XmlEnumValue("ReverseCredit") + @Schema(description = "Payment Reversal Credit transactions") + REVERSE_CREDIT("ReverseCredit"), + + /** + * Outstanding OneTimeReservation transactions, i.e. between OneTimeReservation and Completion + */ + @XmlEnumValue("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") + @Schema(description = "OneTimeReservation transactions which have been completed by the Completion.") + COMPLETED_DEFFERED("CompletedDeffered"), + + /** + * Outstanding FirstReservation transactions, i.e. between FirstReservation and UpdateReservation or Completion + */ + @XmlEnumValue("FirstReservation") + @Schema(description = "Outstanding FirstReservation transactions, i.e. between FirstReservation and UpdateReservation or Completion") + FIRST_RESERVATION("FirstReservation"), + + /** + * Outstanding UpdateReservation transactions, i.e. between UpdateReservation and UpdateReservation or Completion + */ + @XmlEnumValue("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") + @Schema(description = "Reservation transactions which have been completed by the Completion.") + COMPLETED_RESERVATION("CompletedReservation"), + + /** + * Cash Advance transactions. + */ + @XmlEnumValue("CashAdvance") + @Schema(description = "Cash Advance transactions.") + CASH_ADVANCE("CashAdvance"), + + /** + * Issuer instalment transactions. + */ + @XmlEnumValue("IssuerInstalment") + @Schema(description = "Issuer instalment transactions.") + ISSUER_INSTALMENT("IssuerInstalment"), + + /** + * ResultErrorCondition + */ + @XmlEnumValue("Declined") + @Schema(description = "ResultErrorCondition") + DECLINED("Declined"), + + /** + * ResultErrorCondition + */ + @XmlEnumValue("Failed") + @Schema(description = "ResultErrorCondition") + FAILED("Failed"), + + /** + * Loyalty Award Transaction + */ + @XmlEnumValue("Award") + @Schema(description = "Loyalty Award Transaction") + AWARD("Award"), + + /** + * Loyalty Reversal Award Transaction + */ + @XmlEnumValue("ReverseAward") + @Schema(description = "Loyalty Reversal Award Transaction") + REVERSE_AWARD("ReverseAward"), + + /** + * Loyalty Redemption Transaction + */ + @XmlEnumValue("Redemption") + @Schema(description = "Loyalty Redemption Transaction") + REDEMPTION("Redemption"), + + /** + * Loyalty Reversal Redemption Transaction + */ + @XmlEnumValue("ReverseRedemption") + @Schema(description = "Loyalty Reversal Redemption Transaction") + REVERSE_REDEMPTION("ReverseRedemption"), + + /** + * Loyalty Rebate Transaction + */ + @XmlEnumValue("Rebate") + @Schema(description = "Loyalty Rebate Transaction") + REBATE("Rebate"), + + /** + * Loyalty Reversal Rebate Transaction + */ + @XmlEnumValue("ReverseRebate") + @Schema(description = "Loyalty Reversal Rebate Transaction") + REVERSE_REBATE("ReverseRebate"); + private final String value; + + TransactionType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value transaction type. + * + * @param v the v + * @return the transaction type + */ + public static TransactionType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/TransmitRequest.java b/src/main/java/com/adyen/model/nexo/TransmitRequest.java new file mode 100644 index 000000000..488fbf7a7 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/TransmitRequest.java @@ -0,0 +1,141 @@ +package com.adyen.model.nexo; + +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 java.math.BigInteger; + + +/** + * Definition: Content of the Transmit Request messageType. -- Usage: It contains a messageType to transmit. + * + *

Java class for TransmitRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TransmitRequest">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Message" type="{}Message"/>
+ *       </sequence>
+ *       <attribute name="WaitResponseFlag" type="{}WaitResponseFlag" default="false" />
+ *       <attribute name="MaximumTransmitTime" use="required" type="{}MaximumTransmitTime" />
+ *       <attribute name="DestinationAddress" use="required" type="{}DestinationAddress" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TransmitRequest", propOrder = { + "message" +}) +public class TransmitRequest { + + /** + * The Message. + */ + @XmlElement(name = "Message", required = true) + @Schema(description = "Content of a transmitted message.") + protected byte[] message; + /** + * The Wait response flag. + */ + @XmlElement(name = "WaitResponseFlag") + @Schema(description = "Indicates that a response message has to be received.") + protected Boolean waitResponseFlag; + /** + * The Maximum transmit time. + */ + @XmlElement(name = "MaximumTransmitTime", required = true) + @Schema(description = "Maximum time in seconds of transmission.") + protected BigInteger maximumTransmitTime; + /** + * The Destination address. + */ + @XmlElement(name = "DestinationAddress", required = true) + @Schema(description = "Transport address containing the IP address or the DNS (Domain Name Server) address, followed by the character ':' and") + protected String destinationAddress; + + /** + * Gets the value of the messageType property. + * + * @return possible object is byte[] + */ + public byte[] getMessage() { + return message; + } + + /** + * Sets the value of the messageType property. + * + * @param value allowed object is byte[] + */ + public void setMessage(byte[] value) { + this.message = value; + } + + /** + * Gets the value of the waitResponseFlag property. + * + * @return possible object is {@link Boolean } + */ + public boolean isWaitResponseFlag() { + if (waitResponseFlag == null) { + return false; + } else { + return waitResponseFlag; + } + } + + /** + * Sets the value of the waitResponseFlag property. + * + * @param value allowed object is {@link Boolean } + */ + public void setWaitResponseFlag(Boolean value) { + this.waitResponseFlag = value; + } + + /** + * Gets the value of the maximumTransmitTime property. + * + * @return possible object is {@link BigInteger } + */ + public BigInteger getMaximumTransmitTime() { + return maximumTransmitTime; + } + + /** + * Sets the value of the maximumTransmitTime property. + * + * @param value allowed object is {@link BigInteger } + */ + public void setMaximumTransmitTime(BigInteger value) { + this.maximumTransmitTime = value; + } + + /** + * Gets the value of the destinationAddress property. + * + * @return possible object is {@link String } + */ + public String getDestinationAddress() { + return destinationAddress; + } + + /** + * Sets the value of the destinationAddress property. + * + * @param value allowed object is {@link String } + */ + public void setDestinationAddress(String value) { + this.destinationAddress = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/TransmitResponse.java b/src/main/java/com/adyen/model/nexo/TransmitResponse.java new file mode 100644 index 000000000..449e1f2d8 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/TransmitResponse.java @@ -0,0 +1,87 @@ +package com.adyen.model.nexo; + +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 the transmission. + * + *

Java class for TransmitResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TransmitResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Response" type="{}Response"/>
+ *         <element name="Message" type="{}Message" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TransmitResponse", propOrder = { + "response", + "message" +}) +public class TransmitResponse { + + /** + * The Response. + */ + @XmlElement(name = "Response", required = true) + @Schema(description = "Result of a message request processing.") + protected Response response; + /** + * The Message. + */ + @XmlElement(name = "Message") + @Schema(description = "Content of a transmitted message.") + protected byte[] message; + + /** + * Gets the value of the response property. + * + * @return possible object is {@link Response } + */ + public Response getResponse() { + return response; + } + + /** + * Sets the value of the response property. + * + * @param value allowed object is {@link Response } + */ + public void setResponse(Response value) { + this.response = value; + } + + /** + * Gets the value of the messageType property. + * + * @return possible object is byte[] + */ + public byte[] getMessage() { + return message; + } + + /** + * Sets the value of the messageType property. + * + * @param value allowed object is byte[] + */ + public void setMessage(byte[] value) { + this.message = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/UTMCoordinates.java b/src/main/java/com/adyen/model/nexo/UTMCoordinates.java new file mode 100644 index 000000000..0b43fc046 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/UTMCoordinates.java @@ -0,0 +1,113 @@ +package com.adyen.model.nexo; + +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 system. -- Usage: Identifies the geographic location of a mobile phone by GPS using the WGS84 ellipsoid spatial reference system. + * + *

Java class for UTMCoordinates complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="UTMCoordinates">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="UTMZone" type="{}UTMZone"/>
+ *         <element name="UTMEastward" type="{}UTMEastward"/>
+ *         <element name="UTMNorthward" type="{}UTMNorthward"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "UTMCoordinates", propOrder = { + "utmZone", + "utmEastward", + "utmNorthward" +}) +public class UTMCoordinates { + + /** + * The Utm zone. + */ + @XmlElement(name = "UTMZone", required = true) + @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) + @Schema(description = "X-coordinate of the Universal Transverse Mercator coordinate system.") + protected String utmEastward; + /** + * The Utm northward. + */ + @XmlElement(name = "UTMNorthward", required = true) + @Schema(description = "Y-coordinate of the Universal Transverse Mercator coordinate system.") + protected String utmNorthward; + + /** + * Gets the value of the utmZone property. + * + * @return possible object is {@link String } + */ + public String getUTMZone() { + return utmZone; + } + + /** + * Sets the value of the utmZone property. + * + * @param value allowed object is {@link String } + */ + public void setUTMZone(String value) { + this.utmZone = value; + } + + /** + * Gets the value of the utmEastward property. + * + * @return possible object is {@link String } + */ + public String getUTMEastward() { + return utmEastward; + } + + /** + * Sets the value of the utmEastward property. + * + * @param value allowed object is {@link String } + */ + public void setUTMEastward(String value) { + this.utmEastward = value; + } + + /** + * Gets the value of the utmNorthward property. + * + * @return possible object is {@link String } + */ + public String getUTMNorthward() { + return utmNorthward; + } + + /** + * Sets the value of the utmNorthward property. + * + * @param value allowed object is {@link String } + */ + public void setUTMNorthward(String value) { + this.utmNorthward = value; + } + +} diff --git a/src/main/java/com/adyen/model/nexo/UnitOfMeasureType.java b/src/main/java/com/adyen/model/nexo/UnitOfMeasureType.java new file mode 100644 index 000000000..0b56250c0 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/UnitOfMeasureType.java @@ -0,0 +1,206 @@ +package com.adyen.model.nexo; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for UnitOfMeasureType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="UnitOfMeasureType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="Case"/>
+ *     <enumeration value="Foot"/>
+ *     <enumeration value="UKGallon"/>
+ *     <enumeration value="USGallon"/>
+ *     <enumeration value="Gram"/>
+ *     <enumeration value="Inch"/>
+ *     <enumeration value="Kilogram"/>
+ *     <enumeration value="Pound"/>
+ *     <enumeration value="Meter"/>
+ *     <enumeration value="Centimetre"/>
+ *     <enumeration value="Litre"/>
+ *     <enumeration value="Centilitre"/>
+ *     <enumeration value="Ounce"/>
+ *     <enumeration value="Quart"/>
+ *     <enumeration value="Pint"/>
+ *     <enumeration value="Mile"/>
+ *     <enumeration value="Kilometre"/>
+ *     <enumeration value="Yard"/>
+ *     <enumeration value="Other"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "UnitOfMeasureType") +@XmlEnum +public enum UnitOfMeasureType { + + + /** + * Case or Carton + */ + @XmlEnumValue("Case") + @Schema(description = "Case or Carton") + CASE("Case"), + + /** + * Foot + */ + @XmlEnumValue("Foot") + @Schema(description = "Foot") + FOOT("Foot"), + + /** + * Gallon (UK) + */ + @XmlEnumValue("UKGallon") + @Schema(description = "Gallon (UK)") + UK_GALLON("UKGallon"), + + /** + * Gallon (US) + */ + @XmlEnumValue("USGallon") + @Schema(description = "Gallon (US)") + US_GALLON("USGallon"), + + /** + * Gram + */ + @XmlEnumValue("Gram") + @Schema(description = "Gram") + GRAM("Gram"), + + /** + * Inch + */ + @XmlEnumValue("Inch") + @Schema(description = "Inch") + INCH("Inch"), + + /** + * Kilogram + */ + @XmlEnumValue("Kilogram") + @Schema(description = "Kilogram") + KILOGRAM("Kilogram"), + + /** + * Pound + */ + @XmlEnumValue("Pound") + @Schema(description = "Pound") + POUND("Pound"), + + /** + * Meter + */ + @XmlEnumValue("Meter") + @Schema(description = "Meter") + METER("Meter"), + + /** + * Centimetre + */ + @XmlEnumValue("Centimetre") + @Schema(description = "Centimetre") + CENTIMETRE("Centimetre"), + + /** + * Litre + */ + @XmlEnumValue("Litre") + @Schema(description = "Litre") + LITRE("Litre"), + + /** + * Centilitre + */ + @XmlEnumValue("Centilitre") + @Schema(description = "Centilitre") + CENTILITRE("Centilitre"), + + /** + * Ounce + */ + @XmlEnumValue("Ounce") + @Schema(description = "Ounce") + OUNCE("Ounce"), + + /** + * Quart + */ + @XmlEnumValue("Quart") + @Schema(description = "Quart") + QUART("Quart"), + + /** + * Pint + */ + @XmlEnumValue("Pint") + @Schema(description = "Pint") + PINT("Pint"), + + /** + * Mile + */ + @XmlEnumValue("Mile") + @Schema(description = "Mile") + MILE("Mile"), + + /** + * Kilometre + */ + @XmlEnumValue("Kilometre") + @Schema(description = "Kilometre") + KILOMETRE("Kilometre"), + + /** + * Yard + */ + @XmlEnumValue("Yard") + @Schema(description = "Yard") + YARD("Yard"), + + /** + * Other unit than the previous one + */ + @XmlEnumValue("Other") + @Schema(description = "Other unit than the previous one") + OTHER("Other"); + private final String value; + + UnitOfMeasureType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value unit of measure type. + * + * @param v the v + * @return the unit of measure type + */ + public static UnitOfMeasureType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/nexo/VersionType.java b/src/main/java/com/adyen/model/nexo/VersionType.java new file mode 100644 index 000000000..cec569556 --- /dev/null +++ b/src/main/java/com/adyen/model/nexo/VersionType.java @@ -0,0 +1,94 @@ +package com.adyen.model.nexo; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; +import java.util.Arrays; + + +/** + *

Java class for VersionType. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <simpleType name="VersionType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="v0"/>
+ *     <enumeration value="v1"/>
+ *     <enumeration value="v2"/>
+ *     <enumeration value="v3"/>
+ *     <enumeration value="v4"/>
+ *     <enumeration value="v5"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ */ +@XmlType(name = "VersionType") +@XmlEnum +public enum VersionType { + + + /** + * Version 0 + */ + @XmlEnumValue("v0") + V_0("v0"), + + /** + * Version 1 + */ + @XmlEnumValue("v1") + V_1("v1"), + + /** + * Version 2 + */ + @XmlEnumValue("v2") + V_2("v2"), + + /** + * Version 3 + */ + @XmlEnumValue("v3") + V_3("v3"), + + /** + * Version 4 + */ + @XmlEnumValue("v4") + V_4("v4"), + + /** + * Version 5 + */ + @XmlEnumValue("v5") + V_5("v5"); + private final String value; + + VersionType(String v) { + value = v; + } + + /** + * Value string. + * + * @return the string + */ + public String value() { + return value; + } + + /** + * From value version type. + * + * @param v the v + * @return the version type + */ + public static VersionType fromValue(String v) { + return Arrays.stream(values()). + filter(s -> s.value.equals(v)). + findFirst().orElseThrow(() -> new IllegalArgumentException(v)); + } + +} diff --git a/src/main/java/com/adyen/model/terminal/AbortRequest.java b/src/main/java/com/adyen/model/terminal/AbortRequest.java deleted file mode 100644 index 0c9140b1f..000000000 --- a/src/main/java/com/adyen/model/terminal/AbortRequest.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.DisplayOutput; -import com.adyen.model.terminal.MessageReference; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information requested for identification of the message request carrying the transaction to abort. A message to display on the CustomerError Device could be sent by the Sale System (DisplayOutput). Body of the Abort Request message. - */ -@ApiModel(description = "It conveys Information requested for identification of the message request carrying the transaction to abort. A message to display on the CustomerError Device could be sent by the Sale System (DisplayOutput). Body of the Abort Request message.") -@JsonPropertyOrder({ - AbortRequest.JSON_PROPERTY_MESSAGE_REFERENCE, - AbortRequest.JSON_PROPERTY_ABORT_REASON, - AbortRequest.JSON_PROPERTY_DISPLAY_OUTPUT -}) - -public class AbortRequest { - public static final String JSON_PROPERTY_MESSAGE_REFERENCE = "MessageReference"; - private MessageReference messageReference; - - public static final String JSON_PROPERTY_ABORT_REASON = "AbortReason"; - private String abortReason; - - public static final String JSON_PROPERTY_DISPLAY_OUTPUT = "DisplayOutput"; - private DisplayOutput displayOutput; - - public AbortRequest() { - } - - public AbortRequest messageReference(MessageReference messageReference) { - this.messageReference = messageReference; - return this; - } - - /** - * Get messageReference - * @return messageReference - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_MESSAGE_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public MessageReference getMessageReference() { - return messageReference; - } - - - /** - * messageReference - * - * @param messageReference - */ - @JsonProperty(JSON_PROPERTY_MESSAGE_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessageReference(MessageReference messageReference) { - this.messageReference = messageReference; - } - - - public AbortRequest abortReason(String abortReason) { - this.abortReason = abortReason; - return this; - } - - /** - * Reason of aborting a transaction. - * @return abortReason - **/ - @ApiModelProperty(required = true, value = "Reason of aborting a transaction.") - @JsonProperty(JSON_PROPERTY_ABORT_REASON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getAbortReason() { - return abortReason; - } - - - /** - * Reason of aborting a transaction. - * - * @param abortReason - */ - @JsonProperty(JSON_PROPERTY_ABORT_REASON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAbortReason(String abortReason) { - this.abortReason = abortReason; - } - - - public AbortRequest displayOutput(DisplayOutput displayOutput) { - this.displayOutput = displayOutput; - return this; - } - - /** - * Get displayOutput - * @return displayOutput - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DISPLAY_OUTPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public DisplayOutput getDisplayOutput() { - return displayOutput; - } - - - /** - * displayOutput - * - * @param displayOutput - */ - @JsonProperty(JSON_PROPERTY_DISPLAY_OUTPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDisplayOutput(DisplayOutput displayOutput) { - this.displayOutput = displayOutput; - } - - - /** - * Return true if this AbortRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AbortRequest abortRequest = (AbortRequest) o; - return Objects.equals(this.messageReference, abortRequest.messageReference) && - Objects.equals(this.abortReason, abortRequest.abortReason) && - Objects.equals(this.displayOutput, abortRequest.displayOutput); - } - - @Override - public int hashCode() { - return Objects.hash(messageReference, abortReason, displayOutput); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AbortRequest {\n"); - sb.append(" messageReference: ").append(toIndentedString(messageReference)).append("\n"); - sb.append(" abortReason: ").append(toIndentedString(abortReason)).append("\n"); - sb.append(" displayOutput: ").append(toIndentedString(displayOutput)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of AbortRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of AbortRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to AbortRequest - */ - public static AbortRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, AbortRequest.class); - } -/** - * Convert an instance of AbortRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/AbstractOpenApiSchema.java b/src/main/java/com/adyen/model/terminal/AbstractOpenApiSchema.java deleted file mode 100644 index 061420306..000000000 --- a/src/main/java/com/adyen/model/terminal/AbstractOpenApiSchema.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.lang.reflect.Type; -import java.util.Map; -import jakarta.ws.rs.core.GenericType; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec - */ - -public abstract class AbstractOpenApiSchema { - - // store the actual instance of the schema/object - private Object instance; - - // is nullable - private Boolean isNullable; - - // schema type (e.g. oneOf, anyOf) - private final String schemaType; - - public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { - this.schemaType = schemaType; - this.isNullable = isNullable; - } - - /** - * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object - * - * @return an instance of the actual schema/object - */ - public abstract Map getSchemas(); - - /** - * Get the actual instance - * - * @return an instance of the actual schema/object - */ - @JsonValue - public Object getActualInstance() {return instance;} - - /** - * Set the actual instance - * - * @param instance the actual instance of the schema/object - */ - public void setActualInstance(Object instance) {this.instance = instance;} - - /** - * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well - * - * @return an instance of the actual schema/object - */ - public Object getActualInstanceRecursively() { - return getActualInstanceRecursively(this); - } - - private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { - if (object.getActualInstance() == null) { - return null; - } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { - return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); - } else { - return object.getActualInstance(); - } - } - - /** - * Get the schema type (e.g. anyOf, oneOf) - * - * @return the schema type - */ - public String getSchemaType() { - return schemaType; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ").append(getClass()).append(" {\n"); - sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); - sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); - sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; - return Objects.equals(this.instance, a.instance) && - Objects.equals(this.isNullable, a.isNullable) && - Objects.equals(this.schemaType, a.schemaType); - } - - @Override - public int hashCode() { - return Objects.hash(instance, isNullable, schemaType); - } - - /** - * Is nullable - * - * @return true if it's nullable - */ - public Boolean isNullable() { - if (Boolean.TRUE.equals(isNullable)) { - return Boolean.TRUE; - } else { - return Boolean.FALSE; - } - } - - - -} diff --git a/src/main/java/com/adyen/model/terminal/AccountType.java b/src/main/java/com/adyen/model/terminal/AccountType.java deleted file mode 100644 index 6f6a0add0..000000000 --- a/src/main/java/com/adyen/model/terminal/AccountType.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets AccountType - */ -public enum AccountType { - - CARDTOTALS("CardTotals"), - - CHECKING("Checking"), - - CREDITCARD("CreditCard"), - - DEFAULT("Default"), - - EPURSECARD("EpurseCard"), - - INVESTMENT("Investment"), - - SAVINGS("Savings"), - - UNIVERSAL("Universal"); - - private String value; - - AccountType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static AccountType fromValue(String value) { - for (AccountType b : AccountType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/AdminRequest.java b/src/main/java/com/adyen/model/terminal/AdminRequest.java deleted file mode 100644 index 0107f636c..000000000 --- a/src/main/java/com/adyen/model/terminal/AdminRequest.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Empty. Content of the Custom Admin Request message. - */ -@ApiModel(description = "Empty. Content of the Custom Admin Request message.") -@JsonPropertyOrder({ - AdminRequest.JSON_PROPERTY_SERVICE_IDENTIFICATION -}) - -public class AdminRequest { - public static final String JSON_PROPERTY_SERVICE_IDENTIFICATION = "ServiceIdentification"; - private String serviceIdentification; - - public AdminRequest() { - } - - public AdminRequest serviceIdentification(String serviceIdentification) { - this.serviceIdentification = serviceIdentification; - return this; - } - - /** - * Identification of the administrative service to process. - * @return serviceIdentification - **/ - @ApiModelProperty(value = "Identification of the administrative service to process.") - @JsonProperty(JSON_PROPERTY_SERVICE_IDENTIFICATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getServiceIdentification() { - return serviceIdentification; - } - - - /** - * Identification of the administrative service to process. - * - * @param serviceIdentification - */ - @JsonProperty(JSON_PROPERTY_SERVICE_IDENTIFICATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setServiceIdentification(String serviceIdentification) { - this.serviceIdentification = serviceIdentification; - } - - - /** - * Return true if this AdminRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdminRequest adminRequest = (AdminRequest) o; - return Objects.equals(this.serviceIdentification, adminRequest.serviceIdentification); - } - - @Override - public int hashCode() { - return Objects.hash(serviceIdentification); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdminRequest {\n"); - sb.append(" serviceIdentification: ").append(toIndentedString(serviceIdentification)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of AdminRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of AdminRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to AdminRequest - */ - public static AdminRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, AdminRequest.class); - } -/** - * Convert an instance of AdminRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/AdminResponse.java b/src/main/java/com/adyen/model/terminal/AdminResponse.java deleted file mode 100644 index d02b8c4f9..000000000 --- a/src/main/java/com/adyen/model/terminal/AdminResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.Response; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys the result of the Custom Admin. Content of the Custom Admin Response message. - */ -@ApiModel(description = "It conveys the result of the Custom Admin. Content of the Custom Admin Response message.") -@JsonPropertyOrder({ - AdminResponse.JSON_PROPERTY_RESPONSE -}) - -public class AdminResponse { - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public AdminResponse() { - } - - public AdminResponse response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - /** - * Return true if this AdminResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdminResponse adminResponse = (AdminResponse) o; - return Objects.equals(this.response, adminResponse.response); - } - - @Override - public int hashCode() { - return Objects.hash(response); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdminResponse {\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of AdminResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of AdminResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to AdminResponse - */ - public static AdminResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, AdminResponse.class); - } -/** - * Convert an instance of AdminResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/Alignment.java b/src/main/java/com/adyen/model/terminal/Alignment.java deleted file mode 100644 index 0bd4e468f..000000000 --- a/src/main/java/com/adyen/model/terminal/Alignment.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets Alignment - */ -public enum Alignment { - - CENTRED("Centred"), - - JUSTIFIED("Justified"), - - LEFT("Left"), - - RIGHT("Right"); - - private String value; - - Alignment(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Alignment fromValue(String value) { - for (Alignment b : Alignment.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/AllowedProduct.java b/src/main/java/com/adyen/model/terminal/AllowedProduct.java deleted file mode 100644 index ae89db462..000000000 --- a/src/main/java/com/adyen/model/terminal/AllowedProduct.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Product that is payable by the payment card. Product codes that are payable by the payment card. - */ -@ApiModel(description = "Product that is payable by the payment card. Product codes that are payable by the payment card.") -@JsonPropertyOrder({ - AllowedProduct.JSON_PROPERTY_PRODUCT_CODE, - AllowedProduct.JSON_PROPERTY_EAN_UPC, - AllowedProduct.JSON_PROPERTY_PRODUCT_LABEL, - AllowedProduct.JSON_PROPERTY_ADDITIONAL_PRODUCT_INFO -}) - -public class AllowedProduct { - public static final String JSON_PROPERTY_PRODUCT_CODE = "ProductCode"; - private Integer productCode; - - public static final String JSON_PROPERTY_EAN_UPC = "EanUpc"; - private Integer eanUpc; - - public static final String JSON_PROPERTY_PRODUCT_LABEL = "ProductLabel"; - private String productLabel; - - public static final String JSON_PROPERTY_ADDITIONAL_PRODUCT_INFO = "AdditionalProductInfo"; - private String additionalProductInfo; - - public AllowedProduct() { - } - - public AllowedProduct productCode(Integer productCode) { - this.productCode = productCode; - return this; - } - - /** - * Product code of item purchased with the transaction. - * minimum: 1 - * maximum: 20 - * @return productCode - **/ - @ApiModelProperty(required = true, value = "Product code of item purchased with the transaction.") - @JsonProperty(JSON_PROPERTY_PRODUCT_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getProductCode() { - return productCode; - } - - - /** - * Product code of item purchased with the transaction. - * - * @param productCode - */ - @JsonProperty(JSON_PROPERTY_PRODUCT_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProductCode(Integer productCode) { - this.productCode = productCode; - } - - - public AllowedProduct eanUpc(Integer eanUpc) { - this.eanUpc = eanUpc; - return this; - } - - /** - * Standard product code of item purchased with the transaction. - * @return eanUpc - **/ - @ApiModelProperty(value = "Standard product code of item purchased with the transaction.") - @JsonProperty(JSON_PROPERTY_EAN_UPC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getEanUpc() { - return eanUpc; - } - - - /** - * Standard product code of item purchased with the transaction. - * - * @param eanUpc - */ - @JsonProperty(JSON_PROPERTY_EAN_UPC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEanUpc(Integer eanUpc) { - this.eanUpc = eanUpc; - } - - - public AllowedProduct productLabel(String productLabel) { - this.productLabel = productLabel; - return this; - } - - /** - * Product name of an item purchased with the transaction. - * @return productLabel - **/ - @ApiModelProperty(value = "Product name of an item purchased with the transaction.") - @JsonProperty(JSON_PROPERTY_PRODUCT_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getProductLabel() { - return productLabel; - } - - - /** - * Product name of an item purchased with the transaction. - * - * @param productLabel - */ - @JsonProperty(JSON_PROPERTY_PRODUCT_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProductLabel(String productLabel) { - this.productLabel = productLabel; - } - - - public AllowedProduct additionalProductInfo(String additionalProductInfo) { - this.additionalProductInfo = additionalProductInfo; - return this; - } - - /** - * Additionl information related to the line item. - * @return additionalProductInfo - **/ - @ApiModelProperty(value = "Additionl information related to the line item.") - @JsonProperty(JSON_PROPERTY_ADDITIONAL_PRODUCT_INFO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getAdditionalProductInfo() { - return additionalProductInfo; - } - - - /** - * Additionl information related to the line item. - * - * @param additionalProductInfo - */ - @JsonProperty(JSON_PROPERTY_ADDITIONAL_PRODUCT_INFO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAdditionalProductInfo(String additionalProductInfo) { - this.additionalProductInfo = additionalProductInfo; - } - - - /** - * Return true if this AllowedProduct object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AllowedProduct allowedProduct = (AllowedProduct) o; - return Objects.equals(this.productCode, allowedProduct.productCode) && - Objects.equals(this.eanUpc, allowedProduct.eanUpc) && - Objects.equals(this.productLabel, allowedProduct.productLabel) && - Objects.equals(this.additionalProductInfo, allowedProduct.additionalProductInfo); - } - - @Override - public int hashCode() { - return Objects.hash(productCode, eanUpc, productLabel, additionalProductInfo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AllowedProduct {\n"); - sb.append(" productCode: ").append(toIndentedString(productCode)).append("\n"); - sb.append(" eanUpc: ").append(toIndentedString(eanUpc)).append("\n"); - sb.append(" productLabel: ").append(toIndentedString(productLabel)).append("\n"); - sb.append(" additionalProductInfo: ").append(toIndentedString(additionalProductInfo)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of AllowedProduct given an JSON string - * - * @param jsonString JSON string - * @return An instance of AllowedProduct - * @throws JsonProcessingException if the JSON string is invalid with respect to AllowedProduct - */ - public static AllowedProduct fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, AllowedProduct.class); - } -/** - * Convert an instance of AllowedProduct to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/AmountsReq.java b/src/main/java/com/adyen/model/terminal/AmountsReq.java deleted file mode 100644 index 328d1dce4..000000000 --- a/src/main/java/com/adyen/model/terminal/AmountsReq.java +++ /dev/null @@ -1,401 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Amounts of a payment - */ -@ApiModel(description = "Amounts of a payment") -@JsonPropertyOrder({ - AmountsReq.JSON_PROPERTY_CURRENCY, - AmountsReq.JSON_PROPERTY_REQUESTED_AMOUNT, - AmountsReq.JSON_PROPERTY_CASH_BACK_AMOUNT, - AmountsReq.JSON_PROPERTY_TIP_AMOUNT, - AmountsReq.JSON_PROPERTY_PAID_AMOUNT, - AmountsReq.JSON_PROPERTY_MINIMUM_AMOUNT_TO_DELIVER, - AmountsReq.JSON_PROPERTY_MAXIMUM_CASH_BACK_AMOUNT, - AmountsReq.JSON_PROPERTY_MINIMUM_SPLIT_AMOUNT -}) - -public class AmountsReq { - public static final String JSON_PROPERTY_CURRENCY = "Currency"; - private String currency; - - public static final String JSON_PROPERTY_REQUESTED_AMOUNT = "RequestedAmount"; - private BigDecimal requestedAmount; - - public static final String JSON_PROPERTY_CASH_BACK_AMOUNT = "CashBackAmount"; - private BigDecimal cashBackAmount; - - public static final String JSON_PROPERTY_TIP_AMOUNT = "TipAmount"; - private BigDecimal tipAmount; - - public static final String JSON_PROPERTY_PAID_AMOUNT = "PaidAmount"; - private BigDecimal paidAmount; - - public static final String JSON_PROPERTY_MINIMUM_AMOUNT_TO_DELIVER = "MinimumAmountToDeliver"; - private BigDecimal minimumAmountToDeliver; - - public static final String JSON_PROPERTY_MAXIMUM_CASH_BACK_AMOUNT = "MaximumCashBackAmount"; - private BigDecimal maximumCashBackAmount; - - public static final String JSON_PROPERTY_MINIMUM_SPLIT_AMOUNT = "MinimumSplitAmount"; - private BigDecimal minimumSplitAmount; - - public AmountsReq() { - } - - public AmountsReq currency(String currency) { - this.currency = currency; - return this; - } - - /** - * Get currency - * @return currency - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCurrency() { - return currency; - } - - - /** - * currency - * - * @param currency - */ - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrency(String currency) { - this.currency = currency; - } - - - public AmountsReq requestedAmount(BigDecimal requestedAmount) { - this.requestedAmount = requestedAmount; - return this; - } - - /** - * Get requestedAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return requestedAmount - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_REQUESTED_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getRequestedAmount() { - return requestedAmount; - } - - - /** - * requestedAmount - * - * @param requestedAmount - */ - @JsonProperty(JSON_PROPERTY_REQUESTED_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestedAmount(BigDecimal requestedAmount) { - this.requestedAmount = requestedAmount; - } - - - public AmountsReq cashBackAmount(BigDecimal cashBackAmount) { - this.cashBackAmount = cashBackAmount; - return this; - } - - /** - * Get cashBackAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return cashBackAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CASH_BACK_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getCashBackAmount() { - return cashBackAmount; - } - - - /** - * cashBackAmount - * - * @param cashBackAmount - */ - @JsonProperty(JSON_PROPERTY_CASH_BACK_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCashBackAmount(BigDecimal cashBackAmount) { - this.cashBackAmount = cashBackAmount; - } - - - public AmountsReq tipAmount(BigDecimal tipAmount) { - this.tipAmount = tipAmount; - return this; - } - - /** - * Get tipAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return tipAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TIP_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getTipAmount() { - return tipAmount; - } - - - /** - * tipAmount - * - * @param tipAmount - */ - @JsonProperty(JSON_PROPERTY_TIP_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTipAmount(BigDecimal tipAmount) { - this.tipAmount = tipAmount; - } - - - public AmountsReq paidAmount(BigDecimal paidAmount) { - this.paidAmount = paidAmount; - return this; - } - - /** - * Get paidAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return paidAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAID_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getPaidAmount() { - return paidAmount; - } - - - /** - * paidAmount - * - * @param paidAmount - */ - @JsonProperty(JSON_PROPERTY_PAID_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaidAmount(BigDecimal paidAmount) { - this.paidAmount = paidAmount; - } - - - public AmountsReq minimumAmountToDeliver(BigDecimal minimumAmountToDeliver) { - this.minimumAmountToDeliver = minimumAmountToDeliver; - return this; - } - - /** - * Get minimumAmountToDeliver - * minimum: 0.0 - * maximum: 99999999.999999 - * @return minimumAmountToDeliver - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MINIMUM_AMOUNT_TO_DELIVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getMinimumAmountToDeliver() { - return minimumAmountToDeliver; - } - - - /** - * minimumAmountToDeliver - * - * @param minimumAmountToDeliver - */ - @JsonProperty(JSON_PROPERTY_MINIMUM_AMOUNT_TO_DELIVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMinimumAmountToDeliver(BigDecimal minimumAmountToDeliver) { - this.minimumAmountToDeliver = minimumAmountToDeliver; - } - - - public AmountsReq maximumCashBackAmount(BigDecimal maximumCashBackAmount) { - this.maximumCashBackAmount = maximumCashBackAmount; - return this; - } - - /** - * Get maximumCashBackAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return maximumCashBackAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAXIMUM_CASH_BACK_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getMaximumCashBackAmount() { - return maximumCashBackAmount; - } - - - /** - * maximumCashBackAmount - * - * @param maximumCashBackAmount - */ - @JsonProperty(JSON_PROPERTY_MAXIMUM_CASH_BACK_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMaximumCashBackAmount(BigDecimal maximumCashBackAmount) { - this.maximumCashBackAmount = maximumCashBackAmount; - } - - - public AmountsReq minimumSplitAmount(BigDecimal minimumSplitAmount) { - this.minimumSplitAmount = minimumSplitAmount; - return this; - } - - /** - * Get minimumSplitAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return minimumSplitAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MINIMUM_SPLIT_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getMinimumSplitAmount() { - return minimumSplitAmount; - } - - - /** - * minimumSplitAmount - * - * @param minimumSplitAmount - */ - @JsonProperty(JSON_PROPERTY_MINIMUM_SPLIT_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMinimumSplitAmount(BigDecimal minimumSplitAmount) { - this.minimumSplitAmount = minimumSplitAmount; - } - - - /** - * Return true if this AmountsReq object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AmountsReq amountsReq = (AmountsReq) o; - return Objects.equals(this.currency, amountsReq.currency) && - Objects.equals(this.requestedAmount, amountsReq.requestedAmount) && - Objects.equals(this.cashBackAmount, amountsReq.cashBackAmount) && - Objects.equals(this.tipAmount, amountsReq.tipAmount) && - Objects.equals(this.paidAmount, amountsReq.paidAmount) && - Objects.equals(this.minimumAmountToDeliver, amountsReq.minimumAmountToDeliver) && - Objects.equals(this.maximumCashBackAmount, amountsReq.maximumCashBackAmount) && - Objects.equals(this.minimumSplitAmount, amountsReq.minimumSplitAmount); - } - - @Override - public int hashCode() { - return Objects.hash(currency, requestedAmount, cashBackAmount, tipAmount, paidAmount, minimumAmountToDeliver, maximumCashBackAmount, minimumSplitAmount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AmountsReq {\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append(" requestedAmount: ").append(toIndentedString(requestedAmount)).append("\n"); - sb.append(" cashBackAmount: ").append(toIndentedString(cashBackAmount)).append("\n"); - sb.append(" tipAmount: ").append(toIndentedString(tipAmount)).append("\n"); - sb.append(" paidAmount: ").append(toIndentedString(paidAmount)).append("\n"); - sb.append(" minimumAmountToDeliver: ").append(toIndentedString(minimumAmountToDeliver)).append("\n"); - sb.append(" maximumCashBackAmount: ").append(toIndentedString(maximumCashBackAmount)).append("\n"); - sb.append(" minimumSplitAmount: ").append(toIndentedString(minimumSplitAmount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of AmountsReq given an JSON string - * - * @param jsonString JSON string - * @return An instance of AmountsReq - * @throws JsonProcessingException if the JSON string is invalid with respect to AmountsReq - */ - public static AmountsReq fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, AmountsReq.class); - } -/** - * Convert an instance of AmountsReq to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/AmountsResp.java b/src/main/java/com/adyen/model/terminal/AmountsResp.java deleted file mode 100644 index 4548871fd..000000000 --- a/src/main/java/com/adyen/model/terminal/AmountsResp.java +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * AmountsResp - */ -@JsonPropertyOrder({ - AmountsResp.JSON_PROPERTY_CURRENCY, - AmountsResp.JSON_PROPERTY_AUTHORIZED_AMOUNT, - AmountsResp.JSON_PROPERTY_TOTAL_REBATES_AMOUNT, - AmountsResp.JSON_PROPERTY_TOTAL_FEES_AMOUNT, - AmountsResp.JSON_PROPERTY_CASH_BACK_AMOUNT, - AmountsResp.JSON_PROPERTY_TIP_AMOUNT -}) - -public class AmountsResp { - public static final String JSON_PROPERTY_CURRENCY = "Currency"; - private String currency; - - public static final String JSON_PROPERTY_AUTHORIZED_AMOUNT = "AuthorizedAmount"; - private BigDecimal authorizedAmount; - - public static final String JSON_PROPERTY_TOTAL_REBATES_AMOUNT = "TotalRebatesAmount"; - private BigDecimal totalRebatesAmount; - - public static final String JSON_PROPERTY_TOTAL_FEES_AMOUNT = "TotalFeesAmount"; - private BigDecimal totalFeesAmount; - - public static final String JSON_PROPERTY_CASH_BACK_AMOUNT = "CashBackAmount"; - private BigDecimal cashBackAmount; - - public static final String JSON_PROPERTY_TIP_AMOUNT = "TipAmount"; - private BigDecimal tipAmount; - - public AmountsResp() { - } - - public AmountsResp currency(String currency) { - this.currency = currency; - return this; - } - - /** - * Get currency - * @return currency - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCurrency() { - return currency; - } - - - /** - * currency - * - * @param currency - */ - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrency(String currency) { - this.currency = currency; - } - - - public AmountsResp authorizedAmount(BigDecimal authorizedAmount) { - this.authorizedAmount = authorizedAmount; - return this; - } - - /** - * Get authorizedAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return authorizedAmount - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_AUTHORIZED_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getAuthorizedAmount() { - return authorizedAmount; - } - - - /** - * authorizedAmount - * - * @param authorizedAmount - */ - @JsonProperty(JSON_PROPERTY_AUTHORIZED_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAuthorizedAmount(BigDecimal authorizedAmount) { - this.authorizedAmount = authorizedAmount; - } - - - public AmountsResp totalRebatesAmount(BigDecimal totalRebatesAmount) { - this.totalRebatesAmount = totalRebatesAmount; - return this; - } - - /** - * Get totalRebatesAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return totalRebatesAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TOTAL_REBATES_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getTotalRebatesAmount() { - return totalRebatesAmount; - } - - - /** - * totalRebatesAmount - * - * @param totalRebatesAmount - */ - @JsonProperty(JSON_PROPERTY_TOTAL_REBATES_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotalRebatesAmount(BigDecimal totalRebatesAmount) { - this.totalRebatesAmount = totalRebatesAmount; - } - - - public AmountsResp totalFeesAmount(BigDecimal totalFeesAmount) { - this.totalFeesAmount = totalFeesAmount; - return this; - } - - /** - * Get totalFeesAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return totalFeesAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TOTAL_FEES_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getTotalFeesAmount() { - return totalFeesAmount; - } - - - /** - * totalFeesAmount - * - * @param totalFeesAmount - */ - @JsonProperty(JSON_PROPERTY_TOTAL_FEES_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotalFeesAmount(BigDecimal totalFeesAmount) { - this.totalFeesAmount = totalFeesAmount; - } - - - public AmountsResp cashBackAmount(BigDecimal cashBackAmount) { - this.cashBackAmount = cashBackAmount; - return this; - } - - /** - * Get cashBackAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return cashBackAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CASH_BACK_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getCashBackAmount() { - return cashBackAmount; - } - - - /** - * cashBackAmount - * - * @param cashBackAmount - */ - @JsonProperty(JSON_PROPERTY_CASH_BACK_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCashBackAmount(BigDecimal cashBackAmount) { - this.cashBackAmount = cashBackAmount; - } - - - public AmountsResp tipAmount(BigDecimal tipAmount) { - this.tipAmount = tipAmount; - return this; - } - - /** - * Get tipAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return tipAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TIP_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getTipAmount() { - return tipAmount; - } - - - /** - * tipAmount - * - * @param tipAmount - */ - @JsonProperty(JSON_PROPERTY_TIP_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTipAmount(BigDecimal tipAmount) { - this.tipAmount = tipAmount; - } - - - /** - * Return true if this AmountsResp object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AmountsResp amountsResp = (AmountsResp) o; - return Objects.equals(this.currency, amountsResp.currency) && - Objects.equals(this.authorizedAmount, amountsResp.authorizedAmount) && - Objects.equals(this.totalRebatesAmount, amountsResp.totalRebatesAmount) && - Objects.equals(this.totalFeesAmount, amountsResp.totalFeesAmount) && - Objects.equals(this.cashBackAmount, amountsResp.cashBackAmount) && - Objects.equals(this.tipAmount, amountsResp.tipAmount); - } - - @Override - public int hashCode() { - return Objects.hash(currency, authorizedAmount, totalRebatesAmount, totalFeesAmount, cashBackAmount, tipAmount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AmountsResp {\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append(" authorizedAmount: ").append(toIndentedString(authorizedAmount)).append("\n"); - sb.append(" totalRebatesAmount: ").append(toIndentedString(totalRebatesAmount)).append("\n"); - sb.append(" totalFeesAmount: ").append(toIndentedString(totalFeesAmount)).append("\n"); - sb.append(" cashBackAmount: ").append(toIndentedString(cashBackAmount)).append("\n"); - sb.append(" tipAmount: ").append(toIndentedString(tipAmount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of AmountsResp given an JSON string - * - * @param jsonString JSON string - * @return An instance of AmountsResp - * @throws JsonProcessingException if the JSON string is invalid with respect to AmountsResp - */ - public static AmountsResp fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, AmountsResp.class); - } -/** - * Convert an instance of AmountsResp to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/AreaSize.java b/src/main/java/com/adyen/model/terminal/AreaSize.java deleted file mode 100644 index ae11283f1..000000000 --- a/src/main/java/com/adyen/model/terminal/AreaSize.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * AreaSize - */ -@JsonPropertyOrder({ - AreaSize.JSON_PROPERTY_X, - AreaSize.JSON_PROPERTY_Y -}) - -public class AreaSize { - public static final String JSON_PROPERTY_X = "X"; - private String X; - - public static final String JSON_PROPERTY_Y = "Y"; - private String Y; - - public AreaSize() { - } - - public AreaSize X(String X) { - this.X = X; - return this; - } - - /** - * Get X - * @return X - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_X) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getX() { - return X; - } - - - /** - * X - * - * @param X - */ - @JsonProperty(JSON_PROPERTY_X) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setX(String X) { - this.X = X; - } - - - public AreaSize Y(String Y) { - this.Y = Y; - return this; - } - - /** - * Get Y - * @return Y - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_Y) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getY() { - return Y; - } - - - /** - * Y - * - * @param Y - */ - @JsonProperty(JSON_PROPERTY_Y) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setY(String Y) { - this.Y = Y; - } - - - /** - * Return true if this AreaSize object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AreaSize areaSize = (AreaSize) o; - return Objects.equals(this.X, areaSize.X) && - Objects.equals(this.Y, areaSize.Y); - } - - @Override - public int hashCode() { - return Objects.hash(X, Y); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AreaSize {\n"); - sb.append(" X: ").append(toIndentedString(X)).append("\n"); - sb.append(" Y: ").append(toIndentedString(Y)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of AreaSize given an JSON string - * - * @param jsonString JSON string - * @return An instance of AreaSize - * @throws JsonProcessingException if the JSON string is invalid with respect to AreaSize - */ - public static AreaSize fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, AreaSize.class); - } -/** - * Convert an instance of AreaSize to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/BalanceInquiryRequest.java b/src/main/java/com/adyen/model/terminal/BalanceInquiryRequest.java deleted file mode 100644 index 8679179e6..000000000 --- a/src/main/java/com/adyen/model/terminal/BalanceInquiryRequest.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyAccountReq; -import com.adyen.model.terminal.PaymentAccountReq; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the account for which a Balance Inquiry is requested. Content of the Balance Inquiry Request message. - */ -@ApiModel(description = "It conveys Information related to the account for which a Balance Inquiry is requested. Content of the Balance Inquiry Request message.") -@JsonPropertyOrder({ - BalanceInquiryRequest.JSON_PROPERTY_PAYMENT_ACCOUNT_REQ, - BalanceInquiryRequest.JSON_PROPERTY_LOYALTY_ACCOUNT_REQ -}) - -public class BalanceInquiryRequest { - public static final String JSON_PROPERTY_PAYMENT_ACCOUNT_REQ = "PaymentAccountReq"; - private PaymentAccountReq paymentAccountReq; - - public static final String JSON_PROPERTY_LOYALTY_ACCOUNT_REQ = "LoyaltyAccountReq"; - private LoyaltyAccountReq loyaltyAccountReq; - - public BalanceInquiryRequest() { - } - - public BalanceInquiryRequest paymentAccountReq(PaymentAccountReq paymentAccountReq) { - this.paymentAccountReq = paymentAccountReq; - return this; - } - - /** - * Get paymentAccountReq - * @return paymentAccountReq - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_ACCOUNT_REQ) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentAccountReq getPaymentAccountReq() { - return paymentAccountReq; - } - - - /** - * paymentAccountReq - * - * @param paymentAccountReq - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_ACCOUNT_REQ) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentAccountReq(PaymentAccountReq paymentAccountReq) { - this.paymentAccountReq = paymentAccountReq; - } - - - public BalanceInquiryRequest loyaltyAccountReq(LoyaltyAccountReq loyaltyAccountReq) { - this.loyaltyAccountReq = loyaltyAccountReq; - return this; - } - - /** - * Get loyaltyAccountReq - * @return loyaltyAccountReq - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_ACCOUNT_REQ) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyAccountReq getLoyaltyAccountReq() { - return loyaltyAccountReq; - } - - - /** - * loyaltyAccountReq - * - * @param loyaltyAccountReq - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_ACCOUNT_REQ) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyAccountReq(LoyaltyAccountReq loyaltyAccountReq) { - this.loyaltyAccountReq = loyaltyAccountReq; - } - - - /** - * Return true if this BalanceInquiryRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BalanceInquiryRequest balanceInquiryRequest = (BalanceInquiryRequest) o; - return Objects.equals(this.paymentAccountReq, balanceInquiryRequest.paymentAccountReq) && - Objects.equals(this.loyaltyAccountReq, balanceInquiryRequest.loyaltyAccountReq); - } - - @Override - public int hashCode() { - return Objects.hash(paymentAccountReq, loyaltyAccountReq); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BalanceInquiryRequest {\n"); - sb.append(" paymentAccountReq: ").append(toIndentedString(paymentAccountReq)).append("\n"); - sb.append(" loyaltyAccountReq: ").append(toIndentedString(loyaltyAccountReq)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of BalanceInquiryRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of BalanceInquiryRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to BalanceInquiryRequest - */ - public static BalanceInquiryRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, BalanceInquiryRequest.class); - } -/** - * Convert an instance of BalanceInquiryRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/BalanceInquiryResponse.java b/src/main/java/com/adyen/model/terminal/BalanceInquiryResponse.java deleted file mode 100644 index 7b37775d7..000000000 --- a/src/main/java/com/adyen/model/terminal/BalanceInquiryResponse.java +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyAccountStatus; -import com.adyen.model.terminal.PaymentAccountStatus; -import com.adyen.model.terminal.PaymentReceipt; -import com.adyen.model.terminal.Response; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys the balance and the identification of the associated payment, loyalty or stored value account. Content of the Balance Inquiry Response message. - */ -@ApiModel(description = "It conveys the balance and the identification of the associated payment, loyalty or stored value account. Content of the Balance Inquiry Response message.") -@JsonPropertyOrder({ - BalanceInquiryResponse.JSON_PROPERTY_RESPONSE, - BalanceInquiryResponse.JSON_PROPERTY_PAYMENT_ACCOUNT_STATUS, - BalanceInquiryResponse.JSON_PROPERTY_LOYALTY_ACCOUNT_STATUS, - BalanceInquiryResponse.JSON_PROPERTY_PAYMENT_RECEIPT -}) - -public class BalanceInquiryResponse { - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public static final String JSON_PROPERTY_PAYMENT_ACCOUNT_STATUS = "PaymentAccountStatus"; - private PaymentAccountStatus paymentAccountStatus; - - public static final String JSON_PROPERTY_LOYALTY_ACCOUNT_STATUS = "LoyaltyAccountStatus"; - private LoyaltyAccountStatus loyaltyAccountStatus; - - public static final String JSON_PROPERTY_PAYMENT_RECEIPT = "PaymentReceipt"; - private List paymentReceipt = null; - - public BalanceInquiryResponse() { - } - - public BalanceInquiryResponse response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - public BalanceInquiryResponse paymentAccountStatus(PaymentAccountStatus paymentAccountStatus) { - this.paymentAccountStatus = paymentAccountStatus; - return this; - } - - /** - * Get paymentAccountStatus - * @return paymentAccountStatus - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_ACCOUNT_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentAccountStatus getPaymentAccountStatus() { - return paymentAccountStatus; - } - - - /** - * paymentAccountStatus - * - * @param paymentAccountStatus - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_ACCOUNT_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentAccountStatus(PaymentAccountStatus paymentAccountStatus) { - this.paymentAccountStatus = paymentAccountStatus; - } - - - public BalanceInquiryResponse loyaltyAccountStatus(LoyaltyAccountStatus loyaltyAccountStatus) { - this.loyaltyAccountStatus = loyaltyAccountStatus; - return this; - } - - /** - * Get loyaltyAccountStatus - * @return loyaltyAccountStatus - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_ACCOUNT_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyAccountStatus getLoyaltyAccountStatus() { - return loyaltyAccountStatus; - } - - - /** - * loyaltyAccountStatus - * - * @param loyaltyAccountStatus - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_ACCOUNT_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyAccountStatus(LoyaltyAccountStatus loyaltyAccountStatus) { - this.loyaltyAccountStatus = loyaltyAccountStatus; - } - - - public BalanceInquiryResponse paymentReceipt(List paymentReceipt) { - this.paymentReceipt = paymentReceipt; - return this; - } - - public BalanceInquiryResponse addPaymentReceiptItem(PaymentReceipt paymentReceiptItem) { - if (this.paymentReceipt == null) { - this.paymentReceipt = new ArrayList<>(); - } - this.paymentReceipt.add(paymentReceiptItem); - return this; - } - - /** - * Get paymentReceipt - * @return paymentReceipt - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_RECEIPT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPaymentReceipt() { - return paymentReceipt; - } - - - /** - * paymentReceipt - * - * @param paymentReceipt - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_RECEIPT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentReceipt(List paymentReceipt) { - this.paymentReceipt = paymentReceipt; - } - - - /** - * Return true if this BalanceInquiryResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BalanceInquiryResponse balanceInquiryResponse = (BalanceInquiryResponse) o; - return Objects.equals(this.response, balanceInquiryResponse.response) && - Objects.equals(this.paymentAccountStatus, balanceInquiryResponse.paymentAccountStatus) && - Objects.equals(this.loyaltyAccountStatus, balanceInquiryResponse.loyaltyAccountStatus) && - Objects.equals(this.paymentReceipt, balanceInquiryResponse.paymentReceipt); - } - - @Override - public int hashCode() { - return Objects.hash(response, paymentAccountStatus, loyaltyAccountStatus, paymentReceipt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BalanceInquiryResponse {\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append(" paymentAccountStatus: ").append(toIndentedString(paymentAccountStatus)).append("\n"); - sb.append(" loyaltyAccountStatus: ").append(toIndentedString(loyaltyAccountStatus)).append("\n"); - sb.append(" paymentReceipt: ").append(toIndentedString(paymentReceipt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of BalanceInquiryResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of BalanceInquiryResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to BalanceInquiryResponse - */ - public static BalanceInquiryResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, BalanceInquiryResponse.class); - } -/** - * Convert an instance of BalanceInquiryResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/BarcodeType.java b/src/main/java/com/adyen/model/terminal/BarcodeType.java deleted file mode 100644 index b1a03df29..000000000 --- a/src/main/java/com/adyen/model/terminal/BarcodeType.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets BarcodeType - */ -public enum BarcodeType { - - CODE128("Code128"), - - CODE25("Code25"), - - EAN13("EAN13"), - - EAN8("EAN8"), - - PDF417("PDF417"), - - QRCODE("QRCode"), - - UPCA("UPCA"); - - private String value; - - BarcodeType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static BarcodeType fromValue(String value) { - for (BarcodeType b : BarcodeType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/CapturedSignature.java b/src/main/java/com/adyen/model/terminal/CapturedSignature.java deleted file mode 100644 index ab2c4e698..000000000 --- a/src/main/java/com/adyen/model/terminal/CapturedSignature.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.AreaSize; -import com.adyen.model.terminal.Point; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * CapturedSignature - */ -@JsonPropertyOrder({ - CapturedSignature.JSON_PROPERTY_AREA_SIZE, - CapturedSignature.JSON_PROPERTY_SIGNATURE_POINT -}) - -public class CapturedSignature { - public static final String JSON_PROPERTY_AREA_SIZE = "AreaSize"; - private AreaSize areaSize; - - public static final String JSON_PROPERTY_SIGNATURE_POINT = "SignaturePoint"; - private List signaturePoint = null; - - public CapturedSignature() { - } - - public CapturedSignature areaSize(AreaSize areaSize) { - this.areaSize = areaSize; - return this; - } - - /** - * Get areaSize - * @return areaSize - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_AREA_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public AreaSize getAreaSize() { - return areaSize; - } - - - /** - * areaSize - * - * @param areaSize - */ - @JsonProperty(JSON_PROPERTY_AREA_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAreaSize(AreaSize areaSize) { - this.areaSize = areaSize; - } - - - public CapturedSignature signaturePoint(List signaturePoint) { - this.signaturePoint = signaturePoint; - return this; - } - - public CapturedSignature addSignaturePointItem(Point signaturePointItem) { - if (this.signaturePoint == null) { - this.signaturePoint = new ArrayList<>(); - } - this.signaturePoint.add(signaturePointItem); - return this; - } - - /** - * Get signaturePoint - * @return signaturePoint - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SIGNATURE_POINT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getSignaturePoint() { - return signaturePoint; - } - - - /** - * signaturePoint - * - * @param signaturePoint - */ - @JsonProperty(JSON_PROPERTY_SIGNATURE_POINT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignaturePoint(List signaturePoint) { - this.signaturePoint = signaturePoint; - } - - - /** - * Return true if this CapturedSignature object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CapturedSignature capturedSignature = (CapturedSignature) o; - return Objects.equals(this.areaSize, capturedSignature.areaSize) && - Objects.equals(this.signaturePoint, capturedSignature.signaturePoint); - } - - @Override - public int hashCode() { - return Objects.hash(areaSize, signaturePoint); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CapturedSignature {\n"); - sb.append(" areaSize: ").append(toIndentedString(areaSize)).append("\n"); - sb.append(" signaturePoint: ").append(toIndentedString(signaturePoint)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of CapturedSignature given an JSON string - * - * @param jsonString JSON string - * @return An instance of CapturedSignature - * @throws JsonProcessingException if the JSON string is invalid with respect to CapturedSignature - */ - public static CapturedSignature fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, CapturedSignature.class); - } -/** - * Convert an instance of CapturedSignature to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/CardAcquisitionRequest.java b/src/main/java/com/adyen/model/terminal/CardAcquisitionRequest.java deleted file mode 100644 index 9a9aae29d..000000000 --- a/src/main/java/com/adyen/model/terminal/CardAcquisitionRequest.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.CardAcquisitionTransaction; -import com.adyen.model.terminal.SaleData; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the payment and loyalty cards to read and analyse. This message pair is usually followed by a message pair (e.g. payment or loyalty) which refers to this Card Acquisition message pair. Content of the Card Acquisition Request message. - */ -@ApiModel(description = "It conveys Information related to the payment and loyalty cards to read and analyse. This message pair is usually followed by a message pair (e.g. payment or loyalty) which refers to this Card Acquisition message pair. Content of the Card Acquisition Request message.") -@JsonPropertyOrder({ - CardAcquisitionRequest.JSON_PROPERTY_SALE_DATA, - CardAcquisitionRequest.JSON_PROPERTY_CARD_ACQUISITION_TRANSACTION -}) - -public class CardAcquisitionRequest { - public static final String JSON_PROPERTY_SALE_DATA = "SaleData"; - private SaleData saleData; - - public static final String JSON_PROPERTY_CARD_ACQUISITION_TRANSACTION = "CardAcquisitionTransaction"; - private CardAcquisitionTransaction cardAcquisitionTransaction; - - public CardAcquisitionRequest() { - } - - public CardAcquisitionRequest saleData(SaleData saleData) { - this.saleData = saleData; - return this; - } - - /** - * Get saleData - * @return saleData - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SaleData getSaleData() { - return saleData; - } - - - /** - * saleData - * - * @param saleData - */ - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleData(SaleData saleData) { - this.saleData = saleData; - } - - - public CardAcquisitionRequest cardAcquisitionTransaction(CardAcquisitionTransaction cardAcquisitionTransaction) { - this.cardAcquisitionTransaction = cardAcquisitionTransaction; - return this; - } - - /** - * Get cardAcquisitionTransaction - * @return cardAcquisitionTransaction - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_CARD_ACQUISITION_TRANSACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public CardAcquisitionTransaction getCardAcquisitionTransaction() { - return cardAcquisitionTransaction; - } - - - /** - * cardAcquisitionTransaction - * - * @param cardAcquisitionTransaction - */ - @JsonProperty(JSON_PROPERTY_CARD_ACQUISITION_TRANSACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCardAcquisitionTransaction(CardAcquisitionTransaction cardAcquisitionTransaction) { - this.cardAcquisitionTransaction = cardAcquisitionTransaction; - } - - - /** - * Return true if this CardAcquisitionRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardAcquisitionRequest cardAcquisitionRequest = (CardAcquisitionRequest) o; - return Objects.equals(this.saleData, cardAcquisitionRequest.saleData) && - Objects.equals(this.cardAcquisitionTransaction, cardAcquisitionRequest.cardAcquisitionTransaction); - } - - @Override - public int hashCode() { - return Objects.hash(saleData, cardAcquisitionTransaction); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardAcquisitionRequest {\n"); - sb.append(" saleData: ").append(toIndentedString(saleData)).append("\n"); - sb.append(" cardAcquisitionTransaction: ").append(toIndentedString(cardAcquisitionTransaction)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of CardAcquisitionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CardAcquisitionRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to CardAcquisitionRequest - */ - public static CardAcquisitionRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, CardAcquisitionRequest.class); - } -/** - * Convert an instance of CardAcquisitionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/CardAcquisitionResponse.java b/src/main/java/com/adyen/model/terminal/CardAcquisitionResponse.java deleted file mode 100644 index 8cca01cd4..000000000 --- a/src/main/java/com/adyen/model/terminal/CardAcquisitionResponse.java +++ /dev/null @@ -1,373 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyAccount; -import com.adyen.model.terminal.POIData; -import com.adyen.model.terminal.PaymentInstrumentData; -import com.adyen.model.terminal.Response; -import com.adyen.model.terminal.SaleData; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the payment and loyalty cards read and processed by the POI System and entered by the Customer. Content of the Card Acquisition Response message. - */ -@ApiModel(description = "It conveys Information related to the payment and loyalty cards read and processed by the POI System and entered by the Customer. Content of the Card Acquisition Response message.") -@JsonPropertyOrder({ - CardAcquisitionResponse.JSON_PROPERTY_RESPONSE, - CardAcquisitionResponse.JSON_PROPERTY_SALE_DATA, - CardAcquisitionResponse.JSON_PROPERTY_PO_I_DATA, - CardAcquisitionResponse.JSON_PROPERTY_CUSTOMER_LANGUAGE, - CardAcquisitionResponse.JSON_PROPERTY_PAYMENT_BRAND, - CardAcquisitionResponse.JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA, - CardAcquisitionResponse.JSON_PROPERTY_LOYALTY_ACCOUNT -}) - -public class CardAcquisitionResponse { - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public static final String JSON_PROPERTY_SALE_DATA = "SaleData"; - private SaleData saleData; - - public static final String JSON_PROPERTY_PO_I_DATA = "POIData"; - private POIData poIData; - - public static final String JSON_PROPERTY_CUSTOMER_LANGUAGE = "CustomerLanguage"; - private String customerLanguage; - - public static final String JSON_PROPERTY_PAYMENT_BRAND = "PaymentBrand"; - private List paymentBrand = null; - - public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA = "PaymentInstrumentData"; - private PaymentInstrumentData paymentInstrumentData; - - public static final String JSON_PROPERTY_LOYALTY_ACCOUNT = "LoyaltyAccount"; - private List loyaltyAccount = null; - - public CardAcquisitionResponse() { - } - - public CardAcquisitionResponse response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - public CardAcquisitionResponse saleData(SaleData saleData) { - this.saleData = saleData; - return this; - } - - /** - * Get saleData - * @return saleData - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SaleData getSaleData() { - return saleData; - } - - - /** - * saleData - * - * @param saleData - */ - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleData(SaleData saleData) { - this.saleData = saleData; - } - - - public CardAcquisitionResponse poIData(POIData poIData) { - this.poIData = poIData; - return this; - } - - /** - * Get poIData - * @return poIData - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PO_I_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public POIData getPoIData() { - return poIData; - } - - - /** - * poIData - * - * @param poIData - */ - @JsonProperty(JSON_PROPERTY_PO_I_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoIData(POIData poIData) { - this.poIData = poIData; - } - - - public CardAcquisitionResponse customerLanguage(String customerLanguage) { - this.customerLanguage = customerLanguage; - return this; - } - - /** - * Data related to the POI System. - * @return customerLanguage - **/ - @ApiModelProperty(value = "Data related to the POI System.") - @JsonProperty(JSON_PROPERTY_CUSTOMER_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCustomerLanguage() { - return customerLanguage; - } - - - /** - * Data related to the POI System. - * - * @param customerLanguage - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerLanguage(String customerLanguage) { - this.customerLanguage = customerLanguage; - } - - - public CardAcquisitionResponse paymentBrand(List paymentBrand) { - this.paymentBrand = paymentBrand; - return this; - } - - public CardAcquisitionResponse addPaymentBrandItem(String paymentBrandItem) { - if (this.paymentBrand == null) { - this.paymentBrand = new ArrayList<>(); - } - this.paymentBrand.add(paymentBrandItem); - return this; - } - - /** - * Get paymentBrand - * @return paymentBrand - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_BRAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPaymentBrand() { - return paymentBrand; - } - - - /** - * paymentBrand - * - * @param paymentBrand - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_BRAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentBrand(List paymentBrand) { - this.paymentBrand = paymentBrand; - } - - - public CardAcquisitionResponse paymentInstrumentData(PaymentInstrumentData paymentInstrumentData) { - this.paymentInstrumentData = paymentInstrumentData; - return this; - } - - /** - * Get paymentInstrumentData - * @return paymentInstrumentData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentInstrumentData getPaymentInstrumentData() { - return paymentInstrumentData; - } - - - /** - * paymentInstrumentData - * - * @param paymentInstrumentData - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentInstrumentData(PaymentInstrumentData paymentInstrumentData) { - this.paymentInstrumentData = paymentInstrumentData; - } - - - public CardAcquisitionResponse loyaltyAccount(List loyaltyAccount) { - this.loyaltyAccount = loyaltyAccount; - return this; - } - - public CardAcquisitionResponse addLoyaltyAccountItem(LoyaltyAccount loyaltyAccountItem) { - if (this.loyaltyAccount == null) { - this.loyaltyAccount = new ArrayList<>(); - } - this.loyaltyAccount.add(loyaltyAccountItem); - return this; - } - - /** - * Get loyaltyAccount - * @return loyaltyAccount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getLoyaltyAccount() { - return loyaltyAccount; - } - - - /** - * loyaltyAccount - * - * @param loyaltyAccount - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyAccount(List loyaltyAccount) { - this.loyaltyAccount = loyaltyAccount; - } - - - /** - * Return true if this CardAcquisitionResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardAcquisitionResponse cardAcquisitionResponse = (CardAcquisitionResponse) o; - return Objects.equals(this.response, cardAcquisitionResponse.response) && - Objects.equals(this.saleData, cardAcquisitionResponse.saleData) && - Objects.equals(this.poIData, cardAcquisitionResponse.poIData) && - Objects.equals(this.customerLanguage, cardAcquisitionResponse.customerLanguage) && - Objects.equals(this.paymentBrand, cardAcquisitionResponse.paymentBrand) && - Objects.equals(this.paymentInstrumentData, cardAcquisitionResponse.paymentInstrumentData) && - Objects.equals(this.loyaltyAccount, cardAcquisitionResponse.loyaltyAccount); - } - - @Override - public int hashCode() { - return Objects.hash(response, saleData, poIData, customerLanguage, paymentBrand, paymentInstrumentData, loyaltyAccount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardAcquisitionResponse {\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append(" saleData: ").append(toIndentedString(saleData)).append("\n"); - sb.append(" poIData: ").append(toIndentedString(poIData)).append("\n"); - sb.append(" customerLanguage: ").append(toIndentedString(customerLanguage)).append("\n"); - sb.append(" paymentBrand: ").append(toIndentedString(paymentBrand)).append("\n"); - sb.append(" paymentInstrumentData: ").append(toIndentedString(paymentInstrumentData)).append("\n"); - sb.append(" loyaltyAccount: ").append(toIndentedString(loyaltyAccount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of CardAcquisitionResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CardAcquisitionResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to CardAcquisitionResponse - */ - public static CardAcquisitionResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, CardAcquisitionResponse.class); - } -/** - * Convert an instance of CardAcquisitionResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/CardAcquisitionTransaction.java b/src/main/java/com/adyen/model/terminal/CardAcquisitionTransaction.java deleted file mode 100644 index c24e1f6dc..000000000 --- a/src/main/java/com/adyen/model/terminal/CardAcquisitionTransaction.java +++ /dev/null @@ -1,505 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyHandling; -import com.adyen.model.terminal.PaymentType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * CardAcquisitionTransaction - */ -@JsonPropertyOrder({ - CardAcquisitionTransaction.JSON_PROPERTY_ALLOWED_PAYMENT_BRAND, - CardAcquisitionTransaction.JSON_PROPERTY_ALLOWED_LOYALTY_BRAND, - CardAcquisitionTransaction.JSON_PROPERTY_LOYALTY_HANDLING, - CardAcquisitionTransaction.JSON_PROPERTY_CUSTOMER_LANGUAGE, - CardAcquisitionTransaction.JSON_PROPERTY_FORCE_ENTRY_MODE, - CardAcquisitionTransaction.JSON_PROPERTY_FORCE_CUSTOMER_SELECTION_FLAG, - CardAcquisitionTransaction.JSON_PROPERTY_TOTAL_AMOUNT, - CardAcquisitionTransaction.JSON_PROPERTY_PAYMENT_TYPE, - CardAcquisitionTransaction.JSON_PROPERTY_CASH_BACK_FLAG -}) - -public class CardAcquisitionTransaction { - public static final String JSON_PROPERTY_ALLOWED_PAYMENT_BRAND = "AllowedPaymentBrand"; - private List allowedPaymentBrand = null; - - public static final String JSON_PROPERTY_ALLOWED_LOYALTY_BRAND = "AllowedLoyaltyBrand"; - private List allowedLoyaltyBrand = null; - - public static final String JSON_PROPERTY_LOYALTY_HANDLING = "LoyaltyHandling"; - private LoyaltyHandling loyaltyHandling; - - public static final String JSON_PROPERTY_CUSTOMER_LANGUAGE = "CustomerLanguage"; - private String customerLanguage; - - /** - * Gets or Sets forceEntryMode - */ - public enum ForceEntryModeEnum { - CHECKREADER("CheckReader"), - - CONTACTLESS("Contactless"), - - FILE("File"), - - ICC("ICC"), - - KEYED("Keyed"), - - MAGSTRIPE("MagStripe"), - - MANUAL("Manual"), - - RFID("RFID"), - - SCANNED("Scanned"), - - SYNCHRONOUSICC("SynchronousICC"), - - TAPPED("Tapped"); - - private String value; - - ForceEntryModeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ForceEntryModeEnum fromValue(String value) { - for (ForceEntryModeEnum b : ForceEntryModeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_FORCE_ENTRY_MODE = "ForceEntryMode"; - private List forceEntryMode = null; - - public static final String JSON_PROPERTY_FORCE_CUSTOMER_SELECTION_FLAG = "ForceCustomerSelectionFlag"; - private Boolean forceCustomerSelectionFlag; - - public static final String JSON_PROPERTY_TOTAL_AMOUNT = "TotalAmount"; - private BigDecimal totalAmount; - - public static final String JSON_PROPERTY_PAYMENT_TYPE = "PaymentType"; - private PaymentType paymentType; - - public static final String JSON_PROPERTY_CASH_BACK_FLAG = "CashBackFlag"; - private Boolean cashBackFlag; - - public CardAcquisitionTransaction() { - } - - public CardAcquisitionTransaction allowedPaymentBrand(List allowedPaymentBrand) { - this.allowedPaymentBrand = allowedPaymentBrand; - return this; - } - - public CardAcquisitionTransaction addAllowedPaymentBrandItem(String allowedPaymentBrandItem) { - if (this.allowedPaymentBrand == null) { - this.allowedPaymentBrand = new ArrayList<>(); - } - this.allowedPaymentBrand.add(allowedPaymentBrandItem); - return this; - } - - /** - * Get allowedPaymentBrand - * @return allowedPaymentBrand - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ALLOWED_PAYMENT_BRAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getAllowedPaymentBrand() { - return allowedPaymentBrand; - } - - - /** - * allowedPaymentBrand - * - * @param allowedPaymentBrand - */ - @JsonProperty(JSON_PROPERTY_ALLOWED_PAYMENT_BRAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowedPaymentBrand(List allowedPaymentBrand) { - this.allowedPaymentBrand = allowedPaymentBrand; - } - - - public CardAcquisitionTransaction allowedLoyaltyBrand(List allowedLoyaltyBrand) { - this.allowedLoyaltyBrand = allowedLoyaltyBrand; - return this; - } - - public CardAcquisitionTransaction addAllowedLoyaltyBrandItem(String allowedLoyaltyBrandItem) { - if (this.allowedLoyaltyBrand == null) { - this.allowedLoyaltyBrand = new ArrayList<>(); - } - this.allowedLoyaltyBrand.add(allowedLoyaltyBrandItem); - return this; - } - - /** - * Get allowedLoyaltyBrand - * @return allowedLoyaltyBrand - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ALLOWED_LOYALTY_BRAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getAllowedLoyaltyBrand() { - return allowedLoyaltyBrand; - } - - - /** - * allowedLoyaltyBrand - * - * @param allowedLoyaltyBrand - */ - @JsonProperty(JSON_PROPERTY_ALLOWED_LOYALTY_BRAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowedLoyaltyBrand(List allowedLoyaltyBrand) { - this.allowedLoyaltyBrand = allowedLoyaltyBrand; - } - - - public CardAcquisitionTransaction loyaltyHandling(LoyaltyHandling loyaltyHandling) { - this.loyaltyHandling = loyaltyHandling; - return this; - } - - /** - * Get loyaltyHandling - * @return loyaltyHandling - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_HANDLING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyHandling getLoyaltyHandling() { - return loyaltyHandling; - } - - - /** - * loyaltyHandling - * - * @param loyaltyHandling - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_HANDLING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyHandling(LoyaltyHandling loyaltyHandling) { - this.loyaltyHandling = loyaltyHandling; - } - - - public CardAcquisitionTransaction customerLanguage(String customerLanguage) { - this.customerLanguage = customerLanguage; - return this; - } - - /** - * Get customerLanguage - * @return customerLanguage - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CUSTOMER_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCustomerLanguage() { - return customerLanguage; - } - - - /** - * customerLanguage - * - * @param customerLanguage - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerLanguage(String customerLanguage) { - this.customerLanguage = customerLanguage; - } - - - public CardAcquisitionTransaction forceEntryMode(List forceEntryMode) { - this.forceEntryMode = forceEntryMode; - return this; - } - - public CardAcquisitionTransaction addForceEntryModeItem(ForceEntryModeEnum forceEntryModeItem) { - if (this.forceEntryMode == null) { - this.forceEntryMode = new ArrayList<>(); - } - this.forceEntryMode.add(forceEntryModeItem); - return this; - } - - /** - * Get forceEntryMode - * @return forceEntryMode - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FORCE_ENTRY_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getForceEntryMode() { - return forceEntryMode; - } - - - /** - * forceEntryMode - * - * @param forceEntryMode - */ - @JsonProperty(JSON_PROPERTY_FORCE_ENTRY_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceEntryMode(List forceEntryMode) { - this.forceEntryMode = forceEntryMode; - } - - - public CardAcquisitionTransaction forceCustomerSelectionFlag(Boolean forceCustomerSelectionFlag) { - this.forceCustomerSelectionFlag = forceCustomerSelectionFlag; - return this; - } - - /** - * Get forceCustomerSelectionFlag - * @return forceCustomerSelectionFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FORCE_CUSTOMER_SELECTION_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getForceCustomerSelectionFlag() { - return forceCustomerSelectionFlag; - } - - - /** - * forceCustomerSelectionFlag - * - * @param forceCustomerSelectionFlag - */ - @JsonProperty(JSON_PROPERTY_FORCE_CUSTOMER_SELECTION_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceCustomerSelectionFlag(Boolean forceCustomerSelectionFlag) { - this.forceCustomerSelectionFlag = forceCustomerSelectionFlag; - } - - - public CardAcquisitionTransaction totalAmount(BigDecimal totalAmount) { - this.totalAmount = totalAmount; - return this; - } - - /** - * Get totalAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return totalAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TOTAL_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getTotalAmount() { - return totalAmount; - } - - - /** - * totalAmount - * - * @param totalAmount - */ - @JsonProperty(JSON_PROPERTY_TOTAL_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotalAmount(BigDecimal totalAmount) { - this.totalAmount = totalAmount; - } - - - public CardAcquisitionTransaction paymentType(PaymentType paymentType) { - this.paymentType = paymentType; - return this; - } - - /** - * Get paymentType - * @return paymentType - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentType getPaymentType() { - return paymentType; - } - - - /** - * paymentType - * - * @param paymentType - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentType(PaymentType paymentType) { - this.paymentType = paymentType; - } - - - public CardAcquisitionTransaction cashBackFlag(Boolean cashBackFlag) { - this.cashBackFlag = cashBackFlag; - return this; - } - - /** - * Get cashBackFlag - * @return cashBackFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CASH_BACK_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getCashBackFlag() { - return cashBackFlag; - } - - - /** - * cashBackFlag - * - * @param cashBackFlag - */ - @JsonProperty(JSON_PROPERTY_CASH_BACK_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCashBackFlag(Boolean cashBackFlag) { - this.cashBackFlag = cashBackFlag; - } - - - /** - * Return true if this CardAcquisitionTransaction object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardAcquisitionTransaction cardAcquisitionTransaction = (CardAcquisitionTransaction) o; - return Objects.equals(this.allowedPaymentBrand, cardAcquisitionTransaction.allowedPaymentBrand) && - Objects.equals(this.allowedLoyaltyBrand, cardAcquisitionTransaction.allowedLoyaltyBrand) && - Objects.equals(this.loyaltyHandling, cardAcquisitionTransaction.loyaltyHandling) && - Objects.equals(this.customerLanguage, cardAcquisitionTransaction.customerLanguage) && - Objects.equals(this.forceEntryMode, cardAcquisitionTransaction.forceEntryMode) && - Objects.equals(this.forceCustomerSelectionFlag, cardAcquisitionTransaction.forceCustomerSelectionFlag) && - Objects.equals(this.totalAmount, cardAcquisitionTransaction.totalAmount) && - Objects.equals(this.paymentType, cardAcquisitionTransaction.paymentType) && - Objects.equals(this.cashBackFlag, cardAcquisitionTransaction.cashBackFlag); - } - - @Override - public int hashCode() { - return Objects.hash(allowedPaymentBrand, allowedLoyaltyBrand, loyaltyHandling, customerLanguage, forceEntryMode, forceCustomerSelectionFlag, totalAmount, paymentType, cashBackFlag); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardAcquisitionTransaction {\n"); - sb.append(" allowedPaymentBrand: ").append(toIndentedString(allowedPaymentBrand)).append("\n"); - sb.append(" allowedLoyaltyBrand: ").append(toIndentedString(allowedLoyaltyBrand)).append("\n"); - sb.append(" loyaltyHandling: ").append(toIndentedString(loyaltyHandling)).append("\n"); - sb.append(" customerLanguage: ").append(toIndentedString(customerLanguage)).append("\n"); - sb.append(" forceEntryMode: ").append(toIndentedString(forceEntryMode)).append("\n"); - sb.append(" forceCustomerSelectionFlag: ").append(toIndentedString(forceCustomerSelectionFlag)).append("\n"); - sb.append(" totalAmount: ").append(toIndentedString(totalAmount)).append("\n"); - sb.append(" paymentType: ").append(toIndentedString(paymentType)).append("\n"); - sb.append(" cashBackFlag: ").append(toIndentedString(cashBackFlag)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of CardAcquisitionTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of CardAcquisitionTransaction - * @throws JsonProcessingException if the JSON string is invalid with respect to CardAcquisitionTransaction - */ - public static CardAcquisitionTransaction fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, CardAcquisitionTransaction.class); - } -/** - * Convert an instance of CardAcquisitionTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/CardData.java b/src/main/java/com/adyen/model/terminal/CardData.java deleted file mode 100644 index ac55a0161..000000000 --- a/src/main/java/com/adyen/model/terminal/CardData.java +++ /dev/null @@ -1,587 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.AllowedProduct; -import com.adyen.model.terminal.CustomerOrder; -import com.adyen.model.terminal.PaymentToken; -import com.adyen.model.terminal.SensitiveCardData; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Allows acquisition of the card data by the Sale System before the Payment, CardAcquisition or BalanceInquiry request to the POI. It could also be sent in the CardAcquisition response, to be processed by the Sale System. Information related to the payment card used for the transaction. - */ -@ApiModel(description = "Allows acquisition of the card data by the Sale System before the Payment, CardAcquisition or BalanceInquiry request to the POI. It could also be sent in the CardAcquisition response, to be processed by the Sale System. Information related to the payment card used for the transaction.") -@JsonPropertyOrder({ - CardData.JSON_PROPERTY_PAYMENT_BRAND, - CardData.JSON_PROPERTY_MASKED_PAN, - CardData.JSON_PROPERTY_PAYMENT_ACCOUNT_REF, - CardData.JSON_PROPERTY_ENTRY_MODE, - CardData.JSON_PROPERTY_CARD_COUNTRY_CODE, - CardData.JSON_PROPERTY_PROTECTED_CARD_DATA, - CardData.JSON_PROPERTY_SENSITIVE_CARD_DATA, - CardData.JSON_PROPERTY_ALLOWED_PRODUCT_CODE, - CardData.JSON_PROPERTY_ALLOWED_PRODUCT, - CardData.JSON_PROPERTY_PAYMENT_TOKEN, - CardData.JSON_PROPERTY_CUSTOMER_ORDER -}) - -public class CardData { - public static final String JSON_PROPERTY_PAYMENT_BRAND = "PaymentBrand"; - private String paymentBrand; - - public static final String JSON_PROPERTY_MASKED_PAN = "MaskedPan"; - private String maskedPan; - - public static final String JSON_PROPERTY_PAYMENT_ACCOUNT_REF = "PaymentAccountRef"; - private String paymentAccountRef; - - /** - * Gets or Sets entryMode - */ - public enum EntryModeEnum { - CONTACTLESS("Contactless"), - - FILE("File"), - - ICC("ICC"), - - KEYED("Keyed"), - - MAGSTRIPE("MagStripe"), - - MANUAL("Manual"), - - MOBILE("Mobile"), - - RFID("RFID"), - - SCANNED("Scanned"), - - SYNCHRONOUSICC("SynchronousICC"), - - TAPPED("Tapped"); - - private String value; - - EntryModeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EntryModeEnum fromValue(String value) { - for (EntryModeEnum b : EntryModeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_ENTRY_MODE = "EntryMode"; - private List entryMode = null; - - public static final String JSON_PROPERTY_CARD_COUNTRY_CODE = "CardCountryCode"; - private Integer cardCountryCode; - - public static final String JSON_PROPERTY_PROTECTED_CARD_DATA = "ProtectedCardData"; - private String protectedCardData; - - public static final String JSON_PROPERTY_SENSITIVE_CARD_DATA = "SensitiveCardData"; - private SensitiveCardData sensitiveCardData; - - public static final String JSON_PROPERTY_ALLOWED_PRODUCT_CODE = "AllowedProductCode"; - private List allowedProductCode = null; - - public static final String JSON_PROPERTY_ALLOWED_PRODUCT = "AllowedProduct"; - private List allowedProduct = null; - - public static final String JSON_PROPERTY_PAYMENT_TOKEN = "PaymentToken"; - private PaymentToken paymentToken; - - public static final String JSON_PROPERTY_CUSTOMER_ORDER = "CustomerOrder"; - private List customerOrder = null; - - public CardData() { - } - - public CardData paymentBrand(String paymentBrand) { - this.paymentBrand = paymentBrand; - return this; - } - - /** - * If card PAN is readable . - * @return paymentBrand - **/ - @ApiModelProperty(value = "If card PAN is readable .") - @JsonProperty(JSON_PROPERTY_PAYMENT_BRAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPaymentBrand() { - return paymentBrand; - } - - - /** - * If card PAN is readable . - * - * @param paymentBrand - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_BRAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentBrand(String paymentBrand) { - this.paymentBrand = paymentBrand; - } - - - public CardData maskedPan(String maskedPan) { - this.maskedPan = maskedPan; - return this; - } - - /** - * Get maskedPan - * @return maskedPan - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MASKED_PAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getMaskedPan() { - return maskedPan; - } - - - /** - * maskedPan - * - * @param maskedPan - */ - @JsonProperty(JSON_PROPERTY_MASKED_PAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMaskedPan(String maskedPan) { - this.maskedPan = maskedPan; - } - - - public CardData paymentAccountRef(String paymentAccountRef) { - this.paymentAccountRef = paymentAccountRef; - return this; - } - - /** - * Get paymentAccountRef - * @return paymentAccountRef - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_ACCOUNT_REF) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPaymentAccountRef() { - return paymentAccountRef; - } - - - /** - * paymentAccountRef - * - * @param paymentAccountRef - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_ACCOUNT_REF) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentAccountRef(String paymentAccountRef) { - this.paymentAccountRef = paymentAccountRef; - } - - - public CardData entryMode(List entryMode) { - this.entryMode = entryMode; - return this; - } - - public CardData addEntryModeItem(EntryModeEnum entryModeItem) { - if (this.entryMode == null) { - this.entryMode = new ArrayList<>(); - } - this.entryMode.add(entryModeItem); - return this; - } - - /** - * Get entryMode - * @return entryMode - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ENTRY_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getEntryMode() { - return entryMode; - } - - - /** - * entryMode - * - * @param entryMode - */ - @JsonProperty(JSON_PROPERTY_ENTRY_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEntryMode(List entryMode) { - this.entryMode = entryMode; - } - - - public CardData cardCountryCode(Integer cardCountryCode) { - this.cardCountryCode = cardCountryCode; - return this; - } - - /** - * If available in the card. - * minimum: 3 - * maximum: 3 - * @return cardCountryCode - **/ - @ApiModelProperty(value = "If available in the card.") - @JsonProperty(JSON_PROPERTY_CARD_COUNTRY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getCardCountryCode() { - return cardCountryCode; - } - - - /** - * If available in the card. - * - * @param cardCountryCode - */ - @JsonProperty(JSON_PROPERTY_CARD_COUNTRY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCardCountryCode(Integer cardCountryCode) { - this.cardCountryCode = cardCountryCode; - } - - - public CardData protectedCardData(String protectedCardData) { - this.protectedCardData = protectedCardData; - return this; - } - - /** - * SensitiveCardData protected by CMS EnvelopedData. - * @return protectedCardData - **/ - @ApiModelProperty(value = "SensitiveCardData protected by CMS EnvelopedData.") - @JsonProperty(JSON_PROPERTY_PROTECTED_CARD_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getProtectedCardData() { - return protectedCardData; - } - - - /** - * SensitiveCardData protected by CMS EnvelopedData. - * - * @param protectedCardData - */ - @JsonProperty(JSON_PROPERTY_PROTECTED_CARD_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProtectedCardData(String protectedCardData) { - this.protectedCardData = protectedCardData; - } - - - public CardData sensitiveCardData(SensitiveCardData sensitiveCardData) { - this.sensitiveCardData = sensitiveCardData; - return this; - } - - /** - * Get sensitiveCardData - * @return sensitiveCardData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SENSITIVE_CARD_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SensitiveCardData getSensitiveCardData() { - return sensitiveCardData; - } - - - /** - * sensitiveCardData - * - * @param sensitiveCardData - */ - @JsonProperty(JSON_PROPERTY_SENSITIVE_CARD_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSensitiveCardData(SensitiveCardData sensitiveCardData) { - this.sensitiveCardData = sensitiveCardData; - } - - - public CardData allowedProductCode(List allowedProductCode) { - this.allowedProductCode = allowedProductCode; - return this; - } - - public CardData addAllowedProductCodeItem(Integer allowedProductCodeItem) { - if (this.allowedProductCode == null) { - this.allowedProductCode = new ArrayList<>(); - } - this.allowedProductCode.add(allowedProductCodeItem); - return this; - } - - /** - * Get allowedProductCode - * @return allowedProductCode - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ALLOWED_PRODUCT_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getAllowedProductCode() { - return allowedProductCode; - } - - - /** - * allowedProductCode - * - * @param allowedProductCode - */ - @JsonProperty(JSON_PROPERTY_ALLOWED_PRODUCT_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowedProductCode(List allowedProductCode) { - this.allowedProductCode = allowedProductCode; - } - - - public CardData allowedProduct(List allowedProduct) { - this.allowedProduct = allowedProduct; - return this; - } - - public CardData addAllowedProductItem(AllowedProduct allowedProductItem) { - if (this.allowedProduct == null) { - this.allowedProduct = new ArrayList<>(); - } - this.allowedProduct.add(allowedProductItem); - return this; - } - - /** - * Get allowedProduct - * @return allowedProduct - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ALLOWED_PRODUCT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getAllowedProduct() { - return allowedProduct; - } - - - /** - * allowedProduct - * - * @param allowedProduct - */ - @JsonProperty(JSON_PROPERTY_ALLOWED_PRODUCT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowedProduct(List allowedProduct) { - this.allowedProduct = allowedProduct; - } - - - public CardData paymentToken(PaymentToken paymentToken) { - this.paymentToken = paymentToken; - return this; - } - - /** - * Get paymentToken - * @return paymentToken - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_TOKEN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentToken getPaymentToken() { - return paymentToken; - } - - - /** - * paymentToken - * - * @param paymentToken - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_TOKEN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentToken(PaymentToken paymentToken) { - this.paymentToken = paymentToken; - } - - - public CardData customerOrder(List customerOrder) { - this.customerOrder = customerOrder; - return this; - } - - public CardData addCustomerOrderItem(CustomerOrder customerOrderItem) { - if (this.customerOrder == null) { - this.customerOrder = new ArrayList<>(); - } - this.customerOrder.add(customerOrderItem); - return this; - } - - /** - * Get customerOrder - * @return customerOrder - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getCustomerOrder() { - return customerOrder; - } - - - /** - * customerOrder - * - * @param customerOrder - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerOrder(List customerOrder) { - this.customerOrder = customerOrder; - } - - - /** - * Return true if this CardData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardData cardData = (CardData) o; - return Objects.equals(this.paymentBrand, cardData.paymentBrand) && - Objects.equals(this.maskedPan, cardData.maskedPan) && - Objects.equals(this.paymentAccountRef, cardData.paymentAccountRef) && - Objects.equals(this.entryMode, cardData.entryMode) && - Objects.equals(this.cardCountryCode, cardData.cardCountryCode) && - Objects.equals(this.protectedCardData, cardData.protectedCardData) && - Objects.equals(this.sensitiveCardData, cardData.sensitiveCardData) && - Objects.equals(this.allowedProductCode, cardData.allowedProductCode) && - Objects.equals(this.allowedProduct, cardData.allowedProduct) && - Objects.equals(this.paymentToken, cardData.paymentToken) && - Objects.equals(this.customerOrder, cardData.customerOrder); - } - - @Override - public int hashCode() { - return Objects.hash(paymentBrand, maskedPan, paymentAccountRef, entryMode, cardCountryCode, protectedCardData, sensitiveCardData, allowedProductCode, allowedProduct, paymentToken, customerOrder); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardData {\n"); - sb.append(" paymentBrand: ").append(toIndentedString(paymentBrand)).append("\n"); - sb.append(" maskedPan: ").append(toIndentedString(maskedPan)).append("\n"); - sb.append(" paymentAccountRef: ").append(toIndentedString(paymentAccountRef)).append("\n"); - sb.append(" entryMode: ").append(toIndentedString(entryMode)).append("\n"); - sb.append(" cardCountryCode: ").append(toIndentedString(cardCountryCode)).append("\n"); - sb.append(" protectedCardData: ").append(toIndentedString(protectedCardData)).append("\n"); - sb.append(" sensitiveCardData: ").append(toIndentedString(sensitiveCardData)).append("\n"); - sb.append(" allowedProductCode: ").append(toIndentedString(allowedProductCode)).append("\n"); - sb.append(" allowedProduct: ").append(toIndentedString(allowedProduct)).append("\n"); - sb.append(" paymentToken: ").append(toIndentedString(paymentToken)).append("\n"); - sb.append(" customerOrder: ").append(toIndentedString(customerOrder)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of CardData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CardData - * @throws JsonProcessingException if the JSON string is invalid with respect to CardData - */ - public static CardData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, CardData.class); - } -/** - * Convert an instance of CardData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/CardHolderPIN.java b/src/main/java/com/adyen/model/terminal/CardHolderPIN.java deleted file mode 100644 index 879442581..000000000 --- a/src/main/java/com/adyen/model/terminal/CardHolderPIN.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.PINFormat; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * CardHolderPIN - */ -@JsonPropertyOrder({ - CardHolderPIN.JSON_PROPERTY_ENCR_P_I_N_BLOCK, - CardHolderPIN.JSON_PROPERTY_PI_N_FORMAT, - CardHolderPIN.JSON_PROPERTY_ADDITIONAL_INPUT -}) - -public class CardHolderPIN { - public static final String JSON_PROPERTY_ENCR_P_I_N_BLOCK = "EncrPINBlock"; - private String encrPINBlock; - - public static final String JSON_PROPERTY_PI_N_FORMAT = "PINFormat"; - private PINFormat piNFormat; - - public static final String JSON_PROPERTY_ADDITIONAL_INPUT = "AdditionalInput"; - private String additionalInput; - - public CardHolderPIN() { - } - - public CardHolderPIN encrPINBlock(String encrPINBlock) { - this.encrPINBlock = encrPINBlock; - return this; - } - - /** - * Get encrPINBlock - * @return encrPINBlock - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_ENCR_P_I_N_BLOCK) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getEncrPINBlock() { - return encrPINBlock; - } - - - /** - * encrPINBlock - * - * @param encrPINBlock - */ - @JsonProperty(JSON_PROPERTY_ENCR_P_I_N_BLOCK) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEncrPINBlock(String encrPINBlock) { - this.encrPINBlock = encrPINBlock; - } - - - public CardHolderPIN piNFormat(PINFormat piNFormat) { - this.piNFormat = piNFormat; - return this; - } - - /** - * Get piNFormat - * @return piNFormat - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PI_N_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PINFormat getPiNFormat() { - return piNFormat; - } - - - /** - * piNFormat - * - * @param piNFormat - */ - @JsonProperty(JSON_PROPERTY_PI_N_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPiNFormat(PINFormat piNFormat) { - this.piNFormat = piNFormat; - } - - - public CardHolderPIN additionalInput(String additionalInput) { - this.additionalInput = additionalInput; - return this; - } - - /** - * Get additionalInput - * @return additionalInput - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ADDITIONAL_INPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getAdditionalInput() { - return additionalInput; - } - - - /** - * additionalInput - * - * @param additionalInput - */ - @JsonProperty(JSON_PROPERTY_ADDITIONAL_INPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAdditionalInput(String additionalInput) { - this.additionalInput = additionalInput; - } - - - /** - * Return true if this CardHolderPIN object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardHolderPIN cardHolderPIN = (CardHolderPIN) o; - return Objects.equals(this.encrPINBlock, cardHolderPIN.encrPINBlock) && - Objects.equals(this.piNFormat, cardHolderPIN.piNFormat) && - Objects.equals(this.additionalInput, cardHolderPIN.additionalInput); - } - - @Override - public int hashCode() { - return Objects.hash(encrPINBlock, piNFormat, additionalInput); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardHolderPIN {\n"); - sb.append(" encrPINBlock: ").append(toIndentedString(encrPINBlock)).append("\n"); - sb.append(" piNFormat: ").append(toIndentedString(piNFormat)).append("\n"); - sb.append(" additionalInput: ").append(toIndentedString(additionalInput)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of CardHolderPIN given an JSON string - * - * @param jsonString JSON string - * @return An instance of CardHolderPIN - * @throws JsonProcessingException if the JSON string is invalid with respect to CardHolderPIN - */ - public static CardHolderPIN fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, CardHolderPIN.class); - } -/** - * Convert an instance of CardHolderPIN to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/CardReaderAPDURequest.java b/src/main/java/com/adyen/model/terminal/CardReaderAPDURequest.java deleted file mode 100644 index 005943329..000000000 --- a/src/main/java/com/adyen/model/terminal/CardReaderAPDURequest.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It contains the APDU request to send to the chip of the card, and a possible invitation message to display on the CashierInterface or the CustomerInterface. Content of the Card Reader APDU Request message. - */ -@ApiModel(description = "It contains the APDU request to send to the chip of the card, and a possible invitation message to display on the CashierInterface or the CustomerInterface. Content of the Card Reader APDU Request message.") -@JsonPropertyOrder({ - CardReaderAPDURequest.JSON_PROPERTY_AP_D_U_CLASS, - CardReaderAPDURequest.JSON_PROPERTY_AP_D_U_INSTRUCTION, - CardReaderAPDURequest.JSON_PROPERTY_AP_D_U_PAR1, - CardReaderAPDURequest.JSON_PROPERTY_AP_D_U_PAR2, - CardReaderAPDURequest.JSON_PROPERTY_AP_D_U_DATA, - CardReaderAPDURequest.JSON_PROPERTY_AP_D_U_EXPECTED_LENGTH -}) - -public class CardReaderAPDURequest { - public static final String JSON_PROPERTY_AP_D_U_CLASS = "APDUClass"; - private byte[] apDUClass; - - public static final String JSON_PROPERTY_AP_D_U_INSTRUCTION = "APDUInstruction"; - private byte[] apDUInstruction; - - public static final String JSON_PROPERTY_AP_D_U_PAR1 = "APDUPar1"; - private byte[] apDUPar1; - - public static final String JSON_PROPERTY_AP_D_U_PAR2 = "APDUPar2"; - private byte[] apDUPar2; - - public static final String JSON_PROPERTY_AP_D_U_DATA = "APDUData"; - private byte[] apDUData; - - public static final String JSON_PROPERTY_AP_D_U_EXPECTED_LENGTH = "APDUExpectedLength"; - private byte[] apDUExpectedLength; - - public CardReaderAPDURequest() { - } - - public CardReaderAPDURequest apDUClass(byte[] apDUClass) { - this.apDUClass = apDUClass; - return this; - } - - /** - * Class field of the APDU command (CLA). - * @return apDUClass - **/ - @ApiModelProperty(required = true, value = "Class field of the APDU command (CLA).") - @JsonProperty(JSON_PROPERTY_AP_D_U_CLASS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getApDUClass() { - return apDUClass; - } - - - /** - * Class field of the APDU command (CLA). - * - * @param apDUClass - */ - @JsonProperty(JSON_PROPERTY_AP_D_U_CLASS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApDUClass(byte[] apDUClass) { - this.apDUClass = apDUClass; - } - - - public CardReaderAPDURequest apDUInstruction(byte[] apDUInstruction) { - this.apDUInstruction = apDUInstruction; - return this; - } - - /** - * Instruction field of the APDU command (INS). - * @return apDUInstruction - **/ - @ApiModelProperty(required = true, value = "Instruction field of the APDU command (INS).") - @JsonProperty(JSON_PROPERTY_AP_D_U_INSTRUCTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getApDUInstruction() { - return apDUInstruction; - } - - - /** - * Instruction field of the APDU command (INS). - * - * @param apDUInstruction - */ - @JsonProperty(JSON_PROPERTY_AP_D_U_INSTRUCTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApDUInstruction(byte[] apDUInstruction) { - this.apDUInstruction = apDUInstruction; - } - - - public CardReaderAPDURequest apDUPar1(byte[] apDUPar1) { - this.apDUPar1 = apDUPar1; - return this; - } - - /** - * Parameter 1 field of the APDU command (P1). - * @return apDUPar1 - **/ - @ApiModelProperty(required = true, value = "Parameter 1 field of the APDU command (P1).") - @JsonProperty(JSON_PROPERTY_AP_D_U_PAR1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getApDUPar1() { - return apDUPar1; - } - - - /** - * Parameter 1 field of the APDU command (P1). - * - * @param apDUPar1 - */ - @JsonProperty(JSON_PROPERTY_AP_D_U_PAR1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApDUPar1(byte[] apDUPar1) { - this.apDUPar1 = apDUPar1; - } - - - public CardReaderAPDURequest apDUPar2(byte[] apDUPar2) { - this.apDUPar2 = apDUPar2; - return this; - } - - /** - * Parameter 2 field of the APDU command(P2). - * @return apDUPar2 - **/ - @ApiModelProperty(required = true, value = "Parameter 2 field of the APDU command(P2).") - @JsonProperty(JSON_PROPERTY_AP_D_U_PAR2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getApDUPar2() { - return apDUPar2; - } - - - /** - * Parameter 2 field of the APDU command(P2). - * - * @param apDUPar2 - */ - @JsonProperty(JSON_PROPERTY_AP_D_U_PAR2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApDUPar2(byte[] apDUPar2) { - this.apDUPar2 = apDUPar2; - } - - - public CardReaderAPDURequest apDUData(byte[] apDUData) { - this.apDUData = apDUData; - return this; - } - - /** - * Data field of the APDU command (Lc + Data). - * @return apDUData - **/ - @ApiModelProperty(value = "Data field of the APDU command (Lc + Data).") - @JsonProperty(JSON_PROPERTY_AP_D_U_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getApDUData() { - return apDUData; - } - - - /** - * Data field of the APDU command (Lc + Data). - * - * @param apDUData - */ - @JsonProperty(JSON_PROPERTY_AP_D_U_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApDUData(byte[] apDUData) { - this.apDUData = apDUData; - } - - - public CardReaderAPDURequest apDUExpectedLength(byte[] apDUExpectedLength) { - this.apDUExpectedLength = apDUExpectedLength; - return this; - } - - /** - * Expected length of the data field of the APDU response to the command (Le). - * @return apDUExpectedLength - **/ - @ApiModelProperty(value = "Expected length of the data field of the APDU response to the command (Le).") - @JsonProperty(JSON_PROPERTY_AP_D_U_EXPECTED_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getApDUExpectedLength() { - return apDUExpectedLength; - } - - - /** - * Expected length of the data field of the APDU response to the command (Le). - * - * @param apDUExpectedLength - */ - @JsonProperty(JSON_PROPERTY_AP_D_U_EXPECTED_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApDUExpectedLength(byte[] apDUExpectedLength) { - this.apDUExpectedLength = apDUExpectedLength; - } - - - /** - * Return true if this CardReaderAPDURequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardReaderAPDURequest cardReaderAPDURequest = (CardReaderAPDURequest) o; - return Arrays.equals(this.apDUClass, cardReaderAPDURequest.apDUClass) && - Arrays.equals(this.apDUInstruction, cardReaderAPDURequest.apDUInstruction) && - Arrays.equals(this.apDUPar1, cardReaderAPDURequest.apDUPar1) && - Arrays.equals(this.apDUPar2, cardReaderAPDURequest.apDUPar2) && - Arrays.equals(this.apDUData, cardReaderAPDURequest.apDUData) && - Arrays.equals(this.apDUExpectedLength, cardReaderAPDURequest.apDUExpectedLength); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(apDUClass), Arrays.hashCode(apDUInstruction), Arrays.hashCode(apDUPar1), Arrays.hashCode(apDUPar2), Arrays.hashCode(apDUData), Arrays.hashCode(apDUExpectedLength)); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardReaderAPDURequest {\n"); - sb.append(" apDUClass: ").append(toIndentedString(apDUClass)).append("\n"); - sb.append(" apDUInstruction: ").append(toIndentedString(apDUInstruction)).append("\n"); - sb.append(" apDUPar1: ").append(toIndentedString(apDUPar1)).append("\n"); - sb.append(" apDUPar2: ").append(toIndentedString(apDUPar2)).append("\n"); - sb.append(" apDUData: ").append(toIndentedString(apDUData)).append("\n"); - sb.append(" apDUExpectedLength: ").append(toIndentedString(apDUExpectedLength)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of CardReaderAPDURequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CardReaderAPDURequest - * @throws JsonProcessingException if the JSON string is invalid with respect to CardReaderAPDURequest - */ - public static CardReaderAPDURequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, CardReaderAPDURequest.class); - } -/** - * Convert an instance of CardReaderAPDURequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/CardReaderAPDUResponse.java b/src/main/java/com/adyen/model/terminal/CardReaderAPDUResponse.java deleted file mode 100644 index eb3383dcb..000000000 --- a/src/main/java/com/adyen/model/terminal/CardReaderAPDUResponse.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.Response; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It contains the result of the requested service, APDU response sent by the chip of the card in response to the APDU request. Content of the Card Reader APDU Response message. - */ -@ApiModel(description = "It contains the result of the requested service, APDU response sent by the chip of the card in response to the APDU request. Content of the Card Reader APDU Response message.") -@JsonPropertyOrder({ - CardReaderAPDUResponse.JSON_PROPERTY_RESPONSE, - CardReaderAPDUResponse.JSON_PROPERTY_AP_D_U_DATA, - CardReaderAPDUResponse.JSON_PROPERTY_CARD_STATUS_WORDS -}) - -public class CardReaderAPDUResponse { - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public static final String JSON_PROPERTY_AP_D_U_DATA = "APDUData"; - private byte[] apDUData; - - public static final String JSON_PROPERTY_CARD_STATUS_WORDS = "CardStatusWords"; - private byte[] cardStatusWords; - - public CardReaderAPDUResponse() { - } - - public CardReaderAPDUResponse response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - public CardReaderAPDUResponse apDUData(byte[] apDUData) { - this.apDUData = apDUData; - return this; - } - - /** - * Data field of the APDU command (Lc + Data). - * @return apDUData - **/ - @ApiModelProperty(value = "Data field of the APDU command (Lc + Data).") - @JsonProperty(JSON_PROPERTY_AP_D_U_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getApDUData() { - return apDUData; - } - - - /** - * Data field of the APDU command (Lc + Data). - * - * @param apDUData - */ - @JsonProperty(JSON_PROPERTY_AP_D_U_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApDUData(byte[] apDUData) { - this.apDUData = apDUData; - } - - - public CardReaderAPDUResponse cardStatusWords(byte[] cardStatusWords) { - this.cardStatusWords = cardStatusWords; - return this; - } - - /** - * Status of a smartcard response to a command (SW1-SW2). - * @return cardStatusWords - **/ - @ApiModelProperty(required = true, value = "Status of a smartcard response to a command (SW1-SW2).") - @JsonProperty(JSON_PROPERTY_CARD_STATUS_WORDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getCardStatusWords() { - return cardStatusWords; - } - - - /** - * Status of a smartcard response to a command (SW1-SW2). - * - * @param cardStatusWords - */ - @JsonProperty(JSON_PROPERTY_CARD_STATUS_WORDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCardStatusWords(byte[] cardStatusWords) { - this.cardStatusWords = cardStatusWords; - } - - - /** - * Return true if this CardReaderAPDUResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardReaderAPDUResponse cardReaderAPDUResponse = (CardReaderAPDUResponse) o; - return Objects.equals(this.response, cardReaderAPDUResponse.response) && - Arrays.equals(this.apDUData, cardReaderAPDUResponse.apDUData) && - Arrays.equals(this.cardStatusWords, cardReaderAPDUResponse.cardStatusWords); - } - - @Override - public int hashCode() { - return Objects.hash(response, Arrays.hashCode(apDUData), Arrays.hashCode(cardStatusWords)); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardReaderAPDUResponse {\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append(" apDUData: ").append(toIndentedString(apDUData)).append("\n"); - sb.append(" cardStatusWords: ").append(toIndentedString(cardStatusWords)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of CardReaderAPDUResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CardReaderAPDUResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to CardReaderAPDUResponse - */ - public static CardReaderAPDUResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, CardReaderAPDUResponse.class); - } -/** - * Convert an instance of CardReaderAPDUResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/CashHandlingDevice.java b/src/main/java/com/adyen/model/terminal/CashHandlingDevice.java deleted file mode 100644 index c0b2a2594..000000000 --- a/src/main/java/com/adyen/model/terminal/CashHandlingDevice.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.CoinsOrBills; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Indicate the status and the remaining coins and bill in a cash handling device. Status of cash handling device. - */ -@ApiModel(description = "Indicate the status and the remaining coins and bill in a cash handling device. Status of cash handling device.") -@JsonPropertyOrder({ - CashHandlingDevice.JSON_PROPERTY_CASH_HANDLING_O_K_FLAG, - CashHandlingDevice.JSON_PROPERTY_CURRENCY, - CashHandlingDevice.JSON_PROPERTY_COINS_OR_BILLS -}) - -public class CashHandlingDevice { - public static final String JSON_PROPERTY_CASH_HANDLING_O_K_FLAG = "CashHandlingOKFlag"; - private Boolean cashHandlingOKFlag; - - public static final String JSON_PROPERTY_CURRENCY = "Currency"; - private String currency; - - public static final String JSON_PROPERTY_COINS_OR_BILLS = "CoinsOrBills"; - private List coinsOrBills = new ArrayList<>(); - - public CashHandlingDevice() { - } - - public CashHandlingDevice cashHandlingOKFlag(Boolean cashHandlingOKFlag) { - this.cashHandlingOKFlag = cashHandlingOKFlag; - return this; - } - - /** - * Indicates if the cash handling device is working and usable. - * @return cashHandlingOKFlag - **/ - @ApiModelProperty(required = true, value = "Indicates if the cash handling device is working and usable.") - @JsonProperty(JSON_PROPERTY_CASH_HANDLING_O_K_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getCashHandlingOKFlag() { - return cashHandlingOKFlag; - } - - - /** - * Indicates if the cash handling device is working and usable. - * - * @param cashHandlingOKFlag - */ - @JsonProperty(JSON_PROPERTY_CASH_HANDLING_O_K_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCashHandlingOKFlag(Boolean cashHandlingOKFlag) { - this.cashHandlingOKFlag = cashHandlingOKFlag; - } - - - public CashHandlingDevice currency(String currency) { - this.currency = currency; - return this; - } - - /** - * Currency of a monetary amount. - * @return currency - **/ - @ApiModelProperty(required = true, value = "Currency of a monetary amount.") - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCurrency() { - return currency; - } - - - /** - * Currency of a monetary amount. - * - * @param currency - */ - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrency(String currency) { - this.currency = currency; - } - - - public CashHandlingDevice coinsOrBills(List coinsOrBills) { - this.coinsOrBills = coinsOrBills; - return this; - } - - public CashHandlingDevice addCoinsOrBillsItem(CoinsOrBills coinsOrBillsItem) { - this.coinsOrBills.add(coinsOrBillsItem); - return this; - } - - /** - * Get coinsOrBills - * @return coinsOrBills - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_COINS_OR_BILLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getCoinsOrBills() { - return coinsOrBills; - } - - - /** - * coinsOrBills - * - * @param coinsOrBills - */ - @JsonProperty(JSON_PROPERTY_COINS_OR_BILLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCoinsOrBills(List coinsOrBills) { - this.coinsOrBills = coinsOrBills; - } - - - /** - * Return true if this CashHandlingDevice object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CashHandlingDevice cashHandlingDevice = (CashHandlingDevice) o; - return Objects.equals(this.cashHandlingOKFlag, cashHandlingDevice.cashHandlingOKFlag) && - Objects.equals(this.currency, cashHandlingDevice.currency) && - Objects.equals(this.coinsOrBills, cashHandlingDevice.coinsOrBills); - } - - @Override - public int hashCode() { - return Objects.hash(cashHandlingOKFlag, currency, coinsOrBills); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CashHandlingDevice {\n"); - sb.append(" cashHandlingOKFlag: ").append(toIndentedString(cashHandlingOKFlag)).append("\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append(" coinsOrBills: ").append(toIndentedString(coinsOrBills)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of CashHandlingDevice given an JSON string - * - * @param jsonString JSON string - * @return An instance of CashHandlingDevice - * @throws JsonProcessingException if the JSON string is invalid with respect to CashHandlingDevice - */ - public static CashHandlingDevice fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, CashHandlingDevice.class); - } -/** - * Convert an instance of CashHandlingDevice to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/CharacterHeight.java b/src/main/java/com/adyen/model/terminal/CharacterHeight.java deleted file mode 100644 index 7c0641b61..000000000 --- a/src/main/java/com/adyen/model/terminal/CharacterHeight.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets CharacterHeight - */ -public enum CharacterHeight { - - DOUBLEHEIGHT("DoubleHeight"), - - HALFHEIGHT("HalfHeight"), - - SINGLEHEIGHT("SingleHeight"); - - private String value; - - CharacterHeight(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static CharacterHeight fromValue(String value) { - for (CharacterHeight b : CharacterHeight.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/CharacterStyle.java b/src/main/java/com/adyen/model/terminal/CharacterStyle.java deleted file mode 100644 index 8c2070fc9..000000000 --- a/src/main/java/com/adyen/model/terminal/CharacterStyle.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets CharacterStyle - */ -public enum CharacterStyle { - - BOLD("Bold"), - - ITALIC("Italic"), - - NORMAL("Normal"), - - UNDERLINE("Underline"); - - private String value; - - CharacterStyle(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static CharacterStyle fromValue(String value) { - for (CharacterStyle b : CharacterStyle.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/CharacterWidth.java b/src/main/java/com/adyen/model/terminal/CharacterWidth.java deleted file mode 100644 index 2fc028a86..000000000 --- a/src/main/java/com/adyen/model/terminal/CharacterWidth.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets CharacterWidth - */ -public enum CharacterWidth { - - DOUBLEWIDTH("DoubleWidth"), - - SINGLEWIDTH("SingleWidth"); - - private String value; - - CharacterWidth(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static CharacterWidth fromValue(String value) { - for (CharacterWidth b : CharacterWidth.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/CheckData.java b/src/main/java/com/adyen/model/terminal/CheckData.java deleted file mode 100644 index f0d585cb3..000000000 --- a/src/main/java/com/adyen/model/terminal/CheckData.java +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.TrackData; -import com.adyen.model.terminal.TypeCode; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Allows the check information to be provided by the Sale System before requesting the payment, or stored by the Sale System after processing of the payment. Information related to the paper check used for the transaction. - */ -@ApiModel(description = "Allows the check information to be provided by the Sale System before requesting the payment, or stored by the Sale System after processing of the payment. Information related to the paper check used for the transaction.") -@JsonPropertyOrder({ - CheckData.JSON_PROPERTY_BANK_I_D, - CheckData.JSON_PROPERTY_ACCOUNT_NUMBER, - CheckData.JSON_PROPERTY_CHECK_NUMBER, - CheckData.JSON_PROPERTY_TRACK_DATA, - CheckData.JSON_PROPERTY_CHECK_CARD_NUMBER, - CheckData.JSON_PROPERTY_TYPE_CODE, - CheckData.JSON_PROPERTY_COUNTRY -}) - -public class CheckData { - public static final String JSON_PROPERTY_BANK_I_D = "BankID"; - private String bankID; - - public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "AccountNumber"; - private String accountNumber; - - public static final String JSON_PROPERTY_CHECK_NUMBER = "CheckNumber"; - private String checkNumber; - - public static final String JSON_PROPERTY_TRACK_DATA = "TrackData"; - private TrackData trackData; - - public static final String JSON_PROPERTY_CHECK_CARD_NUMBER = "CheckCardNumber"; - private String checkCardNumber; - - public static final String JSON_PROPERTY_TYPE_CODE = "TypeCode"; - private TypeCode typeCode; - - public static final String JSON_PROPERTY_COUNTRY = "Country"; - private String country; - - public CheckData() { - } - - public CheckData bankID(String bankID) { - this.bankID = bankID; - return this; - } - - /** - * Mandatory if TrackData absent. - * @return bankID - **/ - @ApiModelProperty(value = "Mandatory if TrackData absent.") - @JsonProperty(JSON_PROPERTY_BANK_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBankID() { - return bankID; - } - - - /** - * Mandatory if TrackData absent. - * - * @param bankID - */ - @JsonProperty(JSON_PROPERTY_BANK_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBankID(String bankID) { - this.bankID = bankID; - } - - - public CheckData accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Mandatory if TrackData absent. - * @return accountNumber - **/ - @ApiModelProperty(value = "Mandatory if TrackData absent.") - @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getAccountNumber() { - return accountNumber; - } - - - /** - * Mandatory if TrackData absent. - * - * @param accountNumber - */ - @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public CheckData checkNumber(String checkNumber) { - this.checkNumber = checkNumber; - return this; - } - - /** - * Mandatory if TrackData absent. - * @return checkNumber - **/ - @ApiModelProperty(value = "Mandatory if TrackData absent.") - @JsonProperty(JSON_PROPERTY_CHECK_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCheckNumber() { - return checkNumber; - } - - - /** - * Mandatory if TrackData absent. - * - * @param checkNumber - */ - @JsonProperty(JSON_PROPERTY_CHECK_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCheckNumber(String checkNumber) { - this.checkNumber = checkNumber; - } - - - public CheckData trackData(TrackData trackData) { - this.trackData = trackData; - return this; - } - - /** - * Get trackData - * @return trackData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TRACK_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TrackData getTrackData() { - return trackData; - } - - - /** - * trackData - * - * @param trackData - */ - @JsonProperty(JSON_PROPERTY_TRACK_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTrackData(TrackData trackData) { - this.trackData = trackData; - } - - - public CheckData checkCardNumber(String checkCardNumber) { - this.checkCardNumber = checkCardNumber; - return this; - } - - /** - * If provided by the customer. - * @return checkCardNumber - **/ - @ApiModelProperty(value = "If provided by the customer.") - @JsonProperty(JSON_PROPERTY_CHECK_CARD_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCheckCardNumber() { - return checkCardNumber; - } - - - /** - * If provided by the customer. - * - * @param checkCardNumber - */ - @JsonProperty(JSON_PROPERTY_CHECK_CARD_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCheckCardNumber(String checkCardNumber) { - this.checkCardNumber = checkCardNumber; - } - - - public CheckData typeCode(TypeCode typeCode) { - this.typeCode = typeCode; - return this; - } - - /** - * Get typeCode - * @return typeCode - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TYPE_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TypeCode getTypeCode() { - return typeCode; - } - - - /** - * typeCode - * - * @param typeCode - */ - @JsonProperty(JSON_PROPERTY_TYPE_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTypeCode(TypeCode typeCode) { - this.typeCode = typeCode; - } - - - public CheckData country(String country) { - this.country = country; - return this; - } - - /** - * Absent if country of the Sale system. - * @return country - **/ - @ApiModelProperty(value = "Absent if country of the Sale system.") - @JsonProperty(JSON_PROPERTY_COUNTRY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCountry() { - return country; - } - - - /** - * Absent if country of the Sale system. - * - * @param country - */ - @JsonProperty(JSON_PROPERTY_COUNTRY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCountry(String country) { - this.country = country; - } - - - /** - * Return true if this CheckData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckData checkData = (CheckData) o; - return Objects.equals(this.bankID, checkData.bankID) && - Objects.equals(this.accountNumber, checkData.accountNumber) && - Objects.equals(this.checkNumber, checkData.checkNumber) && - Objects.equals(this.trackData, checkData.trackData) && - Objects.equals(this.checkCardNumber, checkData.checkCardNumber) && - Objects.equals(this.typeCode, checkData.typeCode) && - Objects.equals(this.country, checkData.country); - } - - @Override - public int hashCode() { - return Objects.hash(bankID, accountNumber, checkNumber, trackData, checkCardNumber, typeCode, country); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckData {\n"); - sb.append(" bankID: ").append(toIndentedString(bankID)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" checkNumber: ").append(toIndentedString(checkNumber)).append("\n"); - sb.append(" trackData: ").append(toIndentedString(trackData)).append("\n"); - sb.append(" checkCardNumber: ").append(toIndentedString(checkCardNumber)).append("\n"); - sb.append(" typeCode: ").append(toIndentedString(typeCode)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of CheckData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckData - * @throws JsonProcessingException if the JSON string is invalid with respect to CheckData - */ - public static CheckData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, CheckData.class); - } -/** - * Convert an instance of CheckData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/CoinsOrBills.java b/src/main/java/com/adyen/model/terminal/CoinsOrBills.java deleted file mode 100644 index 1fd8aab4b..000000000 --- a/src/main/java/com/adyen/model/terminal/CoinsOrBills.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Indicates the remaining number of coins or bills of a given value in a cash handling device. When the cash handling machine does not have any more coins or bills of a certain value, the number must be equal to 0. Number of coins or bills of a given value. - */ -@ApiModel(description = "Indicates the remaining number of coins or bills of a given value in a cash handling device. When the cash handling machine does not have any more coins or bills of a certain value, the number must be equal to 0. Number of coins or bills of a given value.") -@JsonPropertyOrder({ - CoinsOrBills.JSON_PROPERTY_UNIT_VALUE, - CoinsOrBills.JSON_PROPERTY_NUMBER -}) - -public class CoinsOrBills { - public static final String JSON_PROPERTY_UNIT_VALUE = "UnitValue"; - private BigDecimal unitValue; - - public static final String JSON_PROPERTY_NUMBER = "Number"; - private Integer number; - - public CoinsOrBills() { - } - - public CoinsOrBills unitValue(BigDecimal unitValue) { - this.unitValue = unitValue; - return this; - } - - /** - * Value of a coin or bill. - * minimum: 0.0 - * maximum: 99999999.999999 - * @return unitValue - **/ - @ApiModelProperty(required = true, value = "Value of a coin or bill.") - @JsonProperty(JSON_PROPERTY_UNIT_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getUnitValue() { - return unitValue; - } - - - /** - * Value of a coin or bill. - * - * @param unitValue - */ - @JsonProperty(JSON_PROPERTY_UNIT_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUnitValue(BigDecimal unitValue) { - this.unitValue = unitValue; - } - - - public CoinsOrBills number(Integer number) { - this.number = number; - return this; - } - - /** - * Number of elements. - * @return number - **/ - @ApiModelProperty(required = true, value = "Number of elements.") - @JsonProperty(JSON_PROPERTY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getNumber() { - return number; - } - - - /** - * Number of elements. - * - * @param number - */ - @JsonProperty(JSON_PROPERTY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumber(Integer number) { - this.number = number; - } - - - /** - * Return true if this CoinsOrBills object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CoinsOrBills coinsOrBills = (CoinsOrBills) o; - return Objects.equals(this.unitValue, coinsOrBills.unitValue) && - Objects.equals(this.number, coinsOrBills.number); - } - - @Override - public int hashCode() { - return Objects.hash(unitValue, number); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CoinsOrBills {\n"); - sb.append(" unitValue: ").append(toIndentedString(unitValue)).append("\n"); - sb.append(" number: ").append(toIndentedString(number)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of CoinsOrBills given an JSON string - * - * @param jsonString JSON string - * @return An instance of CoinsOrBills - * @throws JsonProcessingException if the JSON string is invalid with respect to CoinsOrBills - */ - public static CoinsOrBills fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, CoinsOrBills.class); - } -/** - * Convert an instance of CoinsOrBills to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/Color.java b/src/main/java/com/adyen/model/terminal/Color.java deleted file mode 100644 index 90a29237d..000000000 --- a/src/main/java/com/adyen/model/terminal/Color.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets Color - */ -public enum Color { - - BLACK("Black"), - - BLUE("Blue"), - - CYAN("Cyan"), - - GREEN("Green"), - - MAGENTA("Magenta"), - - RED("Red"), - - WHITE("White"), - - YELLOW("Yellow"); - - private String value; - - Color(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Color fromValue(String value) { - for (Color b : Color.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/terminal/ConnectedTerminalsRequest.java b/src/main/java/com/adyen/model/terminal/ConnectedTerminalsRequest.java similarity index 59% rename from src/main/java/com/adyen/terminal/ConnectedTerminalsRequest.java rename to src/main/java/com/adyen/model/terminal/ConnectedTerminalsRequest.java index ca3705cab..33195c49d 100644 --- a/src/main/java/com/adyen/terminal/ConnectedTerminalsRequest.java +++ b/src/main/java/com/adyen/model/terminal/ConnectedTerminalsRequest.java @@ -1,7 +1,26 @@ -package com.adyen.terminal; +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ +package com.adyen.model.terminal; -import com.adyen.model.terminal.JSON; -import com.fasterxml.jackson.core.JsonProcessingException; +import com.google.gson.annotations.SerializedName; import java.util.Objects; @@ -10,12 +29,17 @@ */ public class ConnectedTerminalsRequest { + @SerializedName("merchantAccount") private String merchantAccount; + @SerializedName("store") private String store; + @SerializedName("uniqueTerminalId") private String uniqueTerminalId; + + public String getMerchantAccount() { return merchantAccount; } @@ -67,24 +91,4 @@ public String toString() { ", uniqueTerminalId='" + uniqueTerminalId + '\'' + '}'; } - - /** - * Create an instance of ConnectedTerminalsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ConnectedTerminalsRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to ConnectedTerminalsRequest - */ - public static ConnectedTerminalsRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, ConnectedTerminalsRequest.class); - } - - /** - * Convert an instance of ConnectedTerminalsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } } diff --git a/src/main/java/com/adyen/model/terminal/ConnectedTerminalsResponse.java b/src/main/java/com/adyen/model/terminal/ConnectedTerminalsResponse.java new file mode 100644 index 000000000..998aa1b50 --- /dev/null +++ b/src/main/java/com/adyen/model/terminal/ConnectedTerminalsResponse.java @@ -0,0 +1,67 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ +package com.adyen.model.terminal; + +import com.google.gson.annotations.SerializedName; + +import java.util.List; +import java.util.Objects; + +/** + * Connected Terminals Response + */ +public class ConnectedTerminalsResponse { + + @SerializedName("uniqueTerminalIds") + private List uniqueTerminalIds; + + public List getUniqueTerminalIds() { + return uniqueTerminalIds; + } + + public void setUniqueTerminalIds(List uniqueTerminalIds) { + this.uniqueTerminalIds = uniqueTerminalIds; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectedTerminalsResponse that = (ConnectedTerminalsResponse) o; + return Objects.equals(uniqueTerminalIds, that.uniqueTerminalIds); + } + + @Override + public int hashCode() { + return Objects.hash(uniqueTerminalIds); + } + + @Override + public String toString() { + return "ConnectedTerminalsResponse{" + + "uniqueTerminalIds=" + uniqueTerminalIds + + '}'; + } +} diff --git a/src/main/java/com/adyen/model/terminal/ConvertedAmount.java b/src/main/java/com/adyen/model/terminal/ConvertedAmount.java deleted file mode 100644 index 31e069942..000000000 --- a/src/main/java/com/adyen/model/terminal/ConvertedAmount.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * ConvertedAmount - */ -@JsonPropertyOrder({ - ConvertedAmount.JSON_PROPERTY_AMOUNT_VALUE, - ConvertedAmount.JSON_PROPERTY_CURRENCY -}) - -public class ConvertedAmount { - public static final String JSON_PROPERTY_AMOUNT_VALUE = "AmountValue"; - private BigDecimal amountValue; - - public static final String JSON_PROPERTY_CURRENCY = "Currency"; - private String currency; - - public ConvertedAmount() { - } - - public ConvertedAmount amountValue(BigDecimal amountValue) { - this.amountValue = amountValue; - return this; - } - - /** - * Get amountValue - * minimum: 0.0 - * maximum: 99999999.999999 - * @return amountValue - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_AMOUNT_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getAmountValue() { - return amountValue; - } - - - /** - * amountValue - * - * @param amountValue - */ - @JsonProperty(JSON_PROPERTY_AMOUNT_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAmountValue(BigDecimal amountValue) { - this.amountValue = amountValue; - } - - - public ConvertedAmount currency(String currency) { - this.currency = currency; - return this; - } - - /** - * Get currency - * @return currency - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCurrency() { - return currency; - } - - - /** - * currency - * - * @param currency - */ - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrency(String currency) { - this.currency = currency; - } - - - /** - * Return true if this ConvertedAmount object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConvertedAmount convertedAmount = (ConvertedAmount) o; - return Objects.equals(this.amountValue, convertedAmount.amountValue) && - Objects.equals(this.currency, convertedAmount.currency); - } - - @Override - public int hashCode() { - return Objects.hash(amountValue, currency); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConvertedAmount {\n"); - sb.append(" amountValue: ").append(toIndentedString(amountValue)).append("\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of ConvertedAmount given an JSON string - * - * @param jsonString JSON string - * @return An instance of ConvertedAmount - * @throws JsonProcessingException if the JSON string is invalid with respect to ConvertedAmount - */ - public static ConvertedAmount fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, ConvertedAmount.class); - } -/** - * Convert an instance of ConvertedAmount to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/CurrencyConversion.java b/src/main/java/com/adyen/model/terminal/CurrencyConversion.java deleted file mode 100644 index 29ea8fd83..000000000 --- a/src/main/java/com/adyen/model/terminal/CurrencyConversion.java +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.ConvertedAmount; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * A currency conversion occurred in the payment, and the merchant needs to know information related to this conversion (e.g. to print on the sale receipt). Information related to a currency conversion. - */ -@ApiModel(description = "A currency conversion occurred in the payment, and the merchant needs to know information related to this conversion (e.g. to print on the sale receipt). Information related to a currency conversion.") -@JsonPropertyOrder({ - CurrencyConversion.JSON_PROPERTY_CUSTOMER_APPROVED_FLAG, - CurrencyConversion.JSON_PROPERTY_CONVERTED_AMOUNT, - CurrencyConversion.JSON_PROPERTY_RATE, - CurrencyConversion.JSON_PROPERTY_MARKUP, - CurrencyConversion.JSON_PROPERTY_COMMISSION, - CurrencyConversion.JSON_PROPERTY_DECLARATION -}) - -public class CurrencyConversion { - public static final String JSON_PROPERTY_CUSTOMER_APPROVED_FLAG = "CustomerApprovedFlag"; - private Boolean customerApprovedFlag = true; - - public static final String JSON_PROPERTY_CONVERTED_AMOUNT = "ConvertedAmount"; - private ConvertedAmount convertedAmount; - - public static final String JSON_PROPERTY_RATE = "Rate"; - private String rate; - - public static final String JSON_PROPERTY_MARKUP = "Markup"; - private String markup; - - public static final String JSON_PROPERTY_COMMISSION = "Commission"; - private BigDecimal commission; - - public static final String JSON_PROPERTY_DECLARATION = "Declaration"; - private String declaration; - - public CurrencyConversion() { - } - - public CurrencyConversion customerApprovedFlag(Boolean customerApprovedFlag) { - this.customerApprovedFlag = customerApprovedFlag; - return this; - } - - /** - * Notify if the customer has approved something. Indicates if the customer has accepted a currency conversion. - * @return customerApprovedFlag - **/ - @ApiModelProperty(value = "Notify if the customer has approved something. Indicates if the customer has accepted a currency conversion.") - @JsonProperty(JSON_PROPERTY_CUSTOMER_APPROVED_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getCustomerApprovedFlag() { - return customerApprovedFlag; - } - - - /** - * Notify if the customer has approved something. Indicates if the customer has accepted a currency conversion. - * - * @param customerApprovedFlag - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_APPROVED_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerApprovedFlag(Boolean customerApprovedFlag) { - this.customerApprovedFlag = customerApprovedFlag; - } - - - public CurrencyConversion convertedAmount(ConvertedAmount convertedAmount) { - this.convertedAmount = convertedAmount; - return this; - } - - /** - * Get convertedAmount - * @return convertedAmount - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_CONVERTED_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public ConvertedAmount getConvertedAmount() { - return convertedAmount; - } - - - /** - * convertedAmount - * - * @param convertedAmount - */ - @JsonProperty(JSON_PROPERTY_CONVERTED_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setConvertedAmount(ConvertedAmount convertedAmount) { - this.convertedAmount = convertedAmount; - } - - - public CurrencyConversion rate(String rate) { - this.rate = rate; - return this; - } - - /** - * Rate of currency conversion. - * @return rate - **/ - @ApiModelProperty(value = "Rate of currency conversion.") - @JsonProperty(JSON_PROPERTY_RATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getRate() { - return rate; - } - - - /** - * Rate of currency conversion. - * - * @param rate - */ - @JsonProperty(JSON_PROPERTY_RATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRate(String rate) { - this.rate = rate; - } - - - public CurrencyConversion markup(String markup) { - this.markup = markup; - return this; - } - - /** - * Markup of a currency conversion amount as a percentage. - * @return markup - **/ - @ApiModelProperty(value = "Markup of a currency conversion amount as a percentage.") - @JsonProperty(JSON_PROPERTY_MARKUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getMarkup() { - return markup; - } - - - /** - * Markup of a currency conversion amount as a percentage. - * - * @param markup - */ - @JsonProperty(JSON_PROPERTY_MARKUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMarkup(String markup) { - this.markup = markup; - } - - - public CurrencyConversion commission(BigDecimal commission) { - this.commission = commission; - return this; - } - - /** - * Commission for a currency conversion. - * minimum: 0.0 - * maximum: 99999999.999999 - * @return commission - **/ - @ApiModelProperty(value = "Commission for a currency conversion.") - @JsonProperty(JSON_PROPERTY_COMMISSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getCommission() { - return commission; - } - - - /** - * Commission for a currency conversion. - * - * @param commission - */ - @JsonProperty(JSON_PROPERTY_COMMISSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCommission(BigDecimal commission) { - this.commission = commission; - } - - - public CurrencyConversion declaration(String declaration) { - this.declaration = declaration; - return this; - } - - /** - * If a declaration has to be presented to the customer. - * @return declaration - **/ - @ApiModelProperty(value = "If a declaration has to be presented to the customer.") - @JsonProperty(JSON_PROPERTY_DECLARATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getDeclaration() { - return declaration; - } - - - /** - * If a declaration has to be presented to the customer. - * - * @param declaration - */ - @JsonProperty(JSON_PROPERTY_DECLARATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclaration(String declaration) { - this.declaration = declaration; - } - - - /** - * Return true if this CurrencyConversion object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CurrencyConversion currencyConversion = (CurrencyConversion) o; - return Objects.equals(this.customerApprovedFlag, currencyConversion.customerApprovedFlag) && - Objects.equals(this.convertedAmount, currencyConversion.convertedAmount) && - Objects.equals(this.rate, currencyConversion.rate) && - Objects.equals(this.markup, currencyConversion.markup) && - Objects.equals(this.commission, currencyConversion.commission) && - Objects.equals(this.declaration, currencyConversion.declaration); - } - - @Override - public int hashCode() { - return Objects.hash(customerApprovedFlag, convertedAmount, rate, markup, commission, declaration); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CurrencyConversion {\n"); - sb.append(" customerApprovedFlag: ").append(toIndentedString(customerApprovedFlag)).append("\n"); - sb.append(" convertedAmount: ").append(toIndentedString(convertedAmount)).append("\n"); - sb.append(" rate: ").append(toIndentedString(rate)).append("\n"); - sb.append(" markup: ").append(toIndentedString(markup)).append("\n"); - sb.append(" commission: ").append(toIndentedString(commission)).append("\n"); - sb.append(" declaration: ").append(toIndentedString(declaration)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of CurrencyConversion given an JSON string - * - * @param jsonString JSON string - * @return An instance of CurrencyConversion - * @throws JsonProcessingException if the JSON string is invalid with respect to CurrencyConversion - */ - public static CurrencyConversion fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, CurrencyConversion.class); - } -/** - * Convert an instance of CurrencyConversion to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/CustomerOrder.java b/src/main/java/com/adyen/model/terminal/CustomerOrder.java deleted file mode 100644 index 96f7acb04..000000000 --- a/src/main/java/com/adyen/model/terminal/CustomerOrder.java +++ /dev/null @@ -1,464 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.time.OffsetDateTime; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Customer order attached to a customer, recorded in the POI system. Allows the management of customer orders by the POI, for instance in a multi-channel or a click and collect sale transaction. - */ -@ApiModel(description = "Customer order attached to a customer, recorded in the POI system. Allows the management of customer orders by the POI, for instance in a multi-channel or a click and collect sale transaction.") -@JsonPropertyOrder({ - CustomerOrder.JSON_PROPERTY_CUSTOMER_ORDER_I_D, - CustomerOrder.JSON_PROPERTY_SALE_REFERENCE_I_D, - CustomerOrder.JSON_PROPERTY_OPEN_ORDER_STATE, - CustomerOrder.JSON_PROPERTY_START_DATE, - CustomerOrder.JSON_PROPERTY_END_DATE, - CustomerOrder.JSON_PROPERTY_FORECASTED_AMOUNT, - CustomerOrder.JSON_PROPERTY_CURRENT_AMOUNT, - CustomerOrder.JSON_PROPERTY_CURRENCY, - CustomerOrder.JSON_PROPERTY_ACCESSED_BY, - CustomerOrder.JSON_PROPERTY_ADDITIONAL_INFORMATION -}) - -public class CustomerOrder { - public static final String JSON_PROPERTY_CUSTOMER_ORDER_I_D = "CustomerOrderID"; - private String customerOrderID; - - public static final String JSON_PROPERTY_SALE_REFERENCE_I_D = "SaleReferenceID"; - private String saleReferenceID; - - public static final String JSON_PROPERTY_OPEN_ORDER_STATE = "OpenOrderState"; - private Boolean openOrderState = true; - - public static final String JSON_PROPERTY_START_DATE = "StartDate"; - private OffsetDateTime startDate; - - public static final String JSON_PROPERTY_END_DATE = "EndDate"; - private OffsetDateTime endDate; - - public static final String JSON_PROPERTY_FORECASTED_AMOUNT = "ForecastedAmount"; - private BigDecimal forecastedAmount; - - public static final String JSON_PROPERTY_CURRENT_AMOUNT = "CurrentAmount"; - private BigDecimal currentAmount; - - public static final String JSON_PROPERTY_CURRENCY = "Currency"; - private String currency; - - public static final String JSON_PROPERTY_ACCESSED_BY = "AccessedBy"; - private String accessedBy; - - public static final String JSON_PROPERTY_ADDITIONAL_INFORMATION = "AdditionalInformation"; - private String additionalInformation; - - public CustomerOrder() { - } - - public CustomerOrder customerOrderID(String customerOrderID) { - this.customerOrderID = customerOrderID; - return this; - } - - /** - * Additional and optional identification of a customer order. - * @return customerOrderID - **/ - @ApiModelProperty(value = "Additional and optional identification of a customer order.") - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCustomerOrderID() { - return customerOrderID; - } - - - /** - * Additional and optional identification of a customer order. - * - * @param customerOrderID - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerOrderID(String customerOrderID) { - this.customerOrderID = customerOrderID; - } - - - public CustomerOrder saleReferenceID(String saleReferenceID) { - this.saleReferenceID = saleReferenceID; - return this; - } - - /** - * Get saleReferenceID - * @return saleReferenceID - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_SALE_REFERENCE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSaleReferenceID() { - return saleReferenceID; - } - - - /** - * saleReferenceID - * - * @param saleReferenceID - */ - @JsonProperty(JSON_PROPERTY_SALE_REFERENCE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleReferenceID(String saleReferenceID) { - this.saleReferenceID = saleReferenceID; - } - - - public CustomerOrder openOrderState(Boolean openOrderState) { - this.openOrderState = openOrderState; - return this; - } - - /** - * Get openOrderState - * @return openOrderState - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_OPEN_ORDER_STATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getOpenOrderState() { - return openOrderState; - } - - - /** - * openOrderState - * - * @param openOrderState - */ - @JsonProperty(JSON_PROPERTY_OPEN_ORDER_STATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOpenOrderState(Boolean openOrderState) { - this.openOrderState = openOrderState; - } - - - public CustomerOrder startDate(OffsetDateTime startDate) { - this.startDate = startDate; - return this; - } - - /** - * Date time of the beginning of an operation. - * @return startDate - **/ - @ApiModelProperty(required = true, value = "Date time of the beginning of an operation.") - @JsonProperty(JSON_PROPERTY_START_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OffsetDateTime getStartDate() { - return startDate; - } - - - /** - * Date time of the beginning of an operation. - * - * @param startDate - */ - @JsonProperty(JSON_PROPERTY_START_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStartDate(OffsetDateTime startDate) { - this.startDate = startDate; - } - - - public CustomerOrder endDate(OffsetDateTime endDate) { - this.endDate = endDate; - return this; - } - - /** - * Date time of the end of an operation. - * @return endDate - **/ - @ApiModelProperty(value = "Date time of the end of an operation.") - @JsonProperty(JSON_PROPERTY_END_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OffsetDateTime getEndDate() { - return endDate; - } - - - /** - * Date time of the end of an operation. - * - * @param endDate - */ - @JsonProperty(JSON_PROPERTY_END_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEndDate(OffsetDateTime endDate) { - this.endDate = endDate; - } - - - public CustomerOrder forecastedAmount(BigDecimal forecastedAmount) { - this.forecastedAmount = forecastedAmount; - return this; - } - - /** - * Get forecastedAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return forecastedAmount - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_FORECASTED_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getForecastedAmount() { - return forecastedAmount; - } - - - /** - * forecastedAmount - * - * @param forecastedAmount - */ - @JsonProperty(JSON_PROPERTY_FORECASTED_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForecastedAmount(BigDecimal forecastedAmount) { - this.forecastedAmount = forecastedAmount; - } - - - public CustomerOrder currentAmount(BigDecimal currentAmount) { - this.currentAmount = currentAmount; - return this; - } - - /** - * Total amount of all completed transactions of a customer order. - * minimum: 0.0 - * maximum: 99999999.999999 - * @return currentAmount - **/ - @ApiModelProperty(required = true, value = "Total amount of all completed transactions of a customer order.") - @JsonProperty(JSON_PROPERTY_CURRENT_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getCurrentAmount() { - return currentAmount; - } - - - /** - * Total amount of all completed transactions of a customer order. - * - * @param currentAmount - */ - @JsonProperty(JSON_PROPERTY_CURRENT_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrentAmount(BigDecimal currentAmount) { - this.currentAmount = currentAmount; - } - - - public CustomerOrder currency(String currency) { - this.currency = currency; - return this; - } - - /** - * Currency of a monetary amount. - * @return currency - **/ - @ApiModelProperty(value = "Currency of a monetary amount.") - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCurrency() { - return currency; - } - - - /** - * Currency of a monetary amount. - * - * @param currency - */ - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrency(String currency) { - this.currency = currency; - } - - - public CustomerOrder accessedBy(String accessedBy) { - this.accessedBy = accessedBy; - return this; - } - - /** - * Get accessedBy - * @return accessedBy - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ACCESSED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getAccessedBy() { - return accessedBy; - } - - - /** - * accessedBy - * - * @param accessedBy - */ - @JsonProperty(JSON_PROPERTY_ACCESSED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccessedBy(String accessedBy) { - this.accessedBy = accessedBy; - } - - - public CustomerOrder additionalInformation(String additionalInformation) { - this.additionalInformation = additionalInformation; - return this; - } - - /** - * Unqualified information. - * @return additionalInformation - **/ - @ApiModelProperty(value = "Unqualified information.") - @JsonProperty(JSON_PROPERTY_ADDITIONAL_INFORMATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getAdditionalInformation() { - return additionalInformation; - } - - - /** - * Unqualified information. - * - * @param additionalInformation - */ - @JsonProperty(JSON_PROPERTY_ADDITIONAL_INFORMATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAdditionalInformation(String additionalInformation) { - this.additionalInformation = additionalInformation; - } - - - /** - * Return true if this CustomerOrder object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomerOrder customerOrder = (CustomerOrder) o; - return Objects.equals(this.customerOrderID, customerOrder.customerOrderID) && - Objects.equals(this.saleReferenceID, customerOrder.saleReferenceID) && - Objects.equals(this.openOrderState, customerOrder.openOrderState) && - Objects.equals(this.startDate, customerOrder.startDate) && - Objects.equals(this.endDate, customerOrder.endDate) && - Objects.equals(this.forecastedAmount, customerOrder.forecastedAmount) && - Objects.equals(this.currentAmount, customerOrder.currentAmount) && - Objects.equals(this.currency, customerOrder.currency) && - Objects.equals(this.accessedBy, customerOrder.accessedBy) && - Objects.equals(this.additionalInformation, customerOrder.additionalInformation); - } - - @Override - public int hashCode() { - return Objects.hash(customerOrderID, saleReferenceID, openOrderState, startDate, endDate, forecastedAmount, currentAmount, currency, accessedBy, additionalInformation); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomerOrder {\n"); - sb.append(" customerOrderID: ").append(toIndentedString(customerOrderID)).append("\n"); - sb.append(" saleReferenceID: ").append(toIndentedString(saleReferenceID)).append("\n"); - sb.append(" openOrderState: ").append(toIndentedString(openOrderState)).append("\n"); - sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); - sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); - sb.append(" forecastedAmount: ").append(toIndentedString(forecastedAmount)).append("\n"); - sb.append(" currentAmount: ").append(toIndentedString(currentAmount)).append("\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append(" accessedBy: ").append(toIndentedString(accessedBy)).append("\n"); - sb.append(" additionalInformation: ").append(toIndentedString(additionalInformation)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of CustomerOrder given an JSON string - * - * @param jsonString JSON string - * @return An instance of CustomerOrder - * @throws JsonProcessingException if the JSON string is invalid with respect to CustomerOrder - */ - public static CustomerOrder fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, CustomerOrder.class); - } -/** - * Convert an instance of CustomerOrder to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/Device.java b/src/main/java/com/adyen/model/terminal/Device.java deleted file mode 100644 index da8481d8a..000000000 --- a/src/main/java/com/adyen/model/terminal/Device.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets Device - */ -public enum Device { - - CASHIERDISPLAY("CashierDisplay"), - - CASHIERINPUT("CashierInput"), - - CUSTOMERDISPLAY("CustomerDisplay"), - - CUSTOMERINPUT("CustomerInput"); - - private String value; - - Device(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Device fromValue(String value) { - for (Device b : Device.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/DiagnosisRequest.java b/src/main/java/com/adyen/model/terminal/DiagnosisRequest.java deleted file mode 100644 index 51fc188c7..000000000 --- a/src/main/java/com/adyen/model/terminal/DiagnosisRequest.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the target POI for which the diagnosis is requested. Content of the Diagnosis Request message. - */ -@ApiModel(description = "It conveys Information related to the target POI for which the diagnosis is requested. Content of the Diagnosis Request message.") -@JsonPropertyOrder({ - DiagnosisRequest.JSON_PROPERTY_P_O_I_I_D, - DiagnosisRequest.JSON_PROPERTY_HOST_DIAGNOSIS_FLAG, - DiagnosisRequest.JSON_PROPERTY_ACQUIRER_I_D -}) - -public class DiagnosisRequest { - public static final String JSON_PROPERTY_P_O_I_I_D = "POIID"; - private String POIID; - - public static final String JSON_PROPERTY_HOST_DIAGNOSIS_FLAG = "HostDiagnosisFlag"; - private Boolean hostDiagnosisFlag = false; - - public static final String JSON_PROPERTY_ACQUIRER_I_D = "AcquirerID"; - private List acquirerID = null; - - public DiagnosisRequest() { - } - - public DiagnosisRequest POIID(String POIID) { - this.POIID = POIID; - return this; - } - - /** - * MessageHeader.POIID. - * @return POIID - **/ - @ApiModelProperty(value = "MessageHeader.POIID.") - @JsonProperty(JSON_PROPERTY_P_O_I_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPOIID() { - return POIID; - } - - - /** - * MessageHeader.POIID. - * - * @param POIID - */ - @JsonProperty(JSON_PROPERTY_P_O_I_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPOIID(String POIID) { - this.POIID = POIID; - } - - - public DiagnosisRequest hostDiagnosisFlag(Boolean hostDiagnosisFlag) { - this.hostDiagnosisFlag = hostDiagnosisFlag; - return this; - } - - /** - * Indicates if Host Diagnosis are required. - * @return hostDiagnosisFlag - **/ - @ApiModelProperty(value = "Indicates if Host Diagnosis are required.") - @JsonProperty(JSON_PROPERTY_HOST_DIAGNOSIS_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getHostDiagnosisFlag() { - return hostDiagnosisFlag; - } - - - /** - * Indicates if Host Diagnosis are required. - * - * @param hostDiagnosisFlag - */ - @JsonProperty(JSON_PROPERTY_HOST_DIAGNOSIS_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHostDiagnosisFlag(Boolean hostDiagnosisFlag) { - this.hostDiagnosisFlag = hostDiagnosisFlag; - } - - - public DiagnosisRequest acquirerID(List acquirerID) { - this.acquirerID = acquirerID; - return this; - } - - public DiagnosisRequest addAcquirerIDItem(Integer acquirerIDItem) { - if (this.acquirerID == null) { - this.acquirerID = new ArrayList<>(); - } - this.acquirerID.add(acquirerIDItem); - return this; - } - - /** - * Get acquirerID - * @return acquirerID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ACQUIRER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getAcquirerID() { - return acquirerID; - } - - - /** - * acquirerID - * - * @param acquirerID - */ - @JsonProperty(JSON_PROPERTY_ACQUIRER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAcquirerID(List acquirerID) { - this.acquirerID = acquirerID; - } - - - /** - * Return true if this DiagnosisRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DiagnosisRequest diagnosisRequest = (DiagnosisRequest) o; - return Objects.equals(this.POIID, diagnosisRequest.POIID) && - Objects.equals(this.hostDiagnosisFlag, diagnosisRequest.hostDiagnosisFlag) && - Objects.equals(this.acquirerID, diagnosisRequest.acquirerID); - } - - @Override - public int hashCode() { - return Objects.hash(POIID, hostDiagnosisFlag, acquirerID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DiagnosisRequest {\n"); - sb.append(" POIID: ").append(toIndentedString(POIID)).append("\n"); - sb.append(" hostDiagnosisFlag: ").append(toIndentedString(hostDiagnosisFlag)).append("\n"); - sb.append(" acquirerID: ").append(toIndentedString(acquirerID)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of DiagnosisRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DiagnosisRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to DiagnosisRequest - */ - public static DiagnosisRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, DiagnosisRequest.class); - } -/** - * Convert an instance of DiagnosisRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/DiagnosisResponse.java b/src/main/java/com/adyen/model/terminal/DiagnosisResponse.java deleted file mode 100644 index ee70202d7..000000000 --- a/src/main/java/com/adyen/model/terminal/DiagnosisResponse.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.HostStatus; -import com.adyen.model.terminal.POIStatus; -import com.adyen.model.terminal.Response; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys the result of the requested diagnosis and a possible message to display on a logical device. Content of the Diagnosis Response message. - */ -@ApiModel(description = "It conveys the result of the requested diagnosis and a possible message to display on a logical device. Content of the Diagnosis Response message.") -@JsonPropertyOrder({ - DiagnosisResponse.JSON_PROPERTY_RESPONSE, - DiagnosisResponse.JSON_PROPERTY_LOGGED_SALE_I_D, - DiagnosisResponse.JSON_PROPERTY_PO_I_STATUS, - DiagnosisResponse.JSON_PROPERTY_HOST_STATUS -}) - -public class DiagnosisResponse { - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public static final String JSON_PROPERTY_LOGGED_SALE_I_D = "LoggedSaleID"; - private List loggedSaleID = null; - - public static final String JSON_PROPERTY_PO_I_STATUS = "POIStatus"; - private POIStatus poIStatus; - - public static final String JSON_PROPERTY_HOST_STATUS = "HostStatus"; - private List hostStatus = null; - - public DiagnosisResponse() { - } - - public DiagnosisResponse response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - public DiagnosisResponse loggedSaleID(List loggedSaleID) { - this.loggedSaleID = loggedSaleID; - return this; - } - - public DiagnosisResponse addLoggedSaleIDItem(String loggedSaleIDItem) { - if (this.loggedSaleID == null) { - this.loggedSaleID = new ArrayList<>(); - } - this.loggedSaleID.add(loggedSaleIDItem); - return this; - } - - /** - * Get loggedSaleID - * @return loggedSaleID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOGGED_SALE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getLoggedSaleID() { - return loggedSaleID; - } - - - /** - * loggedSaleID - * - * @param loggedSaleID - */ - @JsonProperty(JSON_PROPERTY_LOGGED_SALE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoggedSaleID(List loggedSaleID) { - this.loggedSaleID = loggedSaleID; - } - - - public DiagnosisResponse poIStatus(POIStatus poIStatus) { - this.poIStatus = poIStatus; - return this; - } - - /** - * Get poIStatus - * @return poIStatus - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PO_I_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public POIStatus getPoIStatus() { - return poIStatus; - } - - - /** - * poIStatus - * - * @param poIStatus - */ - @JsonProperty(JSON_PROPERTY_PO_I_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoIStatus(POIStatus poIStatus) { - this.poIStatus = poIStatus; - } - - - public DiagnosisResponse hostStatus(List hostStatus) { - this.hostStatus = hostStatus; - return this; - } - - public DiagnosisResponse addHostStatusItem(HostStatus hostStatusItem) { - if (this.hostStatus == null) { - this.hostStatus = new ArrayList<>(); - } - this.hostStatus.add(hostStatusItem); - return this; - } - - /** - * Get hostStatus - * @return hostStatus - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_HOST_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getHostStatus() { - return hostStatus; - } - - - /** - * hostStatus - * - * @param hostStatus - */ - @JsonProperty(JSON_PROPERTY_HOST_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHostStatus(List hostStatus) { - this.hostStatus = hostStatus; - } - - - /** - * Return true if this DiagnosisResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DiagnosisResponse diagnosisResponse = (DiagnosisResponse) o; - return Objects.equals(this.response, diagnosisResponse.response) && - Objects.equals(this.loggedSaleID, diagnosisResponse.loggedSaleID) && - Objects.equals(this.poIStatus, diagnosisResponse.poIStatus) && - Objects.equals(this.hostStatus, diagnosisResponse.hostStatus); - } - - @Override - public int hashCode() { - return Objects.hash(response, loggedSaleID, poIStatus, hostStatus); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DiagnosisResponse {\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append(" loggedSaleID: ").append(toIndentedString(loggedSaleID)).append("\n"); - sb.append(" poIStatus: ").append(toIndentedString(poIStatus)).append("\n"); - sb.append(" hostStatus: ").append(toIndentedString(hostStatus)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of DiagnosisResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DiagnosisResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to DiagnosisResponse - */ - public static DiagnosisResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, DiagnosisResponse.class); - } -/** - * Convert an instance of DiagnosisResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/DisplayOutput.java b/src/main/java/com/adyen/model/terminal/DisplayOutput.java deleted file mode 100644 index 9dd255638..000000000 --- a/src/main/java/com/adyen/model/terminal/DisplayOutput.java +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.Device; -import com.adyen.model.terminal.InfoQualify; -import com.adyen.model.terminal.MenuEntry; -import com.adyen.model.terminal.OutputContent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It contains a complete display operation for a Display or an Input Device type. For the Input Devices, Diagnosis and EnableService, ResponseRequiredFlag and MinimumDisplayTime shall be absent. Information to display and the way to process the display. - */ -@ApiModel(description = "It contains a complete display operation for a Display or an Input Device type. For the Input Devices, Diagnosis and EnableService, ResponseRequiredFlag and MinimumDisplayTime shall be absent. Information to display and the way to process the display.") -@JsonPropertyOrder({ - DisplayOutput.JSON_PROPERTY_RESPONSE_REQUIRED_FLAG, - DisplayOutput.JSON_PROPERTY_MINIMUM_DISPLAY_TIME, - DisplayOutput.JSON_PROPERTY_DEVICE, - DisplayOutput.JSON_PROPERTY_INFO_QUALIFY, - DisplayOutput.JSON_PROPERTY_OUTPUT_CONTENT, - DisplayOutput.JSON_PROPERTY_MENU_ENTRY, - DisplayOutput.JSON_PROPERTY_OUTPUT_SIGNATURE -}) - -public class DisplayOutput { - public static final String JSON_PROPERTY_RESPONSE_REQUIRED_FLAG = "ResponseRequiredFlag"; - private Boolean responseRequiredFlag = true; - - public static final String JSON_PROPERTY_MINIMUM_DISPLAY_TIME = "MinimumDisplayTime"; - private Integer minimumDisplayTime = 0; - - public static final String JSON_PROPERTY_DEVICE = "Device"; - private Device device; - - public static final String JSON_PROPERTY_INFO_QUALIFY = "InfoQualify"; - private InfoQualify infoQualify; - - public static final String JSON_PROPERTY_OUTPUT_CONTENT = "OutputContent"; - private OutputContent outputContent; - - public static final String JSON_PROPERTY_MENU_ENTRY = "MenuEntry"; - private List menuEntry = null; - - public static final String JSON_PROPERTY_OUTPUT_SIGNATURE = "OutputSignature"; - private byte[] outputSignature; - - public DisplayOutput() { - } - - public DisplayOutput responseRequiredFlag(Boolean responseRequiredFlag) { - this.responseRequiredFlag = responseRequiredFlag; - return this; - } - - /** - * Request of a message response. - * @return responseRequiredFlag - **/ - @ApiModelProperty(value = "Request of a message response.") - @JsonProperty(JSON_PROPERTY_RESPONSE_REQUIRED_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getResponseRequiredFlag() { - return responseRequiredFlag; - } - - - /** - * Request of a message response. - * - * @param responseRequiredFlag - */ - @JsonProperty(JSON_PROPERTY_RESPONSE_REQUIRED_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponseRequiredFlag(Boolean responseRequiredFlag) { - this.responseRequiredFlag = responseRequiredFlag; - } - - - public DisplayOutput minimumDisplayTime(Integer minimumDisplayTime) { - this.minimumDisplayTime = minimumDisplayTime; - return this; - } - - /** - * Number of seconds the message has to be displayed. - * minimum: 0 - * maximum: 999 - * @return minimumDisplayTime - **/ - @ApiModelProperty(value = "Number of seconds the message has to be displayed.") - @JsonProperty(JSON_PROPERTY_MINIMUM_DISPLAY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getMinimumDisplayTime() { - return minimumDisplayTime; - } - - - /** - * Number of seconds the message has to be displayed. - * - * @param minimumDisplayTime - */ - @JsonProperty(JSON_PROPERTY_MINIMUM_DISPLAY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMinimumDisplayTime(Integer minimumDisplayTime) { - this.minimumDisplayTime = minimumDisplayTime; - } - - - public DisplayOutput device(Device device) { - this.device = device; - return this; - } - - /** - * Get device - * @return device - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_DEVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Device getDevice() { - return device; - } - - - /** - * device - * - * @param device - */ - @JsonProperty(JSON_PROPERTY_DEVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDevice(Device device) { - this.device = device; - } - - - public DisplayOutput infoQualify(InfoQualify infoQualify) { - this.infoQualify = infoQualify; - return this; - } - - /** - * Get infoQualify - * @return infoQualify - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_INFO_QUALIFY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public InfoQualify getInfoQualify() { - return infoQualify; - } - - - /** - * infoQualify - * - * @param infoQualify - */ - @JsonProperty(JSON_PROPERTY_INFO_QUALIFY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInfoQualify(InfoQualify infoQualify) { - this.infoQualify = infoQualify; - } - - - public DisplayOutput outputContent(OutputContent outputContent) { - this.outputContent = outputContent; - return this; - } - - /** - * Get outputContent - * @return outputContent - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_OUTPUT_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OutputContent getOutputContent() { - return outputContent; - } - - - /** - * outputContent - * - * @param outputContent - */ - @JsonProperty(JSON_PROPERTY_OUTPUT_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutputContent(OutputContent outputContent) { - this.outputContent = outputContent; - } - - - public DisplayOutput menuEntry(List menuEntry) { - this.menuEntry = menuEntry; - return this; - } - - public DisplayOutput addMenuEntryItem(MenuEntry menuEntryItem) { - if (this.menuEntry == null) { - this.menuEntry = new ArrayList<>(); - } - this.menuEntry.add(menuEntryItem); - return this; - } - - /** - * Get menuEntry - * @return menuEntry - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MENU_ENTRY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getMenuEntry() { - return menuEntry; - } - - - /** - * menuEntry - * - * @param menuEntry - */ - @JsonProperty(JSON_PROPERTY_MENU_ENTRY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMenuEntry(List menuEntry) { - this.menuEntry = menuEntry; - } - - - public DisplayOutput outputSignature(byte[] outputSignature) { - this.outputSignature = outputSignature; - return this; - } - - /** - * If protection has to be provided to the vendor on the text to display or print. - * @return outputSignature - **/ - @ApiModelProperty(value = "If protection has to be provided to the vendor on the text to display or print.") - @JsonProperty(JSON_PROPERTY_OUTPUT_SIGNATURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getOutputSignature() { - return outputSignature; - } - - - /** - * If protection has to be provided to the vendor on the text to display or print. - * - * @param outputSignature - */ - @JsonProperty(JSON_PROPERTY_OUTPUT_SIGNATURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutputSignature(byte[] outputSignature) { - this.outputSignature = outputSignature; - } - - - /** - * Return true if this DisplayOutput object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DisplayOutput displayOutput = (DisplayOutput) o; - return Objects.equals(this.responseRequiredFlag, displayOutput.responseRequiredFlag) && - Objects.equals(this.minimumDisplayTime, displayOutput.minimumDisplayTime) && - Objects.equals(this.device, displayOutput.device) && - Objects.equals(this.infoQualify, displayOutput.infoQualify) && - Objects.equals(this.outputContent, displayOutput.outputContent) && - Objects.equals(this.menuEntry, displayOutput.menuEntry) && - Arrays.equals(this.outputSignature, displayOutput.outputSignature); - } - - @Override - public int hashCode() { - return Objects.hash(responseRequiredFlag, minimumDisplayTime, device, infoQualify, outputContent, menuEntry, Arrays.hashCode(outputSignature)); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DisplayOutput {\n"); - sb.append(" responseRequiredFlag: ").append(toIndentedString(responseRequiredFlag)).append("\n"); - sb.append(" minimumDisplayTime: ").append(toIndentedString(minimumDisplayTime)).append("\n"); - sb.append(" device: ").append(toIndentedString(device)).append("\n"); - sb.append(" infoQualify: ").append(toIndentedString(infoQualify)).append("\n"); - sb.append(" outputContent: ").append(toIndentedString(outputContent)).append("\n"); - sb.append(" menuEntry: ").append(toIndentedString(menuEntry)).append("\n"); - sb.append(" outputSignature: ").append(toIndentedString(outputSignature)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of DisplayOutput given an JSON string - * - * @param jsonString JSON string - * @return An instance of DisplayOutput - * @throws JsonProcessingException if the JSON string is invalid with respect to DisplayOutput - */ - public static DisplayOutput fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, DisplayOutput.class); - } -/** - * Convert an instance of DisplayOutput to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/DisplayRequest.java b/src/main/java/com/adyen/model/terminal/DisplayRequest.java deleted file mode 100644 index 181d0c4d0..000000000 --- a/src/main/java/com/adyen/model/terminal/DisplayRequest.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.DisplayOutput; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys the data to display and the way to process the display. It contains the complete content to display. It might contain an operation (the DisplayOutput element) per Display Device type. Content of the Display Request message. - */ -@ApiModel(description = "It conveys the data to display and the way to process the display. It contains the complete content to display. It might contain an operation (the DisplayOutput element) per Display Device type. Content of the Display Request message.") -@JsonPropertyOrder({ - DisplayRequest.JSON_PROPERTY_DISPLAY_OUTPUT -}) - -public class DisplayRequest { - public static final String JSON_PROPERTY_DISPLAY_OUTPUT = "DisplayOutput"; - private List displayOutput = new ArrayList<>(); - - public DisplayRequest() { - } - - public DisplayRequest displayOutput(List displayOutput) { - this.displayOutput = displayOutput; - return this; - } - - public DisplayRequest addDisplayOutputItem(DisplayOutput displayOutputItem) { - this.displayOutput.add(displayOutputItem); - return this; - } - - /** - * Get displayOutput - * @return displayOutput - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_DISPLAY_OUTPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getDisplayOutput() { - return displayOutput; - } - - - /** - * displayOutput - * - * @param displayOutput - */ - @JsonProperty(JSON_PROPERTY_DISPLAY_OUTPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDisplayOutput(List displayOutput) { - this.displayOutput = displayOutput; - } - - - /** - * Return true if this DisplayRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DisplayRequest displayRequest = (DisplayRequest) o; - return Objects.equals(this.displayOutput, displayRequest.displayOutput); - } - - @Override - public int hashCode() { - return Objects.hash(displayOutput); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DisplayRequest {\n"); - sb.append(" displayOutput: ").append(toIndentedString(displayOutput)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of DisplayRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DisplayRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to DisplayRequest - */ - public static DisplayRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, DisplayRequest.class); - } -/** - * Convert an instance of DisplayRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/DisplayResponse.java b/src/main/java/com/adyen/model/terminal/DisplayResponse.java deleted file mode 100644 index d4f9b8f68..000000000 --- a/src/main/java/com/adyen/model/terminal/DisplayResponse.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.OutputResult; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys the result of the display, parallel to the message request, except if response not required and absent. Content of the Display Response message. - */ -@ApiModel(description = "It conveys the result of the display, parallel to the message request, except if response not required and absent. Content of the Display Response message.") -@JsonPropertyOrder({ - DisplayResponse.JSON_PROPERTY_OUTPUT_RESULT -}) - -public class DisplayResponse { - public static final String JSON_PROPERTY_OUTPUT_RESULT = "OutputResult"; - private List outputResult = new ArrayList<>(); - - public DisplayResponse() { - } - - public DisplayResponse outputResult(List outputResult) { - this.outputResult = outputResult; - return this; - } - - public DisplayResponse addOutputResultItem(OutputResult outputResultItem) { - this.outputResult.add(outputResultItem); - return this; - } - - /** - * Get outputResult - * @return outputResult - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_OUTPUT_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getOutputResult() { - return outputResult; - } - - - /** - * outputResult - * - * @param outputResult - */ - @JsonProperty(JSON_PROPERTY_OUTPUT_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutputResult(List outputResult) { - this.outputResult = outputResult; - } - - - /** - * Return true if this DisplayResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DisplayResponse displayResponse = (DisplayResponse) o; - return Objects.equals(this.outputResult, displayResponse.outputResult); - } - - @Override - public int hashCode() { - return Objects.hash(outputResult); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DisplayResponse {\n"); - sb.append(" outputResult: ").append(toIndentedString(outputResult)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of DisplayResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DisplayResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to DisplayResponse - */ - public static DisplayResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, DisplayResponse.class); - } -/** - * Convert an instance of DisplayResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/DocumentQualifier.java b/src/main/java/com/adyen/model/terminal/DocumentQualifier.java deleted file mode 100644 index 99f7ea395..000000000 --- a/src/main/java/com/adyen/model/terminal/DocumentQualifier.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets DocumentQualifier - */ -public enum DocumentQualifier { - - CASHIERRECEIPT("CashierReceipt"), - - CUSTOMERRECEIPT("CustomerReceipt"), - - DOCUMENT("Document"), - - JOURNAL("Journal"), - - SALERECEIPT("SaleReceipt"), - - VOUCHER("Voucher"); - - private String value; - - DocumentQualifier(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static DocumentQualifier fromValue(String value) { - for (DocumentQualifier b : DocumentQualifier.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/EnableServiceRequest.java b/src/main/java/com/adyen/model/terminal/EnableServiceRequest.java deleted file mode 100644 index f2fe43d1c..000000000 --- a/src/main/java/com/adyen/model/terminal/EnableServiceRequest.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.DisplayOutput; -import com.adyen.model.terminal.TransactionAction; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys the services that will be enabled for the POI Terminal without the request of the Sale System, and a possible invitation for the Customer to start the services. Content of the Enable Service Request message. - */ -@ApiModel(description = "It conveys the services that will be enabled for the POI Terminal without the request of the Sale System, and a possible invitation for the Customer to start the services. Content of the Enable Service Request message.") -@JsonPropertyOrder({ - EnableServiceRequest.JSON_PROPERTY_TRANSACTION_ACTION, - EnableServiceRequest.JSON_PROPERTY_SERVICES_ENABLED, - EnableServiceRequest.JSON_PROPERTY_DISPLAY_OUTPUT -}) - -public class EnableServiceRequest { - public static final String JSON_PROPERTY_TRANSACTION_ACTION = "TransactionAction"; - private TransactionAction transactionAction; - - /** - * Gets or Sets servicesEnabled - */ - public enum ServicesEnabledEnum { - CARDACQUISITION("CardAcquisition"), - - LOYALTY("Loyalty"), - - PAYMENT("Payment"); - - private String value; - - ServicesEnabledEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ServicesEnabledEnum fromValue(String value) { - for (ServicesEnabledEnum b : ServicesEnabledEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_SERVICES_ENABLED = "ServicesEnabled"; - private List servicesEnabled = null; - - public static final String JSON_PROPERTY_DISPLAY_OUTPUT = "DisplayOutput"; - private DisplayOutput displayOutput; - - public EnableServiceRequest() { - } - - public EnableServiceRequest transactionAction(TransactionAction transactionAction) { - this.transactionAction = transactionAction; - return this; - } - - /** - * Get transactionAction - * @return transactionAction - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_TRANSACTION_ACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransactionAction getTransactionAction() { - return transactionAction; - } - - - /** - * transactionAction - * - * @param transactionAction - */ - @JsonProperty(JSON_PROPERTY_TRANSACTION_ACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransactionAction(TransactionAction transactionAction) { - this.transactionAction = transactionAction; - } - - - public EnableServiceRequest servicesEnabled(List servicesEnabled) { - this.servicesEnabled = servicesEnabled; - return this; - } - - public EnableServiceRequest addServicesEnabledItem(ServicesEnabledEnum servicesEnabledItem) { - if (this.servicesEnabled == null) { - this.servicesEnabled = new ArrayList<>(); - } - this.servicesEnabled.add(servicesEnabledItem); - return this; - } - - /** - * Get servicesEnabled - * @return servicesEnabled - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SERVICES_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getServicesEnabled() { - return servicesEnabled; - } - - - /** - * servicesEnabled - * - * @param servicesEnabled - */ - @JsonProperty(JSON_PROPERTY_SERVICES_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setServicesEnabled(List servicesEnabled) { - this.servicesEnabled = servicesEnabled; - } - - - public EnableServiceRequest displayOutput(DisplayOutput displayOutput) { - this.displayOutput = displayOutput; - return this; - } - - /** - * Get displayOutput - * @return displayOutput - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DISPLAY_OUTPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public DisplayOutput getDisplayOutput() { - return displayOutput; - } - - - /** - * displayOutput - * - * @param displayOutput - */ - @JsonProperty(JSON_PROPERTY_DISPLAY_OUTPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDisplayOutput(DisplayOutput displayOutput) { - this.displayOutput = displayOutput; - } - - - /** - * Return true if this EnableServiceRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnableServiceRequest enableServiceRequest = (EnableServiceRequest) o; - return Objects.equals(this.transactionAction, enableServiceRequest.transactionAction) && - Objects.equals(this.servicesEnabled, enableServiceRequest.servicesEnabled) && - Objects.equals(this.displayOutput, enableServiceRequest.displayOutput); - } - - @Override - public int hashCode() { - return Objects.hash(transactionAction, servicesEnabled, displayOutput); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnableServiceRequest {\n"); - sb.append(" transactionAction: ").append(toIndentedString(transactionAction)).append("\n"); - sb.append(" servicesEnabled: ").append(toIndentedString(servicesEnabled)).append("\n"); - sb.append(" displayOutput: ").append(toIndentedString(displayOutput)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of EnableServiceRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of EnableServiceRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to EnableServiceRequest - */ - public static EnableServiceRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, EnableServiceRequest.class); - } -/** - * Convert an instance of EnableServiceRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/EnableServiceResponse.java b/src/main/java/com/adyen/model/terminal/EnableServiceResponse.java deleted file mode 100644 index 8b52ad7b0..000000000 --- a/src/main/java/com/adyen/model/terminal/EnableServiceResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.Response; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys the result of the Enable Service processing. Content of the Enable Service Response message. - */ -@ApiModel(description = "It conveys the result of the Enable Service processing. Content of the Enable Service Response message.") -@JsonPropertyOrder({ - EnableServiceResponse.JSON_PROPERTY_RESPONSE -}) - -public class EnableServiceResponse { - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public EnableServiceResponse() { - } - - public EnableServiceResponse response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - /** - * Return true if this EnableServiceResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnableServiceResponse enableServiceResponse = (EnableServiceResponse) o; - return Objects.equals(this.response, enableServiceResponse.response); - } - - @Override - public int hashCode() { - return Objects.hash(response); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnableServiceResponse {\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of EnableServiceResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of EnableServiceResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to EnableServiceResponse - */ - public static EnableServiceResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, EnableServiceResponse.class); - } -/** - * Convert an instance of EnableServiceResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/ErrorCondition.java b/src/main/java/com/adyen/model/terminal/ErrorCondition.java deleted file mode 100644 index 128e3fbb7..000000000 --- a/src/main/java/com/adyen/model/terminal/ErrorCondition.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets ErrorCondition - */ -public enum ErrorCondition { - - ABORTED("Aborted"), - - BUSY("Busy"), - - CANCEL("Cancel"), - - DEVICEOUT("DeviceOut"), - - INPROGRESS("InProgress"), - - INSERTEDCARD("InsertedCard"), - - INVALIDCARD("InvalidCard"), - - LOGGEDOUT("LoggedOut"), - - MESSAGEFORMAT("MessageFormat"), - - NOTALLOWED("NotAllowed"), - - NOTFOUND("NotFound"), - - PAYMENTRESTRICTION("PaymentRestriction"), - - REFUSAL("Refusal"), - - UNAVAILABLEDEVICE("UnavailableDevice"), - - UNAVAILABLESERVICE("UnavailableService"), - - UNREACHABLEHOST("UnreachableHost"), - - WRONGPIN("WrongPIN"); - - private String value; - - ErrorCondition(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ErrorCondition fromValue(String value) { - for (ErrorCondition b : ErrorCondition.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/EventNotification.java b/src/main/java/com/adyen/model/terminal/EventNotification.java deleted file mode 100644 index 09ad2f488..000000000 --- a/src/main/java/com/adyen/model/terminal/EventNotification.java +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.DisplayOutput; -import com.adyen.model.terminal.EventToNotify; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the event, and possible action (maintenance, message to display). Content of the EventNotification message. - */ -@ApiModel(description = "It conveys Information related to the event, and possible action (maintenance, message to display). Content of the EventNotification message.") -@JsonPropertyOrder({ - EventNotification.JSON_PROPERTY_TIME_STAMP, - EventNotification.JSON_PROPERTY_EVENT_TO_NOTIFY, - EventNotification.JSON_PROPERTY_EVENT_DETAILS, - EventNotification.JSON_PROPERTY_REJECTED_MESSAGE, - EventNotification.JSON_PROPERTY_MAINTENANCE_REQUIRED_FLAG, - EventNotification.JSON_PROPERTY_CUSTOMER_LANGUAGE, - EventNotification.JSON_PROPERTY_DISPLAY_OUTPUT -}) - -public class EventNotification { - public static final String JSON_PROPERTY_TIME_STAMP = "TimeStamp"; - private OffsetDateTime timeStamp; - - public static final String JSON_PROPERTY_EVENT_TO_NOTIFY = "EventToNotify"; - private EventToNotify eventToNotify; - - public static final String JSON_PROPERTY_EVENT_DETAILS = "EventDetails"; - private String eventDetails; - - public static final String JSON_PROPERTY_REJECTED_MESSAGE = "RejectedMessage"; - private byte[] rejectedMessage; - - public static final String JSON_PROPERTY_MAINTENANCE_REQUIRED_FLAG = "MaintenanceRequiredFlag"; - private Boolean maintenanceRequiredFlag = false; - - public static final String JSON_PROPERTY_CUSTOMER_LANGUAGE = "CustomerLanguage"; - private String customerLanguage; - - public static final String JSON_PROPERTY_DISPLAY_OUTPUT = "DisplayOutput"; - private List displayOutput = null; - - public EventNotification() { - } - - public EventNotification timeStamp(OffsetDateTime timeStamp) { - this.timeStamp = timeStamp; - return this; - } - - /** - * Date and time of a transaction for the Sale System, the POI System or the Acquirer. - * @return timeStamp - **/ - @ApiModelProperty(required = true, value = "Date and time of a transaction for the Sale System, the POI System or the Acquirer.") - @JsonProperty(JSON_PROPERTY_TIME_STAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OffsetDateTime getTimeStamp() { - return timeStamp; - } - - - /** - * Date and time of a transaction for the Sale System, the POI System or the Acquirer. - * - * @param timeStamp - */ - @JsonProperty(JSON_PROPERTY_TIME_STAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTimeStamp(OffsetDateTime timeStamp) { - this.timeStamp = timeStamp; - } - - - public EventNotification eventToNotify(EventToNotify eventToNotify) { - this.eventToNotify = eventToNotify; - return this; - } - - /** - * Get eventToNotify - * @return eventToNotify - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_EVENT_TO_NOTIFY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public EventToNotify getEventToNotify() { - return eventToNotify; - } - - - /** - * eventToNotify - * - * @param eventToNotify - */ - @JsonProperty(JSON_PROPERTY_EVENT_TO_NOTIFY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEventToNotify(EventToNotify eventToNotify) { - this.eventToNotify = eventToNotify; - } - - - public EventNotification eventDetails(String eventDetails) { - this.eventDetails = eventDetails; - return this; - } - - /** - * If present, the Sale logs it for further examination. - * @return eventDetails - **/ - @ApiModelProperty(value = "If present, the Sale logs it for further examination.") - @JsonProperty(JSON_PROPERTY_EVENT_DETAILS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getEventDetails() { - return eventDetails; - } - - - /** - * If present, the Sale logs it for further examination. - * - * @param eventDetails - */ - @JsonProperty(JSON_PROPERTY_EVENT_DETAILS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEventDetails(String eventDetails) { - this.eventDetails = eventDetails; - } - - - public EventNotification rejectedMessage(byte[] rejectedMessage) { - this.rejectedMessage = rejectedMessage; - return this; - } - - /** - * Mandatory if EventToNotify is Reject, absent in other cases. - * @return rejectedMessage - **/ - @ApiModelProperty(value = "Mandatory if EventToNotify is Reject, absent in other cases.") - @JsonProperty(JSON_PROPERTY_REJECTED_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getRejectedMessage() { - return rejectedMessage; - } - - - /** - * Mandatory if EventToNotify is Reject, absent in other cases. - * - * @param rejectedMessage - */ - @JsonProperty(JSON_PROPERTY_REJECTED_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRejectedMessage(byte[] rejectedMessage) { - this.rejectedMessage = rejectedMessage; - } - - - public EventNotification maintenanceRequiredFlag(Boolean maintenanceRequiredFlag) { - this.maintenanceRequiredFlag = maintenanceRequiredFlag; - return this; - } - - /** - * Indicates if the occurred event requires maintenance call or action. - * @return maintenanceRequiredFlag - **/ - @ApiModelProperty(value = "Indicates if the occurred event requires maintenance call or action.") - @JsonProperty(JSON_PROPERTY_MAINTENANCE_REQUIRED_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getMaintenanceRequiredFlag() { - return maintenanceRequiredFlag; - } - - - /** - * Indicates if the occurred event requires maintenance call or action. - * - * @param maintenanceRequiredFlag - */ - @JsonProperty(JSON_PROPERTY_MAINTENANCE_REQUIRED_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMaintenanceRequiredFlag(Boolean maintenanceRequiredFlag) { - this.maintenanceRequiredFlag = maintenanceRequiredFlag; - } - - - public EventNotification customerLanguage(String customerLanguage) { - this.customerLanguage = customerLanguage; - return this; - } - - /** - * If the language is selected by the Sale System before the request to the POI. - * @return customerLanguage - **/ - @ApiModelProperty(value = "If the language is selected by the Sale System before the request to the POI.") - @JsonProperty(JSON_PROPERTY_CUSTOMER_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCustomerLanguage() { - return customerLanguage; - } - - - /** - * If the language is selected by the Sale System before the request to the POI. - * - * @param customerLanguage - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerLanguage(String customerLanguage) { - this.customerLanguage = customerLanguage; - } - - - public EventNotification displayOutput(List displayOutput) { - this.displayOutput = displayOutput; - return this; - } - - public EventNotification addDisplayOutputItem(DisplayOutput displayOutputItem) { - if (this.displayOutput == null) { - this.displayOutput = new ArrayList<>(); - } - this.displayOutput.add(displayOutputItem); - return this; - } - - /** - * Get displayOutput - * @return displayOutput - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DISPLAY_OUTPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getDisplayOutput() { - return displayOutput; - } - - - /** - * displayOutput - * - * @param displayOutput - */ - @JsonProperty(JSON_PROPERTY_DISPLAY_OUTPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDisplayOutput(List displayOutput) { - this.displayOutput = displayOutput; - } - - - /** - * Return true if this EventNotification object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EventNotification eventNotification = (EventNotification) o; - return Objects.equals(this.timeStamp, eventNotification.timeStamp) && - Objects.equals(this.eventToNotify, eventNotification.eventToNotify) && - Objects.equals(this.eventDetails, eventNotification.eventDetails) && - Arrays.equals(this.rejectedMessage, eventNotification.rejectedMessage) && - Objects.equals(this.maintenanceRequiredFlag, eventNotification.maintenanceRequiredFlag) && - Objects.equals(this.customerLanguage, eventNotification.customerLanguage) && - Objects.equals(this.displayOutput, eventNotification.displayOutput); - } - - @Override - public int hashCode() { - return Objects.hash(timeStamp, eventToNotify, eventDetails, Arrays.hashCode(rejectedMessage), maintenanceRequiredFlag, customerLanguage, displayOutput); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EventNotification {\n"); - sb.append(" timeStamp: ").append(toIndentedString(timeStamp)).append("\n"); - sb.append(" eventToNotify: ").append(toIndentedString(eventToNotify)).append("\n"); - sb.append(" eventDetails: ").append(toIndentedString(eventDetails)).append("\n"); - sb.append(" rejectedMessage: ").append(toIndentedString(rejectedMessage)).append("\n"); - sb.append(" maintenanceRequiredFlag: ").append(toIndentedString(maintenanceRequiredFlag)).append("\n"); - sb.append(" customerLanguage: ").append(toIndentedString(customerLanguage)).append("\n"); - sb.append(" displayOutput: ").append(toIndentedString(displayOutput)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of EventNotification given an JSON string - * - * @param jsonString JSON string - * @return An instance of EventNotification - * @throws JsonProcessingException if the JSON string is invalid with respect to EventNotification - */ - public static EventNotification fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, EventNotification.class); - } -/** - * Convert an instance of EventNotification to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/EventToNotify.java b/src/main/java/com/adyen/model/terminal/EventToNotify.java deleted file mode 100644 index a4e3276fd..000000000 --- a/src/main/java/com/adyen/model/terminal/EventToNotify.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import io.swagger.annotations.ApiModel; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Event the POI notifies to the Sale System. - */ -public enum EventToNotify { - - ABORT("Abort"), - - BEGINMAINTENANCE("BeginMaintenance"), - - CARDINSERTED("CardInserted"), - - CARDREMOVED("CardRemoved"), - - COMPLETED("Completed"), - - CUSTOMERLANGUAGE("CustomerLanguage"), - - ENDMAINTENANCE("EndMaintenance"), - - INITIALISED("Initialised"), - - KEYPRESSED("KeyPressed"), - - OUTOFORDER("OutOfOrder"), - - REJECT("Reject"), - - SALEADMIN("SaleAdmin"), - - SALEWAKEUP("SaleWakeUp"), - - SECURITYALARM("SecurityAlarm"), - - SHUTDOWN("Shutdown"), - - STOPASSISTANCE("StopAssistance"); - - private String value; - - EventToNotify(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EventToNotify fromValue(String value) { - for (EventToNotify b : EventToNotify.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/GenericProfile.java b/src/main/java/com/adyen/model/terminal/GenericProfile.java deleted file mode 100644 index 8c3ae7a72..000000000 --- a/src/main/java/com/adyen/model/terminal/GenericProfile.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets GenericProfile - */ -public enum GenericProfile { - - BASIC("Basic"), - - EXTENDED("Extended"), - - STANDARD("Standard"); - - private String value; - - GenericProfile(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static GenericProfile fromValue(String value) { - for (GenericProfile b : GenericProfile.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/GeographicCoordinates.java b/src/main/java/com/adyen/model/terminal/GeographicCoordinates.java deleted file mode 100644 index 5a303cfa8..000000000 --- a/src/main/java/com/adyen/model/terminal/GeographicCoordinates.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * GeographicCoordinates - */ -@JsonPropertyOrder({ - GeographicCoordinates.JSON_PROPERTY_LATITUDE, - GeographicCoordinates.JSON_PROPERTY_LONGITUDE -}) - -public class GeographicCoordinates { - public static final String JSON_PROPERTY_LATITUDE = "Latitude"; - private String latitude; - - public static final String JSON_PROPERTY_LONGITUDE = "Longitude"; - private String longitude; - - public GeographicCoordinates() { - } - - public GeographicCoordinates latitude(String latitude) { - this.latitude = latitude; - return this; - } - - /** - * Get latitude - * @return latitude - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_LATITUDE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getLatitude() { - return latitude; - } - - - /** - * latitude - * - * @param latitude - */ - @JsonProperty(JSON_PROPERTY_LATITUDE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLatitude(String latitude) { - this.latitude = latitude; - } - - - public GeographicCoordinates longitude(String longitude) { - this.longitude = longitude; - return this; - } - - /** - * Get longitude - * @return longitude - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_LONGITUDE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getLongitude() { - return longitude; - } - - - /** - * longitude - * - * @param longitude - */ - @JsonProperty(JSON_PROPERTY_LONGITUDE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLongitude(String longitude) { - this.longitude = longitude; - } - - - /** - * Return true if this GeographicCoordinates object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GeographicCoordinates geographicCoordinates = (GeographicCoordinates) o; - return Objects.equals(this.latitude, geographicCoordinates.latitude) && - Objects.equals(this.longitude, geographicCoordinates.longitude); - } - - @Override - public int hashCode() { - return Objects.hash(latitude, longitude); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GeographicCoordinates {\n"); - sb.append(" latitude: ").append(toIndentedString(latitude)).append("\n"); - sb.append(" longitude: ").append(toIndentedString(longitude)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of GeographicCoordinates given an JSON string - * - * @param jsonString JSON string - * @return An instance of GeographicCoordinates - * @throws JsonProcessingException if the JSON string is invalid with respect to GeographicCoordinates - */ - public static GeographicCoordinates fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, GeographicCoordinates.class); - } -/** - * Convert an instance of GeographicCoordinates to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/Geolocation.java b/src/main/java/com/adyen/model/terminal/Geolocation.java deleted file mode 100644 index 314480d70..000000000 --- a/src/main/java/com/adyen/model/terminal/Geolocation.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.GeographicCoordinates; -import com.adyen.model.terminal.UTMCoordinates; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Geolocation - */ -@JsonPropertyOrder({ - Geolocation.JSON_PROPERTY_GEOGRAPHIC_COORDINATES, - Geolocation.JSON_PROPERTY_UT_M_COORDINATES -}) - -public class Geolocation { - public static final String JSON_PROPERTY_GEOGRAPHIC_COORDINATES = "GeographicCoordinates"; - private GeographicCoordinates geographicCoordinates; - - public static final String JSON_PROPERTY_UT_M_COORDINATES = "UTMCoordinates"; - private UTMCoordinates utMCoordinates; - - public Geolocation() { - } - - public Geolocation geographicCoordinates(GeographicCoordinates geographicCoordinates) { - this.geographicCoordinates = geographicCoordinates; - return this; - } - - /** - * Get geographicCoordinates - * @return geographicCoordinates - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_GEOGRAPHIC_COORDINATES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public GeographicCoordinates getGeographicCoordinates() { - return geographicCoordinates; - } - - - /** - * geographicCoordinates - * - * @param geographicCoordinates - */ - @JsonProperty(JSON_PROPERTY_GEOGRAPHIC_COORDINATES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGeographicCoordinates(GeographicCoordinates geographicCoordinates) { - this.geographicCoordinates = geographicCoordinates; - } - - - public Geolocation utMCoordinates(UTMCoordinates utMCoordinates) { - this.utMCoordinates = utMCoordinates; - return this; - } - - /** - * Get utMCoordinates - * @return utMCoordinates - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_UT_M_COORDINATES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public UTMCoordinates getUtMCoordinates() { - return utMCoordinates; - } - - - /** - * utMCoordinates - * - * @param utMCoordinates - */ - @JsonProperty(JSON_PROPERTY_UT_M_COORDINATES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUtMCoordinates(UTMCoordinates utMCoordinates) { - this.utMCoordinates = utMCoordinates; - } - - - /** - * Return true if this Geolocation object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Geolocation geolocation = (Geolocation) o; - return Objects.equals(this.geographicCoordinates, geolocation.geographicCoordinates) && - Objects.equals(this.utMCoordinates, geolocation.utMCoordinates); - } - - @Override - public int hashCode() { - return Objects.hash(geographicCoordinates, utMCoordinates); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Geolocation {\n"); - sb.append(" geographicCoordinates: ").append(toIndentedString(geographicCoordinates)).append("\n"); - sb.append(" utMCoordinates: ").append(toIndentedString(utMCoordinates)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of Geolocation given an JSON string - * - * @param jsonString JSON string - * @return An instance of Geolocation - * @throws JsonProcessingException if the JSON string is invalid with respect to Geolocation - */ - public static Geolocation fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, Geolocation.class); - } -/** - * Convert an instance of Geolocation to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/GetTotalsRequest.java b/src/main/java/com/adyen/model/terminal/GetTotalsRequest.java deleted file mode 100644 index 609d6cc30..000000000 --- a/src/main/java/com/adyen/model/terminal/GetTotalsRequest.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.TotalFilter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys information from the Sale System related to the scope and the format of the totals to be computed by the POI System. Content of the Get Totals Request message. - */ -@ApiModel(description = "It conveys information from the Sale System related to the scope and the format of the totals to be computed by the POI System. Content of the Get Totals Request message.") -@JsonPropertyOrder({ - GetTotalsRequest.JSON_PROPERTY_TOTAL_DETAILS, - GetTotalsRequest.JSON_PROPERTY_TOTAL_FILTER -}) - -public class GetTotalsRequest { - /** - * Gets or Sets totalDetails - */ - public enum TotalDetailsEnum { - OPERATORID("OperatorID"), - - POIID("POIID"), - - SALEID("SaleID"), - - SHIFTNUMBER("ShiftNumber"), - - TOTALSGROUPID("TotalsGroupID"); - - private String value; - - TotalDetailsEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TotalDetailsEnum fromValue(String value) { - for (TotalDetailsEnum b : TotalDetailsEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_TOTAL_DETAILS = "TotalDetails"; - private List totalDetails = null; - - public static final String JSON_PROPERTY_TOTAL_FILTER = "TotalFilter"; - private TotalFilter totalFilter; - - public GetTotalsRequest() { - } - - public GetTotalsRequest totalDetails(List totalDetails) { - this.totalDetails = totalDetails; - return this; - } - - public GetTotalsRequest addTotalDetailsItem(TotalDetailsEnum totalDetailsItem) { - if (this.totalDetails == null) { - this.totalDetails = new ArrayList<>(); - } - this.totalDetails.add(totalDetailsItem); - return this; - } - - /** - * Get totalDetails - * @return totalDetails - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TOTAL_DETAILS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getTotalDetails() { - return totalDetails; - } - - - /** - * totalDetails - * - * @param totalDetails - */ - @JsonProperty(JSON_PROPERTY_TOTAL_DETAILS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotalDetails(List totalDetails) { - this.totalDetails = totalDetails; - } - - - public GetTotalsRequest totalFilter(TotalFilter totalFilter) { - this.totalFilter = totalFilter; - return this; - } - - /** - * Get totalFilter - * @return totalFilter - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TOTAL_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TotalFilter getTotalFilter() { - return totalFilter; - } - - - /** - * totalFilter - * - * @param totalFilter - */ - @JsonProperty(JSON_PROPERTY_TOTAL_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotalFilter(TotalFilter totalFilter) { - this.totalFilter = totalFilter; - } - - - /** - * Return true if this GetTotalsRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTotalsRequest getTotalsRequest = (GetTotalsRequest) o; - return Objects.equals(this.totalDetails, getTotalsRequest.totalDetails) && - Objects.equals(this.totalFilter, getTotalsRequest.totalFilter); - } - - @Override - public int hashCode() { - return Objects.hash(totalDetails, totalFilter); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetTotalsRequest {\n"); - sb.append(" totalDetails: ").append(toIndentedString(totalDetails)).append("\n"); - sb.append(" totalFilter: ").append(toIndentedString(totalFilter)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of GetTotalsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetTotalsRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to GetTotalsRequest - */ - public static GetTotalsRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, GetTotalsRequest.class); - } -/** - * Convert an instance of GetTotalsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/GetTotalsResponse.java b/src/main/java/com/adyen/model/terminal/GetTotalsResponse.java deleted file mode 100644 index 1b53cc00d..000000000 --- a/src/main/java/com/adyen/model/terminal/GetTotalsResponse.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.Response; -import com.adyen.model.terminal.TransactionTotals; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the Reconciliation transaction processed by the POI System. Content of the Reconciliation Response message. - */ -@ApiModel(description = "It conveys Information related to the Reconciliation transaction processed by the POI System. Content of the Reconciliation Response message.") -@JsonPropertyOrder({ - GetTotalsResponse.JSON_PROPERTY_RESPONSE, - GetTotalsResponse.JSON_PROPERTY_PO_I_RECONCILIATION_I_D, - GetTotalsResponse.JSON_PROPERTY_TRANSACTION_TOTALS -}) - -public class GetTotalsResponse { - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public static final String JSON_PROPERTY_PO_I_RECONCILIATION_I_D = "POIReconciliationID"; - private Integer poIReconciliationID; - - public static final String JSON_PROPERTY_TRANSACTION_TOTALS = "TransactionTotals"; - private List transactionTotals = null; - - public GetTotalsResponse() { - } - - public GetTotalsResponse response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - public GetTotalsResponse poIReconciliationID(Integer poIReconciliationID) { - this.poIReconciliationID = poIReconciliationID; - return this; - } - - /** - * Identification of the reconciliation period between Sale and POI. - * @return poIReconciliationID - **/ - @ApiModelProperty(required = true, value = "Identification of the reconciliation period between Sale and POI.") - @JsonProperty(JSON_PROPERTY_PO_I_RECONCILIATION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getPoIReconciliationID() { - return poIReconciliationID; - } - - - /** - * Identification of the reconciliation period between Sale and POI. - * - * @param poIReconciliationID - */ - @JsonProperty(JSON_PROPERTY_PO_I_RECONCILIATION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoIReconciliationID(Integer poIReconciliationID) { - this.poIReconciliationID = poIReconciliationID; - } - - - public GetTotalsResponse transactionTotals(List transactionTotals) { - this.transactionTotals = transactionTotals; - return this; - } - - public GetTotalsResponse addTransactionTotalsItem(TransactionTotals transactionTotalsItem) { - if (this.transactionTotals == null) { - this.transactionTotals = new ArrayList<>(); - } - this.transactionTotals.add(transactionTotalsItem); - return this; - } - - /** - * Get transactionTotals - * @return transactionTotals - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TRANSACTION_TOTALS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getTransactionTotals() { - return transactionTotals; - } - - - /** - * transactionTotals - * - * @param transactionTotals - */ - @JsonProperty(JSON_PROPERTY_TRANSACTION_TOTALS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransactionTotals(List transactionTotals) { - this.transactionTotals = transactionTotals; - } - - - /** - * Return true if this GetTotalsResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTotalsResponse getTotalsResponse = (GetTotalsResponse) o; - return Objects.equals(this.response, getTotalsResponse.response) && - Objects.equals(this.poIReconciliationID, getTotalsResponse.poIReconciliationID) && - Objects.equals(this.transactionTotals, getTotalsResponse.transactionTotals); - } - - @Override - public int hashCode() { - return Objects.hash(response, poIReconciliationID, transactionTotals); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetTotalsResponse {\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append(" poIReconciliationID: ").append(toIndentedString(poIReconciliationID)).append("\n"); - sb.append(" transactionTotals: ").append(toIndentedString(transactionTotals)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of GetTotalsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetTotalsResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to GetTotalsResponse - */ - public static GetTotalsResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, GetTotalsResponse.class); - } -/** - * Convert an instance of GetTotalsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/GlobalStatus.java b/src/main/java/com/adyen/model/terminal/GlobalStatus.java deleted file mode 100644 index 27d0b61db..000000000 --- a/src/main/java/com/adyen/model/terminal/GlobalStatus.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets GlobalStatus - */ -public enum GlobalStatus { - - BUSY("Busy"), - - MAINTENANCE("Maintenance"), - - OK("OK"), - - UNREACHABLE("Unreachable"); - - private String value; - - GlobalStatus(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static GlobalStatus fromValue(String value) { - for (GlobalStatus b : GlobalStatus.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/HostStatus.java b/src/main/java/com/adyen/model/terminal/HostStatus.java deleted file mode 100644 index 81549a2bc..000000000 --- a/src/main/java/com/adyen/model/terminal/HostStatus.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Indicate the reachability of the host by the POI Terminal. State of a Host. - */ -@ApiModel(description = "Indicate the reachability of the host by the POI Terminal. State of a Host.") -@JsonPropertyOrder({ - HostStatus.JSON_PROPERTY_ACQUIRER_I_D, - HostStatus.JSON_PROPERTY_IS_REACHABLE_FLAG -}) - -public class HostStatus { - public static final String JSON_PROPERTY_ACQUIRER_I_D = "AcquirerID"; - private Integer acquirerID; - - public static final String JSON_PROPERTY_IS_REACHABLE_FLAG = "IsReachableFlag"; - private Boolean isReachableFlag = true; - - public HostStatus() { - } - - public HostStatus acquirerID(Integer acquirerID) { - this.acquirerID = acquirerID; - return this; - } - - /** - * Identification of the Acquirer. - * @return acquirerID - **/ - @ApiModelProperty(required = true, value = "Identification of the Acquirer.") - @JsonProperty(JSON_PROPERTY_ACQUIRER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getAcquirerID() { - return acquirerID; - } - - - /** - * Identification of the Acquirer. - * - * @param acquirerID - */ - @JsonProperty(JSON_PROPERTY_ACQUIRER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAcquirerID(Integer acquirerID) { - this.acquirerID = acquirerID; - } - - - public HostStatus isReachableFlag(Boolean isReachableFlag) { - this.isReachableFlag = isReachableFlag; - return this; - } - - /** - * Indicate if a Host is reachable. - * @return isReachableFlag - **/ - @ApiModelProperty(value = "Indicate if a Host is reachable.") - @JsonProperty(JSON_PROPERTY_IS_REACHABLE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getIsReachableFlag() { - return isReachableFlag; - } - - - /** - * Indicate if a Host is reachable. - * - * @param isReachableFlag - */ - @JsonProperty(JSON_PROPERTY_IS_REACHABLE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsReachableFlag(Boolean isReachableFlag) { - this.isReachableFlag = isReachableFlag; - } - - - /** - * Return true if this HostStatus object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HostStatus hostStatus = (HostStatus) o; - return Objects.equals(this.acquirerID, hostStatus.acquirerID) && - Objects.equals(this.isReachableFlag, hostStatus.isReachableFlag); - } - - @Override - public int hashCode() { - return Objects.hash(acquirerID, isReachableFlag); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HostStatus {\n"); - sb.append(" acquirerID: ").append(toIndentedString(acquirerID)).append("\n"); - sb.append(" isReachableFlag: ").append(toIndentedString(isReachableFlag)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of HostStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of HostStatus - * @throws JsonProcessingException if the JSON string is invalid with respect to HostStatus - */ - public static HostStatus fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, HostStatus.class); - } -/** - * Convert an instance of HostStatus to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/ICCResetData.java b/src/main/java/com/adyen/model/terminal/ICCResetData.java deleted file mode 100644 index 144c2413b..000000000 --- a/src/main/java/com/adyen/model/terminal/ICCResetData.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * ICCResetData - */ -@JsonPropertyOrder({ - ICCResetData.JSON_PROPERTY_AT_R_VALUE, - ICCResetData.JSON_PROPERTY_CARD_STATUS_WORDS -}) - -public class ICCResetData { - public static final String JSON_PROPERTY_AT_R_VALUE = "ATRValue"; - private byte[] atRValue; - - public static final String JSON_PROPERTY_CARD_STATUS_WORDS = "CardStatusWords"; - private byte[] cardStatusWords; - - public ICCResetData() { - } - - public ICCResetData atRValue(byte[] atRValue) { - this.atRValue = atRValue; - return this; - } - - /** - * Get atRValue - * @return atRValue - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_AT_R_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getAtRValue() { - return atRValue; - } - - - /** - * atRValue - * - * @param atRValue - */ - @JsonProperty(JSON_PROPERTY_AT_R_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAtRValue(byte[] atRValue) { - this.atRValue = atRValue; - } - - - public ICCResetData cardStatusWords(byte[] cardStatusWords) { - this.cardStatusWords = cardStatusWords; - return this; - } - - /** - * Get cardStatusWords - * @return cardStatusWords - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CARD_STATUS_WORDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getCardStatusWords() { - return cardStatusWords; - } - - - /** - * cardStatusWords - * - * @param cardStatusWords - */ - @JsonProperty(JSON_PROPERTY_CARD_STATUS_WORDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCardStatusWords(byte[] cardStatusWords) { - this.cardStatusWords = cardStatusWords; - } - - - /** - * Return true if this ICCResetData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ICCResetData icCResetData = (ICCResetData) o; - return Arrays.equals(this.atRValue, icCResetData.atRValue) && - Arrays.equals(this.cardStatusWords, icCResetData.cardStatusWords); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(atRValue), Arrays.hashCode(cardStatusWords)); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ICCResetData {\n"); - sb.append(" atRValue: ").append(toIndentedString(atRValue)).append("\n"); - sb.append(" cardStatusWords: ").append(toIndentedString(cardStatusWords)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of ICCResetData given an JSON string - * - * @param jsonString JSON string - * @return An instance of ICCResetData - * @throws JsonProcessingException if the JSON string is invalid with respect to ICCResetData - */ - public static ICCResetData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, ICCResetData.class); - } -/** - * Convert an instance of ICCResetData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/IdentificationSupport.java b/src/main/java/com/adyen/model/terminal/IdentificationSupport.java deleted file mode 100644 index a5927ee4d..000000000 --- a/src/main/java/com/adyen/model/terminal/IdentificationSupport.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets IdentificationSupport - */ -public enum IdentificationSupport { - - HYBRIDCARD("HybridCard"), - - LINKEDCARD("LinkedCard"), - - LOYALTYCARD("LoyaltyCard"), - - NOCARD("NoCard"); - - private String value; - - IdentificationSupport(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static IdentificationSupport fromValue(String value) { - for (IdentificationSupport b : IdentificationSupport.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/IdentificationType.java b/src/main/java/com/adyen/model/terminal/IdentificationType.java deleted file mode 100644 index 66eb91626..000000000 --- a/src/main/java/com/adyen/model/terminal/IdentificationType.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets IdentificationType - */ -public enum IdentificationType { - - ACCOUNTNUMBER("AccountNumber"), - - BARCODE("BarCode"), - - ISOTRACK2("ISOTrack2"), - - PAN("PAN"), - - PHONENUMBER("PhoneNumber"); - - private String value; - - IdentificationType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static IdentificationType fromValue(String value) { - for (IdentificationType b : IdentificationType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/InfoQualify.java b/src/main/java/com/adyen/model/terminal/InfoQualify.java deleted file mode 100644 index d5e5f8a13..000000000 --- a/src/main/java/com/adyen/model/terminal/InfoQualify.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets InfoQualify - */ -public enum InfoQualify { - - CUSTOMERASSISTANCE("CustomerAssistance"), - - DISPLAY("Display"), - - DOCUMENT("Document"), - - ERROR("Error"), - - INPUT("Input"), - - POIREPLICATION("POIReplication"), - - RECEIPT("Receipt"), - - SOUND("Sound"), - - STATUS("Status"), - - VOUCHER("Voucher"); - - private String value; - - InfoQualify(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static InfoQualify fromValue(String value) { - for (InfoQualify b : InfoQualify.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/Input.java b/src/main/java/com/adyen/model/terminal/Input.java deleted file mode 100644 index 7d9e79c86..000000000 --- a/src/main/java/com/adyen/model/terminal/Input.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.InputCommand; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Input - */ -@JsonPropertyOrder({ - Input.JSON_PROPERTY_INPUT_COMMAND, - Input.JSON_PROPERTY_CONFIRMED_FLAG, - Input.JSON_PROPERTY_FUNCTION_KEY, - Input.JSON_PROPERTY_TEXT_INPUT, - Input.JSON_PROPERTY_DIGIT_INPUT, - Input.JSON_PROPERTY_PASSWORD, - Input.JSON_PROPERTY_MENU_ENTRY_NUMBER -}) - -public class Input { - public static final String JSON_PROPERTY_INPUT_COMMAND = "InputCommand"; - private InputCommand inputCommand; - - public static final String JSON_PROPERTY_CONFIRMED_FLAG = "ConfirmedFlag"; - private Boolean confirmedFlag; - - public static final String JSON_PROPERTY_FUNCTION_KEY = "FunctionKey"; - private Integer functionKey; - - public static final String JSON_PROPERTY_TEXT_INPUT = "TextInput"; - private String textInput; - - public static final String JSON_PROPERTY_DIGIT_INPUT = "DigitInput"; - private Integer digitInput; - - public static final String JSON_PROPERTY_PASSWORD = "Password"; - private String password; - - public static final String JSON_PROPERTY_MENU_ENTRY_NUMBER = "MenuEntryNumber"; - private List menuEntryNumber = null; - - public Input() { - } - - public Input inputCommand(InputCommand inputCommand) { - this.inputCommand = inputCommand; - return this; - } - - /** - * Get inputCommand - * @return inputCommand - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_INPUT_COMMAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public InputCommand getInputCommand() { - return inputCommand; - } - - - /** - * inputCommand - * - * @param inputCommand - */ - @JsonProperty(JSON_PROPERTY_INPUT_COMMAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInputCommand(InputCommand inputCommand) { - this.inputCommand = inputCommand; - } - - - public Input confirmedFlag(Boolean confirmedFlag) { - this.confirmedFlag = confirmedFlag; - return this; - } - - /** - * Get confirmedFlag - * @return confirmedFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CONFIRMED_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getConfirmedFlag() { - return confirmedFlag; - } - - - /** - * confirmedFlag - * - * @param confirmedFlag - */ - @JsonProperty(JSON_PROPERTY_CONFIRMED_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setConfirmedFlag(Boolean confirmedFlag) { - this.confirmedFlag = confirmedFlag; - } - - - public Input functionKey(Integer functionKey) { - this.functionKey = functionKey; - return this; - } - - /** - * Get functionKey - * @return functionKey - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FUNCTION_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getFunctionKey() { - return functionKey; - } - - - /** - * functionKey - * - * @param functionKey - */ - @JsonProperty(JSON_PROPERTY_FUNCTION_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFunctionKey(Integer functionKey) { - this.functionKey = functionKey; - } - - - public Input textInput(String textInput) { - this.textInput = textInput; - return this; - } - - /** - * Get textInput - * @return textInput - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TEXT_INPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getTextInput() { - return textInput; - } - - - /** - * textInput - * - * @param textInput - */ - @JsonProperty(JSON_PROPERTY_TEXT_INPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextInput(String textInput) { - this.textInput = textInput; - } - - - public Input digitInput(Integer digitInput) { - this.digitInput = digitInput; - return this; - } - - /** - * Get digitInput - * @return digitInput - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DIGIT_INPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getDigitInput() { - return digitInput; - } - - - /** - * digitInput - * - * @param digitInput - */ - @JsonProperty(JSON_PROPERTY_DIGIT_INPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDigitInput(Integer digitInput) { - this.digitInput = digitInput; - } - - - public Input password(String password) { - this.password = password; - return this; - } - - /** - * Get password - * @return password - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PASSWORD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPassword() { - return password; - } - - - /** - * password - * - * @param password - */ - @JsonProperty(JSON_PROPERTY_PASSWORD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPassword(String password) { - this.password = password; - } - - - public Input menuEntryNumber(List menuEntryNumber) { - this.menuEntryNumber = menuEntryNumber; - return this; - } - - public Input addMenuEntryNumberItem(Integer menuEntryNumberItem) { - if (this.menuEntryNumber == null) { - this.menuEntryNumber = new ArrayList<>(); - } - this.menuEntryNumber.add(menuEntryNumberItem); - return this; - } - - /** - * Get menuEntryNumber - * @return menuEntryNumber - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MENU_ENTRY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getMenuEntryNumber() { - return menuEntryNumber; - } - - - /** - * menuEntryNumber - * - * @param menuEntryNumber - */ - @JsonProperty(JSON_PROPERTY_MENU_ENTRY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMenuEntryNumber(List menuEntryNumber) { - this.menuEntryNumber = menuEntryNumber; - } - - - /** - * Return true if this Input object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Input input = (Input) o; - return Objects.equals(this.inputCommand, input.inputCommand) && - Objects.equals(this.confirmedFlag, input.confirmedFlag) && - Objects.equals(this.functionKey, input.functionKey) && - Objects.equals(this.textInput, input.textInput) && - Objects.equals(this.digitInput, input.digitInput) && - Objects.equals(this.password, input.password) && - Objects.equals(this.menuEntryNumber, input.menuEntryNumber); - } - - @Override - public int hashCode() { - return Objects.hash(inputCommand, confirmedFlag, functionKey, textInput, digitInput, password, menuEntryNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Input {\n"); - sb.append(" inputCommand: ").append(toIndentedString(inputCommand)).append("\n"); - sb.append(" confirmedFlag: ").append(toIndentedString(confirmedFlag)).append("\n"); - sb.append(" functionKey: ").append(toIndentedString(functionKey)).append("\n"); - sb.append(" textInput: ").append(toIndentedString(textInput)).append("\n"); - sb.append(" digitInput: ").append(toIndentedString(digitInput)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" menuEntryNumber: ").append(toIndentedString(menuEntryNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of Input given an JSON string - * - * @param jsonString JSON string - * @return An instance of Input - * @throws JsonProcessingException if the JSON string is invalid with respect to Input - */ - public static Input fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, Input.class); - } -/** - * Convert an instance of Input to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/InputCommand.java b/src/main/java/com/adyen/model/terminal/InputCommand.java deleted file mode 100644 index 03044af07..000000000 --- a/src/main/java/com/adyen/model/terminal/InputCommand.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets InputCommand - */ -public enum InputCommand { - - DECIMALSTRING("DecimalString"), - - DIGITSTRING("DigitString"), - - GETANYKEY("GetAnyKey"), - - GETCONFIRMATION("GetConfirmation"), - - GETFUNCTIONKEY("GetFunctionKey"), - - GETMENUENTRY("GetMenuEntry"), - - PASSWORD("Password"), - - SITEMANAGER("SiteManager"), - - TEXTSTRING("TextString"); - - private String value; - - InputCommand(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static InputCommand fromValue(String value) { - for (InputCommand b : InputCommand.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/InputData.java b/src/main/java/com/adyen/model/terminal/InputData.java deleted file mode 100644 index 07bf5d462..000000000 --- a/src/main/java/com/adyen/model/terminal/InputData.java +++ /dev/null @@ -1,856 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.Device; -import com.adyen.model.terminal.InfoQualify; -import com.adyen.model.terminal.InputCommand; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * InputData - */ -@JsonPropertyOrder({ - InputData.JSON_PROPERTY_DEVICE, - InputData.JSON_PROPERTY_INFO_QUALIFY, - InputData.JSON_PROPERTY_INPUT_COMMAND, - InputData.JSON_PROPERTY_NOTIFY_CARD_INPUT_FLAG, - InputData.JSON_PROPERTY_MAX_INPUT_TIME, - InputData.JSON_PROPERTY_IMMEDIATE_RESPONSE_FLAG, - InputData.JSON_PROPERTY_MIN_LENGTH, - InputData.JSON_PROPERTY_MAX_LENGTH, - InputData.JSON_PROPERTY_MAX_DECIMAL_LENGTH, - InputData.JSON_PROPERTY_WAIT_USER_VALIDATION_FLAG, - InputData.JSON_PROPERTY_DEFAULT_INPUT_STRING, - InputData.JSON_PROPERTY_DEFAULT_LAYOUT_STRING, - InputData.JSON_PROPERTY_STRING_MASK, - InputData.JSON_PROPERTY_FROM_RIGHT_TO_LEFT_FLAG, - InputData.JSON_PROPERTY_MASK_CHARACTERS_FLAG, - InputData.JSON_PROPERTY_BEEP_KEY_FLAG, - InputData.JSON_PROPERTY_GLOBAL_CORRECTION_FLAG, - InputData.JSON_PROPERTY_DISABLE_CANCEL_FLAG, - InputData.JSON_PROPERTY_DISABLE_CORRECT_FLAG, - InputData.JSON_PROPERTY_DISABLE_VALID_FLAG, - InputData.JSON_PROPERTY_MENU_BACK_FLAG -}) - -public class InputData { - public static final String JSON_PROPERTY_DEVICE = "Device"; - private Device device; - - public static final String JSON_PROPERTY_INFO_QUALIFY = "InfoQualify"; - private InfoQualify infoQualify; - - public static final String JSON_PROPERTY_INPUT_COMMAND = "InputCommand"; - private InputCommand inputCommand; - - public static final String JSON_PROPERTY_NOTIFY_CARD_INPUT_FLAG = "NotifyCardInputFlag"; - private Boolean notifyCardInputFlag = false; - - public static final String JSON_PROPERTY_MAX_INPUT_TIME = "MaxInputTime"; - private Integer maxInputTime; - - public static final String JSON_PROPERTY_IMMEDIATE_RESPONSE_FLAG = "ImmediateResponseFlag"; - private Boolean immediateResponseFlag = false; - - public static final String JSON_PROPERTY_MIN_LENGTH = "MinLength"; - private Integer minLength; - - public static final String JSON_PROPERTY_MAX_LENGTH = "MaxLength"; - private Integer maxLength; - - public static final String JSON_PROPERTY_MAX_DECIMAL_LENGTH = "MaxDecimalLength"; - private Integer maxDecimalLength; - - public static final String JSON_PROPERTY_WAIT_USER_VALIDATION_FLAG = "WaitUserValidationFlag"; - private Boolean waitUserValidationFlag = true; - - public static final String JSON_PROPERTY_DEFAULT_INPUT_STRING = "DefaultInputString"; - private String defaultInputString; - - public static final String JSON_PROPERTY_DEFAULT_LAYOUT_STRING = "DefaultLayoutString"; - private String defaultLayoutString; - - public static final String JSON_PROPERTY_STRING_MASK = "StringMask"; - private String stringMask; - - public static final String JSON_PROPERTY_FROM_RIGHT_TO_LEFT_FLAG = "FromRightToLeftFlag"; - private Boolean fromRightToLeftFlag = false; - - public static final String JSON_PROPERTY_MASK_CHARACTERS_FLAG = "MaskCharactersFlag"; - private Boolean maskCharactersFlag = false; - - public static final String JSON_PROPERTY_BEEP_KEY_FLAG = "BeepKeyFlag"; - private Boolean beepKeyFlag = false; - - public static final String JSON_PROPERTY_GLOBAL_CORRECTION_FLAG = "GlobalCorrectionFlag"; - private Boolean globalCorrectionFlag = false; - - public static final String JSON_PROPERTY_DISABLE_CANCEL_FLAG = "DisableCancelFlag"; - private Boolean disableCancelFlag = false; - - public static final String JSON_PROPERTY_DISABLE_CORRECT_FLAG = "DisableCorrectFlag"; - private Boolean disableCorrectFlag = false; - - public static final String JSON_PROPERTY_DISABLE_VALID_FLAG = "DisableValidFlag"; - private Boolean disableValidFlag = false; - - public static final String JSON_PROPERTY_MENU_BACK_FLAG = "MenuBackFlag"; - private Boolean menuBackFlag = false; - - public InputData() { - } - - public InputData device(Device device) { - this.device = device; - return this; - } - - /** - * Get device - * @return device - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_DEVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Device getDevice() { - return device; - } - - - /** - * device - * - * @param device - */ - @JsonProperty(JSON_PROPERTY_DEVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDevice(Device device) { - this.device = device; - } - - - public InputData infoQualify(InfoQualify infoQualify) { - this.infoQualify = infoQualify; - return this; - } - - /** - * Get infoQualify - * @return infoQualify - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_INFO_QUALIFY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public InfoQualify getInfoQualify() { - return infoQualify; - } - - - /** - * infoQualify - * - * @param infoQualify - */ - @JsonProperty(JSON_PROPERTY_INFO_QUALIFY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInfoQualify(InfoQualify infoQualify) { - this.infoQualify = infoQualify; - } - - - public InputData inputCommand(InputCommand inputCommand) { - this.inputCommand = inputCommand; - return this; - } - - /** - * Get inputCommand - * @return inputCommand - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_INPUT_COMMAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public InputCommand getInputCommand() { - return inputCommand; - } - - - /** - * inputCommand - * - * @param inputCommand - */ - @JsonProperty(JSON_PROPERTY_INPUT_COMMAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInputCommand(InputCommand inputCommand) { - this.inputCommand = inputCommand; - } - - - public InputData notifyCardInputFlag(Boolean notifyCardInputFlag) { - this.notifyCardInputFlag = notifyCardInputFlag; - return this; - } - - /** - * Get notifyCardInputFlag - * @return notifyCardInputFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NOTIFY_CARD_INPUT_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getNotifyCardInputFlag() { - return notifyCardInputFlag; - } - - - /** - * notifyCardInputFlag - * - * @param notifyCardInputFlag - */ - @JsonProperty(JSON_PROPERTY_NOTIFY_CARD_INPUT_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNotifyCardInputFlag(Boolean notifyCardInputFlag) { - this.notifyCardInputFlag = notifyCardInputFlag; - } - - - public InputData maxInputTime(Integer maxInputTime) { - this.maxInputTime = maxInputTime; - return this; - } - - /** - * Get maxInputTime - * @return maxInputTime - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAX_INPUT_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getMaxInputTime() { - return maxInputTime; - } - - - /** - * maxInputTime - * - * @param maxInputTime - */ - @JsonProperty(JSON_PROPERTY_MAX_INPUT_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMaxInputTime(Integer maxInputTime) { - this.maxInputTime = maxInputTime; - } - - - public InputData immediateResponseFlag(Boolean immediateResponseFlag) { - this.immediateResponseFlag = immediateResponseFlag; - return this; - } - - /** - * Get immediateResponseFlag - * @return immediateResponseFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_IMMEDIATE_RESPONSE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getImmediateResponseFlag() { - return immediateResponseFlag; - } - - - /** - * immediateResponseFlag - * - * @param immediateResponseFlag - */ - @JsonProperty(JSON_PROPERTY_IMMEDIATE_RESPONSE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setImmediateResponseFlag(Boolean immediateResponseFlag) { - this.immediateResponseFlag = immediateResponseFlag; - } - - - public InputData minLength(Integer minLength) { - this.minLength = minLength; - return this; - } - - /** - * Get minLength - * @return minLength - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MIN_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getMinLength() { - return minLength; - } - - - /** - * minLength - * - * @param minLength - */ - @JsonProperty(JSON_PROPERTY_MIN_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMinLength(Integer minLength) { - this.minLength = minLength; - } - - - public InputData maxLength(Integer maxLength) { - this.maxLength = maxLength; - return this; - } - - /** - * Get maxLength - * @return maxLength - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAX_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getMaxLength() { - return maxLength; - } - - - /** - * maxLength - * - * @param maxLength - */ - @JsonProperty(JSON_PROPERTY_MAX_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMaxLength(Integer maxLength) { - this.maxLength = maxLength; - } - - - public InputData maxDecimalLength(Integer maxDecimalLength) { - this.maxDecimalLength = maxDecimalLength; - return this; - } - - /** - * Get maxDecimalLength - * @return maxDecimalLength - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAX_DECIMAL_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getMaxDecimalLength() { - return maxDecimalLength; - } - - - /** - * maxDecimalLength - * - * @param maxDecimalLength - */ - @JsonProperty(JSON_PROPERTY_MAX_DECIMAL_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMaxDecimalLength(Integer maxDecimalLength) { - this.maxDecimalLength = maxDecimalLength; - } - - - public InputData waitUserValidationFlag(Boolean waitUserValidationFlag) { - this.waitUserValidationFlag = waitUserValidationFlag; - return this; - } - - /** - * Get waitUserValidationFlag - * @return waitUserValidationFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_WAIT_USER_VALIDATION_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getWaitUserValidationFlag() { - return waitUserValidationFlag; - } - - - /** - * waitUserValidationFlag - * - * @param waitUserValidationFlag - */ - @JsonProperty(JSON_PROPERTY_WAIT_USER_VALIDATION_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWaitUserValidationFlag(Boolean waitUserValidationFlag) { - this.waitUserValidationFlag = waitUserValidationFlag; - } - - - public InputData defaultInputString(String defaultInputString) { - this.defaultInputString = defaultInputString; - return this; - } - - /** - * Get defaultInputString - * @return defaultInputString - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DEFAULT_INPUT_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getDefaultInputString() { - return defaultInputString; - } - - - /** - * defaultInputString - * - * @param defaultInputString - */ - @JsonProperty(JSON_PROPERTY_DEFAULT_INPUT_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDefaultInputString(String defaultInputString) { - this.defaultInputString = defaultInputString; - } - - - public InputData defaultLayoutString(String defaultLayoutString) { - this.defaultLayoutString = defaultLayoutString; - return this; - } - - /** - * Get defaultLayoutString - * @return defaultLayoutString - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DEFAULT_LAYOUT_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getDefaultLayoutString() { - return defaultLayoutString; - } - - - /** - * defaultLayoutString - * - * @param defaultLayoutString - */ - @JsonProperty(JSON_PROPERTY_DEFAULT_LAYOUT_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDefaultLayoutString(String defaultLayoutString) { - this.defaultLayoutString = defaultLayoutString; - } - - - public InputData stringMask(String stringMask) { - this.stringMask = stringMask; - return this; - } - - /** - * Get stringMask - * @return stringMask - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_STRING_MASK) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getStringMask() { - return stringMask; - } - - - /** - * stringMask - * - * @param stringMask - */ - @JsonProperty(JSON_PROPERTY_STRING_MASK) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStringMask(String stringMask) { - this.stringMask = stringMask; - } - - - public InputData fromRightToLeftFlag(Boolean fromRightToLeftFlag) { - this.fromRightToLeftFlag = fromRightToLeftFlag; - return this; - } - - /** - * Get fromRightToLeftFlag - * @return fromRightToLeftFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FROM_RIGHT_TO_LEFT_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getFromRightToLeftFlag() { - return fromRightToLeftFlag; - } - - - /** - * fromRightToLeftFlag - * - * @param fromRightToLeftFlag - */ - @JsonProperty(JSON_PROPERTY_FROM_RIGHT_TO_LEFT_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFromRightToLeftFlag(Boolean fromRightToLeftFlag) { - this.fromRightToLeftFlag = fromRightToLeftFlag; - } - - - public InputData maskCharactersFlag(Boolean maskCharactersFlag) { - this.maskCharactersFlag = maskCharactersFlag; - return this; - } - - /** - * Get maskCharactersFlag - * @return maskCharactersFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MASK_CHARACTERS_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getMaskCharactersFlag() { - return maskCharactersFlag; - } - - - /** - * maskCharactersFlag - * - * @param maskCharactersFlag - */ - @JsonProperty(JSON_PROPERTY_MASK_CHARACTERS_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMaskCharactersFlag(Boolean maskCharactersFlag) { - this.maskCharactersFlag = maskCharactersFlag; - } - - - public InputData beepKeyFlag(Boolean beepKeyFlag) { - this.beepKeyFlag = beepKeyFlag; - return this; - } - - /** - * Get beepKeyFlag - * @return beepKeyFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BEEP_KEY_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getBeepKeyFlag() { - return beepKeyFlag; - } - - - /** - * beepKeyFlag - * - * @param beepKeyFlag - */ - @JsonProperty(JSON_PROPERTY_BEEP_KEY_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBeepKeyFlag(Boolean beepKeyFlag) { - this.beepKeyFlag = beepKeyFlag; - } - - - public InputData globalCorrectionFlag(Boolean globalCorrectionFlag) { - this.globalCorrectionFlag = globalCorrectionFlag; - return this; - } - - /** - * Get globalCorrectionFlag - * @return globalCorrectionFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_GLOBAL_CORRECTION_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getGlobalCorrectionFlag() { - return globalCorrectionFlag; - } - - - /** - * globalCorrectionFlag - * - * @param globalCorrectionFlag - */ - @JsonProperty(JSON_PROPERTY_GLOBAL_CORRECTION_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGlobalCorrectionFlag(Boolean globalCorrectionFlag) { - this.globalCorrectionFlag = globalCorrectionFlag; - } - - - public InputData disableCancelFlag(Boolean disableCancelFlag) { - this.disableCancelFlag = disableCancelFlag; - return this; - } - - /** - * Get disableCancelFlag - * @return disableCancelFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DISABLE_CANCEL_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDisableCancelFlag() { - return disableCancelFlag; - } - - - /** - * disableCancelFlag - * - * @param disableCancelFlag - */ - @JsonProperty(JSON_PROPERTY_DISABLE_CANCEL_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDisableCancelFlag(Boolean disableCancelFlag) { - this.disableCancelFlag = disableCancelFlag; - } - - - public InputData disableCorrectFlag(Boolean disableCorrectFlag) { - this.disableCorrectFlag = disableCorrectFlag; - return this; - } - - /** - * Get disableCorrectFlag - * @return disableCorrectFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DISABLE_CORRECT_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDisableCorrectFlag() { - return disableCorrectFlag; - } - - - /** - * disableCorrectFlag - * - * @param disableCorrectFlag - */ - @JsonProperty(JSON_PROPERTY_DISABLE_CORRECT_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDisableCorrectFlag(Boolean disableCorrectFlag) { - this.disableCorrectFlag = disableCorrectFlag; - } - - - public InputData disableValidFlag(Boolean disableValidFlag) { - this.disableValidFlag = disableValidFlag; - return this; - } - - /** - * Get disableValidFlag - * @return disableValidFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DISABLE_VALID_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDisableValidFlag() { - return disableValidFlag; - } - - - /** - * disableValidFlag - * - * @param disableValidFlag - */ - @JsonProperty(JSON_PROPERTY_DISABLE_VALID_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDisableValidFlag(Boolean disableValidFlag) { - this.disableValidFlag = disableValidFlag; - } - - - public InputData menuBackFlag(Boolean menuBackFlag) { - this.menuBackFlag = menuBackFlag; - return this; - } - - /** - * Get menuBackFlag - * @return menuBackFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MENU_BACK_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getMenuBackFlag() { - return menuBackFlag; - } - - - /** - * menuBackFlag - * - * @param menuBackFlag - */ - @JsonProperty(JSON_PROPERTY_MENU_BACK_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMenuBackFlag(Boolean menuBackFlag) { - this.menuBackFlag = menuBackFlag; - } - - - /** - * Return true if this InputData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InputData inputData = (InputData) o; - return Objects.equals(this.device, inputData.device) && - Objects.equals(this.infoQualify, inputData.infoQualify) && - Objects.equals(this.inputCommand, inputData.inputCommand) && - Objects.equals(this.notifyCardInputFlag, inputData.notifyCardInputFlag) && - Objects.equals(this.maxInputTime, inputData.maxInputTime) && - Objects.equals(this.immediateResponseFlag, inputData.immediateResponseFlag) && - Objects.equals(this.minLength, inputData.minLength) && - Objects.equals(this.maxLength, inputData.maxLength) && - Objects.equals(this.maxDecimalLength, inputData.maxDecimalLength) && - Objects.equals(this.waitUserValidationFlag, inputData.waitUserValidationFlag) && - Objects.equals(this.defaultInputString, inputData.defaultInputString) && - Objects.equals(this.defaultLayoutString, inputData.defaultLayoutString) && - Objects.equals(this.stringMask, inputData.stringMask) && - Objects.equals(this.fromRightToLeftFlag, inputData.fromRightToLeftFlag) && - Objects.equals(this.maskCharactersFlag, inputData.maskCharactersFlag) && - Objects.equals(this.beepKeyFlag, inputData.beepKeyFlag) && - Objects.equals(this.globalCorrectionFlag, inputData.globalCorrectionFlag) && - Objects.equals(this.disableCancelFlag, inputData.disableCancelFlag) && - Objects.equals(this.disableCorrectFlag, inputData.disableCorrectFlag) && - Objects.equals(this.disableValidFlag, inputData.disableValidFlag) && - Objects.equals(this.menuBackFlag, inputData.menuBackFlag); - } - - @Override - public int hashCode() { - return Objects.hash(device, infoQualify, inputCommand, notifyCardInputFlag, maxInputTime, immediateResponseFlag, minLength, maxLength, maxDecimalLength, waitUserValidationFlag, defaultInputString, defaultLayoutString, stringMask, fromRightToLeftFlag, maskCharactersFlag, beepKeyFlag, globalCorrectionFlag, disableCancelFlag, disableCorrectFlag, disableValidFlag, menuBackFlag); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InputData {\n"); - sb.append(" device: ").append(toIndentedString(device)).append("\n"); - sb.append(" infoQualify: ").append(toIndentedString(infoQualify)).append("\n"); - sb.append(" inputCommand: ").append(toIndentedString(inputCommand)).append("\n"); - sb.append(" notifyCardInputFlag: ").append(toIndentedString(notifyCardInputFlag)).append("\n"); - sb.append(" maxInputTime: ").append(toIndentedString(maxInputTime)).append("\n"); - sb.append(" immediateResponseFlag: ").append(toIndentedString(immediateResponseFlag)).append("\n"); - sb.append(" minLength: ").append(toIndentedString(minLength)).append("\n"); - sb.append(" maxLength: ").append(toIndentedString(maxLength)).append("\n"); - sb.append(" maxDecimalLength: ").append(toIndentedString(maxDecimalLength)).append("\n"); - sb.append(" waitUserValidationFlag: ").append(toIndentedString(waitUserValidationFlag)).append("\n"); - sb.append(" defaultInputString: ").append(toIndentedString(defaultInputString)).append("\n"); - sb.append(" defaultLayoutString: ").append(toIndentedString(defaultLayoutString)).append("\n"); - sb.append(" stringMask: ").append(toIndentedString(stringMask)).append("\n"); - sb.append(" fromRightToLeftFlag: ").append(toIndentedString(fromRightToLeftFlag)).append("\n"); - sb.append(" maskCharactersFlag: ").append(toIndentedString(maskCharactersFlag)).append("\n"); - sb.append(" beepKeyFlag: ").append(toIndentedString(beepKeyFlag)).append("\n"); - sb.append(" globalCorrectionFlag: ").append(toIndentedString(globalCorrectionFlag)).append("\n"); - sb.append(" disableCancelFlag: ").append(toIndentedString(disableCancelFlag)).append("\n"); - sb.append(" disableCorrectFlag: ").append(toIndentedString(disableCorrectFlag)).append("\n"); - sb.append(" disableValidFlag: ").append(toIndentedString(disableValidFlag)).append("\n"); - sb.append(" menuBackFlag: ").append(toIndentedString(menuBackFlag)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of InputData given an JSON string - * - * @param jsonString JSON string - * @return An instance of InputData - * @throws JsonProcessingException if the JSON string is invalid with respect to InputData - */ - public static InputData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, InputData.class); - } -/** - * Convert an instance of InputData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/InputRequest.java b/src/main/java/com/adyen/model/terminal/InputRequest.java deleted file mode 100644 index 4f24a6c14..000000000 --- a/src/main/java/com/adyen/model/terminal/InputRequest.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.DisplayOutput; -import com.adyen.model.terminal.InputData; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys data to display and the way to process the display, and contains the complete content to display. In addition to the display on the Input Device, it might contain an operation (the DisplayOutput element) per Display Device type. Content of the Input Request message. - */ -@ApiModel(description = "It conveys data to display and the way to process the display, and contains the complete content to display. In addition to the display on the Input Device, it might contain an operation (the DisplayOutput element) per Display Device type. Content of the Input Request message.") -@JsonPropertyOrder({ - InputRequest.JSON_PROPERTY_DISPLAY_OUTPUT, - InputRequest.JSON_PROPERTY_INPUT_DATA -}) - -public class InputRequest { - public static final String JSON_PROPERTY_DISPLAY_OUTPUT = "DisplayOutput"; - private DisplayOutput displayOutput; - - public static final String JSON_PROPERTY_INPUT_DATA = "InputData"; - private InputData inputData; - - public InputRequest() { - } - - public InputRequest displayOutput(DisplayOutput displayOutput) { - this.displayOutput = displayOutput; - return this; - } - - /** - * Get displayOutput - * @return displayOutput - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DISPLAY_OUTPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public DisplayOutput getDisplayOutput() { - return displayOutput; - } - - - /** - * displayOutput - * - * @param displayOutput - */ - @JsonProperty(JSON_PROPERTY_DISPLAY_OUTPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDisplayOutput(DisplayOutput displayOutput) { - this.displayOutput = displayOutput; - } - - - public InputRequest inputData(InputData inputData) { - this.inputData = inputData; - return this; - } - - /** - * Get inputData - * @return inputData - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_INPUT_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public InputData getInputData() { - return inputData; - } - - - /** - * inputData - * - * @param inputData - */ - @JsonProperty(JSON_PROPERTY_INPUT_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInputData(InputData inputData) { - this.inputData = inputData; - } - - - /** - * Return true if this InputRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InputRequest inputRequest = (InputRequest) o; - return Objects.equals(this.displayOutput, inputRequest.displayOutput) && - Objects.equals(this.inputData, inputRequest.inputData); - } - - @Override - public int hashCode() { - return Objects.hash(displayOutput, inputData); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InputRequest {\n"); - sb.append(" displayOutput: ").append(toIndentedString(displayOutput)).append("\n"); - sb.append(" inputData: ").append(toIndentedString(inputData)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of InputRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of InputRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to InputRequest - */ - public static InputRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, InputRequest.class); - } -/** - * Convert an instance of InputRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/InputResponse.java b/src/main/java/com/adyen/model/terminal/InputResponse.java deleted file mode 100644 index 16e157a62..000000000 --- a/src/main/java/com/adyen/model/terminal/InputResponse.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.InputResult; -import com.adyen.model.terminal.OutputResult; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys the result of the input or the result of the outputs, parallel to the message request, except if response not required and absent. Content of the Input Response message. - */ -@ApiModel(description = "It conveys the result of the input or the result of the outputs, parallel to the message request, except if response not required and absent. Content of the Input Response message.") -@JsonPropertyOrder({ - InputResponse.JSON_PROPERTY_OUTPUT_RESULT, - InputResponse.JSON_PROPERTY_INPUT_RESULT -}) - -public class InputResponse { - public static final String JSON_PROPERTY_OUTPUT_RESULT = "OutputResult"; - private OutputResult outputResult; - - public static final String JSON_PROPERTY_INPUT_RESULT = "InputResult"; - private InputResult inputResult; - - public InputResponse() { - } - - public InputResponse outputResult(OutputResult outputResult) { - this.outputResult = outputResult; - return this; - } - - /** - * Get outputResult - * @return outputResult - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_OUTPUT_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OutputResult getOutputResult() { - return outputResult; - } - - - /** - * outputResult - * - * @param outputResult - */ - @JsonProperty(JSON_PROPERTY_OUTPUT_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutputResult(OutputResult outputResult) { - this.outputResult = outputResult; - } - - - public InputResponse inputResult(InputResult inputResult) { - this.inputResult = inputResult; - return this; - } - - /** - * Get inputResult - * @return inputResult - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_INPUT_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public InputResult getInputResult() { - return inputResult; - } - - - /** - * inputResult - * - * @param inputResult - */ - @JsonProperty(JSON_PROPERTY_INPUT_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInputResult(InputResult inputResult) { - this.inputResult = inputResult; - } - - - /** - * Return true if this InputResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InputResponse inputResponse = (InputResponse) o; - return Objects.equals(this.outputResult, inputResponse.outputResult) && - Objects.equals(this.inputResult, inputResponse.inputResult); - } - - @Override - public int hashCode() { - return Objects.hash(outputResult, inputResult); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InputResponse {\n"); - sb.append(" outputResult: ").append(toIndentedString(outputResult)).append("\n"); - sb.append(" inputResult: ").append(toIndentedString(inputResult)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of InputResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of InputResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to InputResponse - */ - public static InputResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, InputResponse.class); - } -/** - * Convert an instance of InputResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/InputResult.java b/src/main/java/com/adyen/model/terminal/InputResult.java deleted file mode 100644 index 4bee11bd5..000000000 --- a/src/main/java/com/adyen/model/terminal/InputResult.java +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.Device; -import com.adyen.model.terminal.InfoQualify; -import com.adyen.model.terminal.Input; -import com.adyen.model.terminal.Response; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * InputResult - */ -@JsonPropertyOrder({ - InputResult.JSON_PROPERTY_DEVICE, - InputResult.JSON_PROPERTY_INFO_QUALIFY, - InputResult.JSON_PROPERTY_RESPONSE, - InputResult.JSON_PROPERTY_INPUT -}) - -public class InputResult { - public static final String JSON_PROPERTY_DEVICE = "Device"; - private Device device; - - public static final String JSON_PROPERTY_INFO_QUALIFY = "InfoQualify"; - private InfoQualify infoQualify; - - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public static final String JSON_PROPERTY_INPUT = "Input"; - private Input input; - - public InputResult() { - } - - public InputResult device(Device device) { - this.device = device; - return this; - } - - /** - * Get device - * @return device - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_DEVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Device getDevice() { - return device; - } - - - /** - * device - * - * @param device - */ - @JsonProperty(JSON_PROPERTY_DEVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDevice(Device device) { - this.device = device; - } - - - public InputResult infoQualify(InfoQualify infoQualify) { - this.infoQualify = infoQualify; - return this; - } - - /** - * Get infoQualify - * @return infoQualify - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_INFO_QUALIFY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public InfoQualify getInfoQualify() { - return infoQualify; - } - - - /** - * infoQualify - * - * @param infoQualify - */ - @JsonProperty(JSON_PROPERTY_INFO_QUALIFY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInfoQualify(InfoQualify infoQualify) { - this.infoQualify = infoQualify; - } - - - public InputResult response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - public InputResult input(Input input) { - this.input = input; - return this; - } - - /** - * Get input - * @return input - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_INPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Input getInput() { - return input; - } - - - /** - * input - * - * @param input - */ - @JsonProperty(JSON_PROPERTY_INPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInput(Input input) { - this.input = input; - } - - - /** - * Return true if this InputResult object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InputResult inputResult = (InputResult) o; - return Objects.equals(this.device, inputResult.device) && - Objects.equals(this.infoQualify, inputResult.infoQualify) && - Objects.equals(this.response, inputResult.response) && - Objects.equals(this.input, inputResult.input); - } - - @Override - public int hashCode() { - return Objects.hash(device, infoQualify, response, input); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InputResult {\n"); - sb.append(" device: ").append(toIndentedString(device)).append("\n"); - sb.append(" infoQualify: ").append(toIndentedString(infoQualify)).append("\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append(" input: ").append(toIndentedString(input)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of InputResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of InputResult - * @throws JsonProcessingException if the JSON string is invalid with respect to InputResult - */ - public static InputResult fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, InputResult.class); - } -/** - * Convert an instance of InputResult to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/InputUpdate.java b/src/main/java/com/adyen/model/terminal/InputUpdate.java deleted file mode 100644 index 0943650cf..000000000 --- a/src/main/java/com/adyen/model/terminal/InputUpdate.java +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.MenuEntry; -import com.adyen.model.terminal.MessageReference; -import com.adyen.model.terminal.OutputContent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Definition: Content of the Input Update message. : It conveys update of the display of an Input request in progress. - */ -@ApiModel(description = "Definition: Content of the Input Update message. : It conveys update of the display of an Input request in progress.") -@JsonPropertyOrder({ - InputUpdate.JSON_PROPERTY_MESSAGE_REFERENCE, - InputUpdate.JSON_PROPERTY_OUTPUT_CONTENT, - InputUpdate.JSON_PROPERTY_MENU_ENTRY, - InputUpdate.JSON_PROPERTY_OUTPUT_SIGNATURE, - InputUpdate.JSON_PROPERTY_MIN_LENGTH, - InputUpdate.JSON_PROPERTY_MAX_LENGTH, - InputUpdate.JSON_PROPERTY_MAX_DECIMAL_LENGTH -}) - -public class InputUpdate { - public static final String JSON_PROPERTY_MESSAGE_REFERENCE = "MessageReference"; - private MessageReference messageReference; - - public static final String JSON_PROPERTY_OUTPUT_CONTENT = "OutputContent"; - private OutputContent outputContent; - - public static final String JSON_PROPERTY_MENU_ENTRY = "MenuEntry"; - private List menuEntry = null; - - public static final String JSON_PROPERTY_OUTPUT_SIGNATURE = "OutputSignature"; - private byte[] outputSignature; - - public static final String JSON_PROPERTY_MIN_LENGTH = "MinLength"; - private Integer minLength; - - public static final String JSON_PROPERTY_MAX_LENGTH = "MaxLength"; - private Integer maxLength; - - public static final String JSON_PROPERTY_MAX_DECIMAL_LENGTH = "MaxDecimalLength"; - private Integer maxDecimalLength; - - public InputUpdate() { - } - - public InputUpdate messageReference(MessageReference messageReference) { - this.messageReference = messageReference; - return this; - } - - /** - * Get messageReference - * @return messageReference - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_MESSAGE_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public MessageReference getMessageReference() { - return messageReference; - } - - - /** - * messageReference - * - * @param messageReference - */ - @JsonProperty(JSON_PROPERTY_MESSAGE_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessageReference(MessageReference messageReference) { - this.messageReference = messageReference; - } - - - public InputUpdate outputContent(OutputContent outputContent) { - this.outputContent = outputContent; - return this; - } - - /** - * Get outputContent - * @return outputContent - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_OUTPUT_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OutputContent getOutputContent() { - return outputContent; - } - - - /** - * outputContent - * - * @param outputContent - */ - @JsonProperty(JSON_PROPERTY_OUTPUT_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutputContent(OutputContent outputContent) { - this.outputContent = outputContent; - } - - - public InputUpdate menuEntry(List menuEntry) { - this.menuEntry = menuEntry; - return this; - } - - public InputUpdate addMenuEntryItem(MenuEntry menuEntryItem) { - if (this.menuEntry == null) { - this.menuEntry = new ArrayList<>(); - } - this.menuEntry.add(menuEntryItem); - return this; - } - - /** - * Get menuEntry - * @return menuEntry - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MENU_ENTRY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getMenuEntry() { - return menuEntry; - } - - - /** - * menuEntry - * - * @param menuEntry - */ - @JsonProperty(JSON_PROPERTY_MENU_ENTRY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMenuEntry(List menuEntry) { - this.menuEntry = menuEntry; - } - - - public InputUpdate outputSignature(byte[] outputSignature) { - this.outputSignature = outputSignature; - return this; - } - - /** - * Get outputSignature - * @return outputSignature - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_OUTPUT_SIGNATURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getOutputSignature() { - return outputSignature; - } - - - /** - * outputSignature - * - * @param outputSignature - */ - @JsonProperty(JSON_PROPERTY_OUTPUT_SIGNATURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutputSignature(byte[] outputSignature) { - this.outputSignature = outputSignature; - } - - - public InputUpdate minLength(Integer minLength) { - this.minLength = minLength; - return this; - } - - /** - * Get minLength - * @return minLength - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MIN_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getMinLength() { - return minLength; - } - - - /** - * minLength - * - * @param minLength - */ - @JsonProperty(JSON_PROPERTY_MIN_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMinLength(Integer minLength) { - this.minLength = minLength; - } - - - public InputUpdate maxLength(Integer maxLength) { - this.maxLength = maxLength; - return this; - } - - /** - * Get maxLength - * @return maxLength - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAX_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getMaxLength() { - return maxLength; - } - - - /** - * maxLength - * - * @param maxLength - */ - @JsonProperty(JSON_PROPERTY_MAX_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMaxLength(Integer maxLength) { - this.maxLength = maxLength; - } - - - public InputUpdate maxDecimalLength(Integer maxDecimalLength) { - this.maxDecimalLength = maxDecimalLength; - return this; - } - - /** - * Get maxDecimalLength - * @return maxDecimalLength - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAX_DECIMAL_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getMaxDecimalLength() { - return maxDecimalLength; - } - - - /** - * maxDecimalLength - * - * @param maxDecimalLength - */ - @JsonProperty(JSON_PROPERTY_MAX_DECIMAL_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMaxDecimalLength(Integer maxDecimalLength) { - this.maxDecimalLength = maxDecimalLength; - } - - - /** - * Return true if this InputUpdate object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InputUpdate inputUpdate = (InputUpdate) o; - return Objects.equals(this.messageReference, inputUpdate.messageReference) && - Objects.equals(this.outputContent, inputUpdate.outputContent) && - Objects.equals(this.menuEntry, inputUpdate.menuEntry) && - Arrays.equals(this.outputSignature, inputUpdate.outputSignature) && - Objects.equals(this.minLength, inputUpdate.minLength) && - Objects.equals(this.maxLength, inputUpdate.maxLength) && - Objects.equals(this.maxDecimalLength, inputUpdate.maxDecimalLength); - } - - @Override - public int hashCode() { - return Objects.hash(messageReference, outputContent, menuEntry, Arrays.hashCode(outputSignature), minLength, maxLength, maxDecimalLength); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InputUpdate {\n"); - sb.append(" messageReference: ").append(toIndentedString(messageReference)).append("\n"); - sb.append(" outputContent: ").append(toIndentedString(outputContent)).append("\n"); - sb.append(" menuEntry: ").append(toIndentedString(menuEntry)).append("\n"); - sb.append(" outputSignature: ").append(toIndentedString(outputSignature)).append("\n"); - sb.append(" minLength: ").append(toIndentedString(minLength)).append("\n"); - sb.append(" maxLength: ").append(toIndentedString(maxLength)).append("\n"); - sb.append(" maxDecimalLength: ").append(toIndentedString(maxDecimalLength)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of InputUpdate given an JSON string - * - * @param jsonString JSON string - * @return An instance of InputUpdate - * @throws JsonProcessingException if the JSON string is invalid with respect to InputUpdate - */ - public static InputUpdate fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, InputUpdate.class); - } -/** - * Convert an instance of InputUpdate to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/Instalment.java b/src/main/java/com/adyen/model/terminal/Instalment.java deleted file mode 100644 index 93f75f78b..000000000 --- a/src/main/java/com/adyen/model/terminal/Instalment.java +++ /dev/null @@ -1,467 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.InstalmentType; -import com.adyen.model.terminal.PeriodUnit; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.time.LocalDate; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Instalment - */ -@JsonPropertyOrder({ - Instalment.JSON_PROPERTY_INSTALMENT_TYPE, - Instalment.JSON_PROPERTY_SEQUENCE_NUMBER, - Instalment.JSON_PROPERTY_PLAN_I_D, - Instalment.JSON_PROPERTY_PERIOD, - Instalment.JSON_PROPERTY_PERIOD_UNIT, - Instalment.JSON_PROPERTY_FIRST_PAYMENT_DATE, - Instalment.JSON_PROPERTY_TOTAL_NB_OF_PAYMENTS, - Instalment.JSON_PROPERTY_CUMULATIVE_AMOUNT, - Instalment.JSON_PROPERTY_FIRST_AMOUNT, - Instalment.JSON_PROPERTY_CHARGES -}) - -public class Instalment { - public static final String JSON_PROPERTY_INSTALMENT_TYPE = "InstalmentType"; - private InstalmentType instalmentType; - - public static final String JSON_PROPERTY_SEQUENCE_NUMBER = "SequenceNumber"; - private Integer sequenceNumber; - - public static final String JSON_PROPERTY_PLAN_I_D = "PlanID"; - private String planID; - - public static final String JSON_PROPERTY_PERIOD = "Period"; - private Integer period; - - public static final String JSON_PROPERTY_PERIOD_UNIT = "PeriodUnit"; - private PeriodUnit periodUnit; - - public static final String JSON_PROPERTY_FIRST_PAYMENT_DATE = "FirstPaymentDate"; - private LocalDate firstPaymentDate; - - public static final String JSON_PROPERTY_TOTAL_NB_OF_PAYMENTS = "TotalNbOfPayments"; - private Integer totalNbOfPayments; - - public static final String JSON_PROPERTY_CUMULATIVE_AMOUNT = "CumulativeAmount"; - private BigDecimal cumulativeAmount; - - public static final String JSON_PROPERTY_FIRST_AMOUNT = "FirstAmount"; - private BigDecimal firstAmount; - - public static final String JSON_PROPERTY_CHARGES = "Charges"; - private BigDecimal charges; - - public Instalment() { - } - - public Instalment instalmentType(InstalmentType instalmentType) { - this.instalmentType = instalmentType; - return this; - } - - /** - * Get instalmentType - * @return instalmentType - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_INSTALMENT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public InstalmentType getInstalmentType() { - return instalmentType; - } - - - /** - * instalmentType - * - * @param instalmentType - */ - @JsonProperty(JSON_PROPERTY_INSTALMENT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstalmentType(InstalmentType instalmentType) { - this.instalmentType = instalmentType; - } - - - public Instalment sequenceNumber(Integer sequenceNumber) { - this.sequenceNumber = sequenceNumber; - return this; - } - - /** - * Get sequenceNumber - * @return sequenceNumber - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SEQUENCE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getSequenceNumber() { - return sequenceNumber; - } - - - /** - * sequenceNumber - * - * @param sequenceNumber - */ - @JsonProperty(JSON_PROPERTY_SEQUENCE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSequenceNumber(Integer sequenceNumber) { - this.sequenceNumber = sequenceNumber; - } - - - public Instalment planID(String planID) { - this.planID = planID; - return this; - } - - /** - * Get planID - * @return planID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PLAN_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPlanID() { - return planID; - } - - - /** - * planID - * - * @param planID - */ - @JsonProperty(JSON_PROPERTY_PLAN_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPlanID(String planID) { - this.planID = planID; - } - - - public Instalment period(Integer period) { - this.period = period; - return this; - } - - /** - * Get period - * @return period - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PERIOD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getPeriod() { - return period; - } - - - /** - * period - * - * @param period - */ - @JsonProperty(JSON_PROPERTY_PERIOD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPeriod(Integer period) { - this.period = period; - } - - - public Instalment periodUnit(PeriodUnit periodUnit) { - this.periodUnit = periodUnit; - return this; - } - - /** - * Get periodUnit - * @return periodUnit - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PERIOD_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PeriodUnit getPeriodUnit() { - return periodUnit; - } - - - /** - * periodUnit - * - * @param periodUnit - */ - @JsonProperty(JSON_PROPERTY_PERIOD_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPeriodUnit(PeriodUnit periodUnit) { - this.periodUnit = periodUnit; - } - - - public Instalment firstPaymentDate(LocalDate firstPaymentDate) { - this.firstPaymentDate = firstPaymentDate; - return this; - } - - /** - * Get firstPaymentDate - * @return firstPaymentDate - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FIRST_PAYMENT_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LocalDate getFirstPaymentDate() { - return firstPaymentDate; - } - - - /** - * firstPaymentDate - * - * @param firstPaymentDate - */ - @JsonProperty(JSON_PROPERTY_FIRST_PAYMENT_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFirstPaymentDate(LocalDate firstPaymentDate) { - this.firstPaymentDate = firstPaymentDate; - } - - - public Instalment totalNbOfPayments(Integer totalNbOfPayments) { - this.totalNbOfPayments = totalNbOfPayments; - return this; - } - - /** - * Get totalNbOfPayments - * @return totalNbOfPayments - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TOTAL_NB_OF_PAYMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getTotalNbOfPayments() { - return totalNbOfPayments; - } - - - /** - * totalNbOfPayments - * - * @param totalNbOfPayments - */ - @JsonProperty(JSON_PROPERTY_TOTAL_NB_OF_PAYMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotalNbOfPayments(Integer totalNbOfPayments) { - this.totalNbOfPayments = totalNbOfPayments; - } - - - public Instalment cumulativeAmount(BigDecimal cumulativeAmount) { - this.cumulativeAmount = cumulativeAmount; - return this; - } - - /** - * Get cumulativeAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return cumulativeAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CUMULATIVE_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getCumulativeAmount() { - return cumulativeAmount; - } - - - /** - * cumulativeAmount - * - * @param cumulativeAmount - */ - @JsonProperty(JSON_PROPERTY_CUMULATIVE_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCumulativeAmount(BigDecimal cumulativeAmount) { - this.cumulativeAmount = cumulativeAmount; - } - - - public Instalment firstAmount(BigDecimal firstAmount) { - this.firstAmount = firstAmount; - return this; - } - - /** - * Get firstAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return firstAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FIRST_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getFirstAmount() { - return firstAmount; - } - - - /** - * firstAmount - * - * @param firstAmount - */ - @JsonProperty(JSON_PROPERTY_FIRST_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFirstAmount(BigDecimal firstAmount) { - this.firstAmount = firstAmount; - } - - - public Instalment charges(BigDecimal charges) { - this.charges = charges; - return this; - } - - /** - * Get charges - * minimum: 0.0 - * maximum: 99999999.999999 - * @return charges - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CHARGES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getCharges() { - return charges; - } - - - /** - * charges - * - * @param charges - */ - @JsonProperty(JSON_PROPERTY_CHARGES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCharges(BigDecimal charges) { - this.charges = charges; - } - - - /** - * Return true if this Instalment object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Instalment instalment = (Instalment) o; - return Objects.equals(this.instalmentType, instalment.instalmentType) && - Objects.equals(this.sequenceNumber, instalment.sequenceNumber) && - Objects.equals(this.planID, instalment.planID) && - Objects.equals(this.period, instalment.period) && - Objects.equals(this.periodUnit, instalment.periodUnit) && - Objects.equals(this.firstPaymentDate, instalment.firstPaymentDate) && - Objects.equals(this.totalNbOfPayments, instalment.totalNbOfPayments) && - Objects.equals(this.cumulativeAmount, instalment.cumulativeAmount) && - Objects.equals(this.firstAmount, instalment.firstAmount) && - Objects.equals(this.charges, instalment.charges); - } - - @Override - public int hashCode() { - return Objects.hash(instalmentType, sequenceNumber, planID, period, periodUnit, firstPaymentDate, totalNbOfPayments, cumulativeAmount, firstAmount, charges); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Instalment {\n"); - sb.append(" instalmentType: ").append(toIndentedString(instalmentType)).append("\n"); - sb.append(" sequenceNumber: ").append(toIndentedString(sequenceNumber)).append("\n"); - sb.append(" planID: ").append(toIndentedString(planID)).append("\n"); - sb.append(" period: ").append(toIndentedString(period)).append("\n"); - sb.append(" periodUnit: ").append(toIndentedString(periodUnit)).append("\n"); - sb.append(" firstPaymentDate: ").append(toIndentedString(firstPaymentDate)).append("\n"); - sb.append(" totalNbOfPayments: ").append(toIndentedString(totalNbOfPayments)).append("\n"); - sb.append(" cumulativeAmount: ").append(toIndentedString(cumulativeAmount)).append("\n"); - sb.append(" firstAmount: ").append(toIndentedString(firstAmount)).append("\n"); - sb.append(" charges: ").append(toIndentedString(charges)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of Instalment given an JSON string - * - * @param jsonString JSON string - * @return An instance of Instalment - * @throws JsonProcessingException if the JSON string is invalid with respect to Instalment - */ - public static Instalment fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, Instalment.class); - } -/** - * Convert an instance of Instalment to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/InstalmentType.java b/src/main/java/com/adyen/model/terminal/InstalmentType.java deleted file mode 100644 index 319f0786f..000000000 --- a/src/main/java/com/adyen/model/terminal/InstalmentType.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets InstalmentType - */ -public enum InstalmentType { - - DEFERREDINSTALMENTS("DeferredInstalments"), - - EQUALINSTALMENTS("EqualInstalments"), - - INEQUALINSTALMENTS("InequalInstalments"); - - private String value; - - InstalmentType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static InstalmentType fromValue(String value) { - for (InstalmentType b : InstalmentType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/JSON.java b/src/main/java/com/adyen/model/terminal/JSON.java deleted file mode 100644 index a1dee97b1..000000000 --- a/src/main/java/com/adyen/model/terminal/JSON.java +++ /dev/null @@ -1,253 +0,0 @@ -package com.adyen.model.terminal; - -import com.adyen.serializer.ByteArraySerializer; -import com.adyen.serializer.ByteArrayDeserializer; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.json.JsonMapper; -import com.fasterxml.jackson.databind.module.SimpleModule; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import com.adyen.model.terminal.*; - -import java.text.DateFormat; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import jakarta.ws.rs.core.GenericType; -import jakarta.ws.rs.ext.ContextResolver; - -public class JSON implements ContextResolver { - private static ObjectMapper mapper; - - public JSON() { - mapper = new ObjectMapper(); - mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - JsonMapper.builder().configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true); - mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); - mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); - mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); - mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); - mapper.registerModule(new JavaTimeModule()); - // Custom ByteSerializer - SimpleModule simpleModule = new SimpleModule(); - simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); - simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); - mapper.registerModule(simpleModule); - } - - /** - * Set the date format for JSON (de)serialization with Date properties. - * @param dateFormat Date format - */ - public void setDateFormat(DateFormat dateFormat) { - mapper.setDateFormat(dateFormat); - } - - @Override - public ObjectMapper getContext(Class type) { - return mapper; - } - - /** - * Get the object mapper - * - * @return object mapper - */ - public static ObjectMapper getMapper() { return mapper; } - - /** - * Returns the target model class that should be used to deserialize the input data. - * The discriminator mappings are used to determine the target model class. - * - * @param node The input data. - * @param modelClass The class that contains the discriminator mappings. - */ - public static Class getClassForElement(JsonNode node, Class modelClass) { - ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); - if (cdm != null) { - return cdm.getClassForElement(node, new HashSet>()); - } - return null; - } - - /** - * Helper class to register the discriminator mappings. - */ - private static class ClassDiscriminatorMapping { - // The model class name. - Class modelClass; - // The name of the discriminator property. - String discriminatorName; - // The discriminator mappings for a model class. - Map> discriminatorMappings; - - // Constructs a new class discriminator. - ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { - modelClass = cls; - discriminatorName = propertyName; - discriminatorMappings = new HashMap>(); - if (mappings != null) { - discriminatorMappings.putAll(mappings); - } - } - - // Return the name of the discriminator property for this model class. - String getDiscriminatorPropertyName() { - return discriminatorName; - } - - // Return the discriminator value or null if the discriminator is not - // present in the payload. - String getDiscriminatorValue(JsonNode node) { - // Determine the value of the discriminator property in the input data. - if (discriminatorName != null) { - // Get the value of the discriminator property, if present in the input payload. - node = node.get(discriminatorName); - if (node != null && node.isValueNode()) { - String discrValue = node.asText(); - if (discrValue != null) { - return discrValue; - } - } - } - return null; - } - - /** - * Returns the target model class that should be used to deserialize the input data. - * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. - * The discriminator mappings are used to determine the target model class. - * - * @param node The input data. - * @param visitedClasses The set of classes that have already been visited. - */ - Class getClassForElement(JsonNode node, Set> visitedClasses) { - if (visitedClasses.contains(modelClass)) { - // Class has already been visited. - return null; - } - // Determine the value of the discriminator property in the input data. - String discrValue = getDiscriminatorValue(node); - if (discrValue == null) { - return null; - } - Class cls = discriminatorMappings.get(discrValue); - // It may not be sufficient to return this cls directly because that target class - // may itself be a composed schema, possibly with its own discriminator. - visitedClasses.add(modelClass); - for (Class childClass : discriminatorMappings.values()) { - ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); - if (childCdm == null) { - continue; - } - if (!discriminatorName.equals(childCdm.discriminatorName)) { - discrValue = getDiscriminatorValue(node); - if (discrValue == null) { - continue; - } - } - if (childCdm != null) { - // Recursively traverse the discriminator mappings. - Class childDiscr = childCdm.getClassForElement(node, visitedClasses); - if (childDiscr != null) { - return childDiscr; - } - } - } - return cls; - } - } - - /** - * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. - * - * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, - * so it's not possible to use the instanceof keyword. - * - * @param modelClass A OpenAPI model class. - * @param inst The instance object. - */ - public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { - if (modelClass.isInstance(inst)) { - // This handles the 'allOf' use case with single parent inheritance. - return true; - } - if (visitedClasses.contains(modelClass)) { - // This is to prevent infinite recursion when the composed schemas have - // a circular dependency. - return false; - } - visitedClasses.add(modelClass); - - // Traverse the oneOf/anyOf composed schemas. - Map descendants = modelDescendants.get(modelClass); - if (descendants != null) { - for (GenericType childType : descendants.values()) { - if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) { - return true; - } - } - } - return false; - } - - /** - * A map of discriminators for all model classes. - */ - private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap, ClassDiscriminatorMapping>(); - - /** - * A map of oneOf/anyOf descendants for each model class. - */ - private static Map, Map> modelDescendants = new HashMap, Map>(); - - /** - * Register a model class discriminator. - * - * @param modelClass the model class - * @param discriminatorPropertyName the name of the discriminator property - * @param mappings a map with the discriminator mappings. - */ - public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { - ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); - modelDiscriminators.put(modelClass, m); - } - - /** - * Register the oneOf/anyOf descendants of the modelClass. - * - * @param modelClass the model class - * @param descendants a map of oneOf/anyOf descendants. - */ - public static void registerDescendants(Class modelClass, Map descendants) { - modelDescendants.put(modelClass, descendants); - } - - private static JSON json; - - static - { - json = new JSON(); - } - - /** - * Get the default JSON instance. - * - * @return the default JSON instance - */ - public static JSON getDefault() { - return json; - } - - /** - * Set the default JSON instance. - * - * @param json JSON instance to be used - */ - public static void setDefault(JSON json) { - JSON.json = json; - } -} diff --git a/src/main/java/com/adyen/model/terminal/LoginRequest.java b/src/main/java/com/adyen/model/terminal/LoginRequest.java deleted file mode 100644 index 9444b5bf4..000000000 --- a/src/main/java/com/adyen/model/terminal/LoginRequest.java +++ /dev/null @@ -1,509 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.SaleSoftware; -import com.adyen.model.terminal.SaleTerminalData; -import com.adyen.model.terminal.TokenRequestedType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the session (period between a Login and the following Logout) to process. Content of the Login Request message. - */ -@ApiModel(description = "It conveys Information related to the session (period between a Login and the following Logout) to process. Content of the Login Request message.") -@JsonPropertyOrder({ - LoginRequest.JSON_PROPERTY_DATE_TIME, - LoginRequest.JSON_PROPERTY_SALE_SOFTWARE, - LoginRequest.JSON_PROPERTY_SALE_TERMINAL_DATA, - LoginRequest.JSON_PROPERTY_TRAINING_MODE_FLAG, - LoginRequest.JSON_PROPERTY_OPERATOR_LANGUAGE, - LoginRequest.JSON_PROPERTY_OPERATOR_I_D, - LoginRequest.JSON_PROPERTY_SHIFT_NUMBER, - LoginRequest.JSON_PROPERTY_TOKEN_REQUESTED_TYPE, - LoginRequest.JSON_PROPERTY_CUSTOMER_ORDER_REQ, - LoginRequest.JSON_PROPERTY_PO_I_SERIAL_NUMBER -}) - -public class LoginRequest { - public static final String JSON_PROPERTY_DATE_TIME = "DateTime"; - private OffsetDateTime dateTime; - - public static final String JSON_PROPERTY_SALE_SOFTWARE = "SaleSoftware"; - private SaleSoftware saleSoftware; - - public static final String JSON_PROPERTY_SALE_TERMINAL_DATA = "SaleTerminalData"; - private SaleTerminalData saleTerminalData; - - public static final String JSON_PROPERTY_TRAINING_MODE_FLAG = "TrainingModeFlag"; - private Boolean trainingModeFlag = false; - - public static final String JSON_PROPERTY_OPERATOR_LANGUAGE = "OperatorLanguage"; - private String operatorLanguage; - - public static final String JSON_PROPERTY_OPERATOR_I_D = "OperatorID"; - private String operatorID; - - public static final String JSON_PROPERTY_SHIFT_NUMBER = "ShiftNumber"; - private String shiftNumber; - - public static final String JSON_PROPERTY_TOKEN_REQUESTED_TYPE = "TokenRequestedType"; - private TokenRequestedType tokenRequestedType; - - /** - * Gets or Sets customerOrderReq - */ - public enum CustomerOrderReqEnum { - BOTH("Both"), - - CLOSED("Closed"), - - OPEN("Open"); - - private String value; - - CustomerOrderReqEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static CustomerOrderReqEnum fromValue(String value) { - for (CustomerOrderReqEnum b : CustomerOrderReqEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_CUSTOMER_ORDER_REQ = "CustomerOrderReq"; - private List customerOrderReq = null; - - public static final String JSON_PROPERTY_PO_I_SERIAL_NUMBER = "POISerialNumber"; - private String poISerialNumber; - - public LoginRequest() { - } - - public LoginRequest dateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; - return this; - } - - /** - * Date and Time. - * @return dateTime - **/ - @ApiModelProperty(required = true, value = "Date and Time.") - @JsonProperty(JSON_PROPERTY_DATE_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OffsetDateTime getDateTime() { - return dateTime; - } - - - /** - * Date and Time. - * - * @param dateTime - */ - @JsonProperty(JSON_PROPERTY_DATE_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; - } - - - public LoginRequest saleSoftware(SaleSoftware saleSoftware) { - this.saleSoftware = saleSoftware; - return this; - } - - /** - * Get saleSoftware - * @return saleSoftware - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_SALE_SOFTWARE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SaleSoftware getSaleSoftware() { - return saleSoftware; - } - - - /** - * saleSoftware - * - * @param saleSoftware - */ - @JsonProperty(JSON_PROPERTY_SALE_SOFTWARE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleSoftware(SaleSoftware saleSoftware) { - this.saleSoftware = saleSoftware; - } - - - public LoginRequest saleTerminalData(SaleTerminalData saleTerminalData) { - this.saleTerminalData = saleTerminalData; - return this; - } - - /** - * Get saleTerminalData - * @return saleTerminalData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SALE_TERMINAL_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SaleTerminalData getSaleTerminalData() { - return saleTerminalData; - } - - - /** - * saleTerminalData - * - * @param saleTerminalData - */ - @JsonProperty(JSON_PROPERTY_SALE_TERMINAL_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleTerminalData(SaleTerminalData saleTerminalData) { - this.saleTerminalData = saleTerminalData; - } - - - public LoginRequest trainingModeFlag(Boolean trainingModeFlag) { - this.trainingModeFlag = trainingModeFlag; - return this; - } - - /** - * The POI does not realise the transaction with the Acquirer. - * @return trainingModeFlag - **/ - @ApiModelProperty(value = "The POI does not realise the transaction with the Acquirer.") - @JsonProperty(JSON_PROPERTY_TRAINING_MODE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getTrainingModeFlag() { - return trainingModeFlag; - } - - - /** - * The POI does not realise the transaction with the Acquirer. - * - * @param trainingModeFlag - */ - @JsonProperty(JSON_PROPERTY_TRAINING_MODE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTrainingModeFlag(Boolean trainingModeFlag) { - this.trainingModeFlag = trainingModeFlag; - } - - - public LoginRequest operatorLanguage(String operatorLanguage) { - this.operatorLanguage = operatorLanguage; - return this; - } - - /** - * Default value for Device type displays. - * @return operatorLanguage - **/ - @ApiModelProperty(required = true, value = "Default value for Device type displays.") - @JsonProperty(JSON_PROPERTY_OPERATOR_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getOperatorLanguage() { - return operatorLanguage; - } - - - /** - * Default value for Device type displays. - * - * @param operatorLanguage - */ - @JsonProperty(JSON_PROPERTY_OPERATOR_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOperatorLanguage(String operatorLanguage) { - this.operatorLanguage = operatorLanguage; - } - - - public LoginRequest operatorID(String operatorID) { - this.operatorID = operatorID; - return this; - } - - /** - * 4 conditions to send it: a) the Sale System wants the POI log it in the transaction log b) because of reconciliation. - * @return operatorID - **/ - @ApiModelProperty(value = "4 conditions to send it: a) the Sale System wants the POI log it in the transaction log b) because of reconciliation.") - @JsonProperty(JSON_PROPERTY_OPERATOR_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getOperatorID() { - return operatorID; - } - - - /** - * 4 conditions to send it: a) the Sale System wants the POI log it in the transaction log b) because of reconciliation. - * - * @param operatorID - */ - @JsonProperty(JSON_PROPERTY_OPERATOR_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOperatorID(String operatorID) { - this.operatorID = operatorID; - } - - - public LoginRequest shiftNumber(String shiftNumber) { - this.shiftNumber = shiftNumber; - return this; - } - - /** - * Same as OperatorID. - * @return shiftNumber - **/ - @ApiModelProperty(value = "Same as OperatorID.") - @JsonProperty(JSON_PROPERTY_SHIFT_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getShiftNumber() { - return shiftNumber; - } - - - /** - * Same as OperatorID. - * - * @param shiftNumber - */ - @JsonProperty(JSON_PROPERTY_SHIFT_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShiftNumber(String shiftNumber) { - this.shiftNumber = shiftNumber; - } - - - public LoginRequest tokenRequestedType(TokenRequestedType tokenRequestedType) { - this.tokenRequestedType = tokenRequestedType; - return this; - } - - /** - * Get tokenRequestedType - * @return tokenRequestedType - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TOKEN_REQUESTED_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TokenRequestedType getTokenRequestedType() { - return tokenRequestedType; - } - - - /** - * tokenRequestedType - * - * @param tokenRequestedType - */ - @JsonProperty(JSON_PROPERTY_TOKEN_REQUESTED_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTokenRequestedType(TokenRequestedType tokenRequestedType) { - this.tokenRequestedType = tokenRequestedType; - } - - - public LoginRequest customerOrderReq(List customerOrderReq) { - this.customerOrderReq = customerOrderReq; - return this; - } - - public LoginRequest addCustomerOrderReqItem(CustomerOrderReqEnum customerOrderReqItem) { - if (this.customerOrderReq == null) { - this.customerOrderReq = new ArrayList<>(); - } - this.customerOrderReq.add(customerOrderReqItem); - return this; - } - - /** - * Get customerOrderReq - * @return customerOrderReq - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER_REQ) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getCustomerOrderReq() { - return customerOrderReq; - } - - - /** - * customerOrderReq - * - * @param customerOrderReq - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER_REQ) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerOrderReq(List customerOrderReq) { - this.customerOrderReq = customerOrderReq; - } - - - public LoginRequest poISerialNumber(String poISerialNumber) { - this.poISerialNumber = poISerialNumber; - return this; - } - - /** - * If the login involve a POI Terminal and not the first Login to the POI System. - * @return poISerialNumber - **/ - @ApiModelProperty(value = "If the login involve a POI Terminal and not the first Login to the POI System.") - @JsonProperty(JSON_PROPERTY_PO_I_SERIAL_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPoISerialNumber() { - return poISerialNumber; - } - - - /** - * If the login involve a POI Terminal and not the first Login to the POI System. - * - * @param poISerialNumber - */ - @JsonProperty(JSON_PROPERTY_PO_I_SERIAL_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoISerialNumber(String poISerialNumber) { - this.poISerialNumber = poISerialNumber; - } - - - /** - * Return true if this LoginRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoginRequest loginRequest = (LoginRequest) o; - return Objects.equals(this.dateTime, loginRequest.dateTime) && - Objects.equals(this.saleSoftware, loginRequest.saleSoftware) && - Objects.equals(this.saleTerminalData, loginRequest.saleTerminalData) && - Objects.equals(this.trainingModeFlag, loginRequest.trainingModeFlag) && - Objects.equals(this.operatorLanguage, loginRequest.operatorLanguage) && - Objects.equals(this.operatorID, loginRequest.operatorID) && - Objects.equals(this.shiftNumber, loginRequest.shiftNumber) && - Objects.equals(this.tokenRequestedType, loginRequest.tokenRequestedType) && - Objects.equals(this.customerOrderReq, loginRequest.customerOrderReq) && - Objects.equals(this.poISerialNumber, loginRequest.poISerialNumber); - } - - @Override - public int hashCode() { - return Objects.hash(dateTime, saleSoftware, saleTerminalData, trainingModeFlag, operatorLanguage, operatorID, shiftNumber, tokenRequestedType, customerOrderReq, poISerialNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoginRequest {\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" saleSoftware: ").append(toIndentedString(saleSoftware)).append("\n"); - sb.append(" saleTerminalData: ").append(toIndentedString(saleTerminalData)).append("\n"); - sb.append(" trainingModeFlag: ").append(toIndentedString(trainingModeFlag)).append("\n"); - sb.append(" operatorLanguage: ").append(toIndentedString(operatorLanguage)).append("\n"); - sb.append(" operatorID: ").append(toIndentedString(operatorID)).append("\n"); - sb.append(" shiftNumber: ").append(toIndentedString(shiftNumber)).append("\n"); - sb.append(" tokenRequestedType: ").append(toIndentedString(tokenRequestedType)).append("\n"); - sb.append(" customerOrderReq: ").append(toIndentedString(customerOrderReq)).append("\n"); - sb.append(" poISerialNumber: ").append(toIndentedString(poISerialNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of LoginRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoginRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to LoginRequest - */ - public static LoginRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, LoginRequest.class); - } -/** - * Convert an instance of LoginRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LoginResponse.java b/src/main/java/com/adyen/model/terminal/LoginResponse.java deleted file mode 100644 index cb13cfd38..000000000 --- a/src/main/java/com/adyen/model/terminal/LoginResponse.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.POISystemData; -import com.adyen.model.terminal.Response; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the Login to process. Content of the Login Response message. - */ -@ApiModel(description = "It conveys Information related to the Login to process. Content of the Login Response message.") -@JsonPropertyOrder({ - LoginResponse.JSON_PROPERTY_RESPONSE, - LoginResponse.JSON_PROPERTY_PO_I_SYSTEM_DATA, - LoginResponse.JSON_PROPERTY_TOKEN_REQUEST_STATUS, - LoginResponse.JSON_PROPERTY_CUSTOMER_ORDER_STATUS -}) - -public class LoginResponse { - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public static final String JSON_PROPERTY_PO_I_SYSTEM_DATA = "POISystemData"; - private POISystemData poISystemData; - - public static final String JSON_PROPERTY_TOKEN_REQUEST_STATUS = "TokenRequestStatus"; - private Boolean tokenRequestStatus; - - public static final String JSON_PROPERTY_CUSTOMER_ORDER_STATUS = "CustomerOrderStatus"; - private Boolean customerOrderStatus; - - public LoginResponse() { - } - - public LoginResponse response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - public LoginResponse poISystemData(POISystemData poISystemData) { - this.poISystemData = poISystemData; - return this; - } - - /** - * Get poISystemData - * @return poISystemData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PO_I_SYSTEM_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public POISystemData getPoISystemData() { - return poISystemData; - } - - - /** - * poISystemData - * - * @param poISystemData - */ - @JsonProperty(JSON_PROPERTY_PO_I_SYSTEM_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoISystemData(POISystemData poISystemData) { - this.poISystemData = poISystemData; - } - - - public LoginResponse tokenRequestStatus(Boolean tokenRequestStatus) { - this.tokenRequestStatus = tokenRequestStatus; - return this; - } - - /** - * Get tokenRequestStatus - * @return tokenRequestStatus - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TOKEN_REQUEST_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getTokenRequestStatus() { - return tokenRequestStatus; - } - - - /** - * tokenRequestStatus - * - * @param tokenRequestStatus - */ - @JsonProperty(JSON_PROPERTY_TOKEN_REQUEST_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTokenRequestStatus(Boolean tokenRequestStatus) { - this.tokenRequestStatus = tokenRequestStatus; - } - - - public LoginResponse customerOrderStatus(Boolean customerOrderStatus) { - this.customerOrderStatus = customerOrderStatus; - return this; - } - - /** - * Get customerOrderStatus - * @return customerOrderStatus - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getCustomerOrderStatus() { - return customerOrderStatus; - } - - - /** - * customerOrderStatus - * - * @param customerOrderStatus - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerOrderStatus(Boolean customerOrderStatus) { - this.customerOrderStatus = customerOrderStatus; - } - - - /** - * Return true if this LoginResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoginResponse loginResponse = (LoginResponse) o; - return Objects.equals(this.response, loginResponse.response) && - Objects.equals(this.poISystemData, loginResponse.poISystemData) && - Objects.equals(this.tokenRequestStatus, loginResponse.tokenRequestStatus) && - Objects.equals(this.customerOrderStatus, loginResponse.customerOrderStatus); - } - - @Override - public int hashCode() { - return Objects.hash(response, poISystemData, tokenRequestStatus, customerOrderStatus); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoginResponse {\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append(" poISystemData: ").append(toIndentedString(poISystemData)).append("\n"); - sb.append(" tokenRequestStatus: ").append(toIndentedString(tokenRequestStatus)).append("\n"); - sb.append(" customerOrderStatus: ").append(toIndentedString(customerOrderStatus)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of LoginResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoginResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to LoginResponse - */ - public static LoginResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, LoginResponse.class); - } -/** - * Convert an instance of LoginResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LogoutRequest.java b/src/main/java/com/adyen/model/terminal/LogoutRequest.java deleted file mode 100644 index e97e06477..000000000 --- a/src/main/java/com/adyen/model/terminal/LogoutRequest.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Empty. Content of the Logout Request message. - */ -@ApiModel(description = "Empty. Content of the Logout Request message.") -@JsonPropertyOrder({ - LogoutRequest.JSON_PROPERTY_MAINTENANCE_ALLOWED -}) - -public class LogoutRequest { - public static final String JSON_PROPERTY_MAINTENANCE_ALLOWED = "MaintenanceAllowed"; - private Boolean maintenanceAllowed = false; - - public LogoutRequest() { - } - - public LogoutRequest maintenanceAllowed(Boolean maintenanceAllowed) { - this.maintenanceAllowed = maintenanceAllowed; - return this; - } - - /** - * Get maintenanceAllowed - * @return maintenanceAllowed - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAINTENANCE_ALLOWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getMaintenanceAllowed() { - return maintenanceAllowed; - } - - - /** - * maintenanceAllowed - * - * @param maintenanceAllowed - */ - @JsonProperty(JSON_PROPERTY_MAINTENANCE_ALLOWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMaintenanceAllowed(Boolean maintenanceAllowed) { - this.maintenanceAllowed = maintenanceAllowed; - } - - - /** - * Return true if this LogoutRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogoutRequest logoutRequest = (LogoutRequest) o; - return Objects.equals(this.maintenanceAllowed, logoutRequest.maintenanceAllowed); - } - - @Override - public int hashCode() { - return Objects.hash(maintenanceAllowed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LogoutRequest {\n"); - sb.append(" maintenanceAllowed: ").append(toIndentedString(maintenanceAllowed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of LogoutRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LogoutRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to LogoutRequest - */ - public static LogoutRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, LogoutRequest.class); - } -/** - * Convert an instance of LogoutRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LogoutResponse.java b/src/main/java/com/adyen/model/terminal/LogoutResponse.java deleted file mode 100644 index a93308b6f..000000000 --- a/src/main/java/com/adyen/model/terminal/LogoutResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.Response; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys the result of the Logout. Content of the Logout Response message. - */ -@ApiModel(description = "It conveys the result of the Logout. Content of the Logout Response message.") -@JsonPropertyOrder({ - LogoutResponse.JSON_PROPERTY_RESPONSE -}) - -public class LogoutResponse { - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public LogoutResponse() { - } - - public LogoutResponse response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - /** - * Return true if this LogoutResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogoutResponse logoutResponse = (LogoutResponse) o; - return Objects.equals(this.response, logoutResponse.response); - } - - @Override - public int hashCode() { - return Objects.hash(response); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LogoutResponse {\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of LogoutResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LogoutResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to LogoutResponse - */ - public static LogoutResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, LogoutResponse.class); - } -/** - * Convert an instance of LogoutResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LoyaltyAccount.java b/src/main/java/com/adyen/model/terminal/LoyaltyAccount.java deleted file mode 100644 index 248a4e984..000000000 --- a/src/main/java/com/adyen/model/terminal/LoyaltyAccount.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyAccountID; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * This data structure conveys the identification of the account and the associated loyalty brand. Data related to a loyalty account processed in the transaction. - */ -@ApiModel(description = "This data structure conveys the identification of the account and the associated loyalty brand. Data related to a loyalty account processed in the transaction.") -@JsonPropertyOrder({ - LoyaltyAccount.JSON_PROPERTY_LOYALTY_ACCOUNT_I_D, - LoyaltyAccount.JSON_PROPERTY_LOYALTY_BRAND -}) - -public class LoyaltyAccount { - public static final String JSON_PROPERTY_LOYALTY_ACCOUNT_I_D = "LoyaltyAccountID"; - private LoyaltyAccountID loyaltyAccountID; - - public static final String JSON_PROPERTY_LOYALTY_BRAND = "LoyaltyBrand"; - private String loyaltyBrand; - - public LoyaltyAccount() { - } - - public LoyaltyAccount loyaltyAccountID(LoyaltyAccountID loyaltyAccountID) { - this.loyaltyAccountID = loyaltyAccountID; - return this; - } - - /** - * Get loyaltyAccountID - * @return loyaltyAccountID - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_ACCOUNT_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyAccountID getLoyaltyAccountID() { - return loyaltyAccountID; - } - - - /** - * loyaltyAccountID - * - * @param loyaltyAccountID - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_ACCOUNT_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyAccountID(LoyaltyAccountID loyaltyAccountID) { - this.loyaltyAccountID = loyaltyAccountID; - } - - - public LoyaltyAccount loyaltyBrand(String loyaltyBrand) { - this.loyaltyBrand = loyaltyBrand; - return this; - } - - /** - * If a card is analysed. - * @return loyaltyBrand - **/ - @ApiModelProperty(value = "If a card is analysed.") - @JsonProperty(JSON_PROPERTY_LOYALTY_BRAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getLoyaltyBrand() { - return loyaltyBrand; - } - - - /** - * If a card is analysed. - * - * @param loyaltyBrand - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_BRAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyBrand(String loyaltyBrand) { - this.loyaltyBrand = loyaltyBrand; - } - - - /** - * Return true if this LoyaltyAccount object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoyaltyAccount loyaltyAccount = (LoyaltyAccount) o; - return Objects.equals(this.loyaltyAccountID, loyaltyAccount.loyaltyAccountID) && - Objects.equals(this.loyaltyBrand, loyaltyAccount.loyaltyBrand); - } - - @Override - public int hashCode() { - return Objects.hash(loyaltyAccountID, loyaltyBrand); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoyaltyAccount {\n"); - sb.append(" loyaltyAccountID: ").append(toIndentedString(loyaltyAccountID)).append("\n"); - sb.append(" loyaltyBrand: ").append(toIndentedString(loyaltyBrand)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of LoyaltyAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoyaltyAccount - * @throws JsonProcessingException if the JSON string is invalid with respect to LoyaltyAccount - */ - public static LoyaltyAccount fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, LoyaltyAccount.class); - } -/** - * Convert an instance of LoyaltyAccount to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LoyaltyAccountID.java b/src/main/java/com/adyen/model/terminal/LoyaltyAccountID.java deleted file mode 100644 index 8f2778cdb..000000000 --- a/src/main/java/com/adyen/model/terminal/LoyaltyAccountID.java +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.IdentificationSupport; -import com.adyen.model.terminal.IdentificationType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * In the Payment or the Loyalty Request message, it allows to identify the loyalty account by the Sale Terminal instead of the POI Terminal (e.g. because the account identification is a bar-code read by the Cashier on a scanner device). Identification of a Loyalty account. - */ -@ApiModel(description = "In the Payment or the Loyalty Request message, it allows to identify the loyalty account by the Sale Terminal instead of the POI Terminal (e.g. because the account identification is a bar-code read by the Cashier on a scanner device). Identification of a Loyalty account.") -@JsonPropertyOrder({ - LoyaltyAccountID.JSON_PROPERTY_ENTRY_MODE, - LoyaltyAccountID.JSON_PROPERTY_IDENTIFICATION_TYPE, - LoyaltyAccountID.JSON_PROPERTY_IDENTIFICATION_SUPPORT, - LoyaltyAccountID.JSON_PROPERTY_LOYALTY_I_D -}) - -public class LoyaltyAccountID { - /** - * Gets or Sets entryMode - */ - public enum EntryModeEnum { - CONTACTLESS("Contactless"), - - FILE("File"), - - ICC("ICC"), - - KEYED("Keyed"), - - MAGSTRIPE("MagStripe"), - - MANUAL("Manual"), - - MOBILE("Mobile"), - - RFID("RFID"), - - SCANNED("Scanned"), - - SYNCHRONOUSICC("SynchronousICC"), - - TAPPED("Tapped"); - - private String value; - - EntryModeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EntryModeEnum fromValue(String value) { - for (EntryModeEnum b : EntryModeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_ENTRY_MODE = "EntryMode"; - private List entryMode = new ArrayList<>(); - - public static final String JSON_PROPERTY_IDENTIFICATION_TYPE = "IdentificationType"; - private IdentificationType identificationType; - - public static final String JSON_PROPERTY_IDENTIFICATION_SUPPORT = "IdentificationSupport"; - private IdentificationSupport identificationSupport; - - public static final String JSON_PROPERTY_LOYALTY_I_D = "LoyaltyID"; - private String loyaltyID; - - public LoyaltyAccountID() { - } - - public LoyaltyAccountID entryMode(List entryMode) { - this.entryMode = entryMode; - return this; - } - - public LoyaltyAccountID addEntryModeItem(EntryModeEnum entryModeItem) { - this.entryMode.add(entryModeItem); - return this; - } - - /** - * Get entryMode - * @return entryMode - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_ENTRY_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getEntryMode() { - return entryMode; - } - - - /** - * entryMode - * - * @param entryMode - */ - @JsonProperty(JSON_PROPERTY_ENTRY_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEntryMode(List entryMode) { - this.entryMode = entryMode; - } - - - public LoyaltyAccountID identificationType(IdentificationType identificationType) { - this.identificationType = identificationType; - return this; - } - - /** - * Get identificationType - * @return identificationType - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_IDENTIFICATION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public IdentificationType getIdentificationType() { - return identificationType; - } - - - /** - * identificationType - * - * @param identificationType - */ - @JsonProperty(JSON_PROPERTY_IDENTIFICATION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIdentificationType(IdentificationType identificationType) { - this.identificationType = identificationType; - } - - - public LoyaltyAccountID identificationSupport(IdentificationSupport identificationSupport) { - this.identificationSupport = identificationSupport; - return this; - } - - /** - * Get identificationSupport - * @return identificationSupport - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_IDENTIFICATION_SUPPORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public IdentificationSupport getIdentificationSupport() { - return identificationSupport; - } - - - /** - * identificationSupport - * - * @param identificationSupport - */ - @JsonProperty(JSON_PROPERTY_IDENTIFICATION_SUPPORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIdentificationSupport(IdentificationSupport identificationSupport) { - this.identificationSupport = identificationSupport; - } - - - public LoyaltyAccountID loyaltyID(String loyaltyID) { - this.loyaltyID = loyaltyID; - return this; - } - - /** - * Get loyaltyID - * @return loyaltyID - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getLoyaltyID() { - return loyaltyID; - } - - - /** - * loyaltyID - * - * @param loyaltyID - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyID(String loyaltyID) { - this.loyaltyID = loyaltyID; - } - - - /** - * Return true if this LoyaltyAccountID object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoyaltyAccountID loyaltyAccountID = (LoyaltyAccountID) o; - return Objects.equals(this.entryMode, loyaltyAccountID.entryMode) && - Objects.equals(this.identificationType, loyaltyAccountID.identificationType) && - Objects.equals(this.identificationSupport, loyaltyAccountID.identificationSupport) && - Objects.equals(this.loyaltyID, loyaltyAccountID.loyaltyID); - } - - @Override - public int hashCode() { - return Objects.hash(entryMode, identificationType, identificationSupport, loyaltyID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoyaltyAccountID {\n"); - sb.append(" entryMode: ").append(toIndentedString(entryMode)).append("\n"); - sb.append(" identificationType: ").append(toIndentedString(identificationType)).append("\n"); - sb.append(" identificationSupport: ").append(toIndentedString(identificationSupport)).append("\n"); - sb.append(" loyaltyID: ").append(toIndentedString(loyaltyID)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of LoyaltyAccountID given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoyaltyAccountID - * @throws JsonProcessingException if the JSON string is invalid with respect to LoyaltyAccountID - */ - public static LoyaltyAccountID fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, LoyaltyAccountID.class); - } -/** - * Convert an instance of LoyaltyAccountID to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LoyaltyAccountReq.java b/src/main/java/com/adyen/model/terminal/LoyaltyAccountReq.java deleted file mode 100644 index 02d360d7a..000000000 --- a/src/main/java/com/adyen/model/terminal/LoyaltyAccountReq.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyAccountID; -import com.adyen.model.terminal.TransactionIDType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * LoyaltyAccountReq - */ -@JsonPropertyOrder({ - LoyaltyAccountReq.JSON_PROPERTY_CARD_ACQUISITION_REFERENCE, - LoyaltyAccountReq.JSON_PROPERTY_LOYALTY_ACCOUNT_I_D -}) - -public class LoyaltyAccountReq { - public static final String JSON_PROPERTY_CARD_ACQUISITION_REFERENCE = "CardAcquisitionReference"; - private TransactionIDType cardAcquisitionReference; - - public static final String JSON_PROPERTY_LOYALTY_ACCOUNT_I_D = "LoyaltyAccountID"; - private LoyaltyAccountID loyaltyAccountID; - - public LoyaltyAccountReq() { - } - - public LoyaltyAccountReq cardAcquisitionReference(TransactionIDType cardAcquisitionReference) { - this.cardAcquisitionReference = cardAcquisitionReference; - return this; - } - - /** - * Get cardAcquisitionReference - * @return cardAcquisitionReference - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CARD_ACQUISITION_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransactionIDType getCardAcquisitionReference() { - return cardAcquisitionReference; - } - - - /** - * cardAcquisitionReference - * - * @param cardAcquisitionReference - */ - @JsonProperty(JSON_PROPERTY_CARD_ACQUISITION_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCardAcquisitionReference(TransactionIDType cardAcquisitionReference) { - this.cardAcquisitionReference = cardAcquisitionReference; - } - - - public LoyaltyAccountReq loyaltyAccountID(LoyaltyAccountID loyaltyAccountID) { - this.loyaltyAccountID = loyaltyAccountID; - return this; - } - - /** - * Get loyaltyAccountID - * @return loyaltyAccountID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_ACCOUNT_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyAccountID getLoyaltyAccountID() { - return loyaltyAccountID; - } - - - /** - * loyaltyAccountID - * - * @param loyaltyAccountID - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_ACCOUNT_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyAccountID(LoyaltyAccountID loyaltyAccountID) { - this.loyaltyAccountID = loyaltyAccountID; - } - - - /** - * Return true if this LoyaltyAccountReq object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoyaltyAccountReq loyaltyAccountReq = (LoyaltyAccountReq) o; - return Objects.equals(this.cardAcquisitionReference, loyaltyAccountReq.cardAcquisitionReference) && - Objects.equals(this.loyaltyAccountID, loyaltyAccountReq.loyaltyAccountID); - } - - @Override - public int hashCode() { - return Objects.hash(cardAcquisitionReference, loyaltyAccountID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoyaltyAccountReq {\n"); - sb.append(" cardAcquisitionReference: ").append(toIndentedString(cardAcquisitionReference)).append("\n"); - sb.append(" loyaltyAccountID: ").append(toIndentedString(loyaltyAccountID)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of LoyaltyAccountReq given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoyaltyAccountReq - * @throws JsonProcessingException if the JSON string is invalid with respect to LoyaltyAccountReq - */ - public static LoyaltyAccountReq fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, LoyaltyAccountReq.class); - } -/** - * Convert an instance of LoyaltyAccountReq to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LoyaltyAccountStatus.java b/src/main/java/com/adyen/model/terminal/LoyaltyAccountStatus.java deleted file mode 100644 index dfa5aa12e..000000000 --- a/src/main/java/com/adyen/model/terminal/LoyaltyAccountStatus.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyAccount; -import com.adyen.model.terminal.LoyaltyUnit; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * LoyaltyAccountStatus - */ -@JsonPropertyOrder({ - LoyaltyAccountStatus.JSON_PROPERTY_LOYALTY_ACCOUNT, - LoyaltyAccountStatus.JSON_PROPERTY_CURRENT_BALANCE, - LoyaltyAccountStatus.JSON_PROPERTY_LOYALTY_UNIT, - LoyaltyAccountStatus.JSON_PROPERTY_CURRENCY -}) - -public class LoyaltyAccountStatus { - public static final String JSON_PROPERTY_LOYALTY_ACCOUNT = "LoyaltyAccount"; - private LoyaltyAccount loyaltyAccount; - - public static final String JSON_PROPERTY_CURRENT_BALANCE = "CurrentBalance"; - private BigDecimal currentBalance; - - public static final String JSON_PROPERTY_LOYALTY_UNIT = "LoyaltyUnit"; - private LoyaltyUnit loyaltyUnit; - - public static final String JSON_PROPERTY_CURRENCY = "Currency"; - private String currency; - - public LoyaltyAccountStatus() { - } - - public LoyaltyAccountStatus loyaltyAccount(LoyaltyAccount loyaltyAccount) { - this.loyaltyAccount = loyaltyAccount; - return this; - } - - /** - * Get loyaltyAccount - * @return loyaltyAccount - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyAccount getLoyaltyAccount() { - return loyaltyAccount; - } - - - /** - * loyaltyAccount - * - * @param loyaltyAccount - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyAccount(LoyaltyAccount loyaltyAccount) { - this.loyaltyAccount = loyaltyAccount; - } - - - public LoyaltyAccountStatus currentBalance(BigDecimal currentBalance) { - this.currentBalance = currentBalance; - return this; - } - - /** - * Get currentBalance - * minimum: 0.0 - * maximum: 99999999.999999 - * @return currentBalance - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CURRENT_BALANCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getCurrentBalance() { - return currentBalance; - } - - - /** - * currentBalance - * - * @param currentBalance - */ - @JsonProperty(JSON_PROPERTY_CURRENT_BALANCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrentBalance(BigDecimal currentBalance) { - this.currentBalance = currentBalance; - } - - - public LoyaltyAccountStatus loyaltyUnit(LoyaltyUnit loyaltyUnit) { - this.loyaltyUnit = loyaltyUnit; - return this; - } - - /** - * Get loyaltyUnit - * @return loyaltyUnit - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyUnit getLoyaltyUnit() { - return loyaltyUnit; - } - - - /** - * loyaltyUnit - * - * @param loyaltyUnit - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyUnit(LoyaltyUnit loyaltyUnit) { - this.loyaltyUnit = loyaltyUnit; - } - - - public LoyaltyAccountStatus currency(String currency) { - this.currency = currency; - return this; - } - - /** - * Get currency - * @return currency - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCurrency() { - return currency; - } - - - /** - * currency - * - * @param currency - */ - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrency(String currency) { - this.currency = currency; - } - - - /** - * Return true if this LoyaltyAccountStatus object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoyaltyAccountStatus loyaltyAccountStatus = (LoyaltyAccountStatus) o; - return Objects.equals(this.loyaltyAccount, loyaltyAccountStatus.loyaltyAccount) && - Objects.equals(this.currentBalance, loyaltyAccountStatus.currentBalance) && - Objects.equals(this.loyaltyUnit, loyaltyAccountStatus.loyaltyUnit) && - Objects.equals(this.currency, loyaltyAccountStatus.currency); - } - - @Override - public int hashCode() { - return Objects.hash(loyaltyAccount, currentBalance, loyaltyUnit, currency); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoyaltyAccountStatus {\n"); - sb.append(" loyaltyAccount: ").append(toIndentedString(loyaltyAccount)).append("\n"); - sb.append(" currentBalance: ").append(toIndentedString(currentBalance)).append("\n"); - sb.append(" loyaltyUnit: ").append(toIndentedString(loyaltyUnit)).append("\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of LoyaltyAccountStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoyaltyAccountStatus - * @throws JsonProcessingException if the JSON string is invalid with respect to LoyaltyAccountStatus - */ - public static LoyaltyAccountStatus fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, LoyaltyAccountStatus.class); - } -/** - * Convert an instance of LoyaltyAccountStatus to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LoyaltyAcquirerData.java b/src/main/java/com/adyen/model/terminal/LoyaltyAcquirerData.java deleted file mode 100644 index 09c201e7a..000000000 --- a/src/main/java/com/adyen/model/terminal/LoyaltyAcquirerData.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.TransactionIDType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * LoyaltyAcquirerData - */ -@JsonPropertyOrder({ - LoyaltyAcquirerData.JSON_PROPERTY_LOYALTY_ACQUIRER_I_D, - LoyaltyAcquirerData.JSON_PROPERTY_APPROVAL_CODE, - LoyaltyAcquirerData.JSON_PROPERTY_LOYALTY_TRANSACTION_I_D, - LoyaltyAcquirerData.JSON_PROPERTY_HOST_RECONCILIATION_I_D -}) - -public class LoyaltyAcquirerData { - public static final String JSON_PROPERTY_LOYALTY_ACQUIRER_I_D = "LoyaltyAcquirerID"; - private String loyaltyAcquirerID; - - public static final String JSON_PROPERTY_APPROVAL_CODE = "ApprovalCode"; - private String approvalCode; - - public static final String JSON_PROPERTY_LOYALTY_TRANSACTION_I_D = "LoyaltyTransactionID"; - private TransactionIDType loyaltyTransactionID; - - public static final String JSON_PROPERTY_HOST_RECONCILIATION_I_D = "HostReconciliationID"; - private String hostReconciliationID; - - public LoyaltyAcquirerData() { - } - - public LoyaltyAcquirerData loyaltyAcquirerID(String loyaltyAcquirerID) { - this.loyaltyAcquirerID = loyaltyAcquirerID; - return this; - } - - /** - * Get loyaltyAcquirerID - * @return loyaltyAcquirerID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_ACQUIRER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getLoyaltyAcquirerID() { - return loyaltyAcquirerID; - } - - - /** - * loyaltyAcquirerID - * - * @param loyaltyAcquirerID - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_ACQUIRER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyAcquirerID(String loyaltyAcquirerID) { - this.loyaltyAcquirerID = loyaltyAcquirerID; - } - - - public LoyaltyAcquirerData approvalCode(String approvalCode) { - this.approvalCode = approvalCode; - return this; - } - - /** - * Get approvalCode - * @return approvalCode - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_APPROVAL_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getApprovalCode() { - return approvalCode; - } - - - /** - * approvalCode - * - * @param approvalCode - */ - @JsonProperty(JSON_PROPERTY_APPROVAL_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApprovalCode(String approvalCode) { - this.approvalCode = approvalCode; - } - - - public LoyaltyAcquirerData loyaltyTransactionID(TransactionIDType loyaltyTransactionID) { - this.loyaltyTransactionID = loyaltyTransactionID; - return this; - } - - /** - * Get loyaltyTransactionID - * @return loyaltyTransactionID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_TRANSACTION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransactionIDType getLoyaltyTransactionID() { - return loyaltyTransactionID; - } - - - /** - * loyaltyTransactionID - * - * @param loyaltyTransactionID - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_TRANSACTION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyTransactionID(TransactionIDType loyaltyTransactionID) { - this.loyaltyTransactionID = loyaltyTransactionID; - } - - - public LoyaltyAcquirerData hostReconciliationID(String hostReconciliationID) { - this.hostReconciliationID = hostReconciliationID; - return this; - } - - /** - * Get hostReconciliationID - * @return hostReconciliationID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_HOST_RECONCILIATION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getHostReconciliationID() { - return hostReconciliationID; - } - - - /** - * hostReconciliationID - * - * @param hostReconciliationID - */ - @JsonProperty(JSON_PROPERTY_HOST_RECONCILIATION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHostReconciliationID(String hostReconciliationID) { - this.hostReconciliationID = hostReconciliationID; - } - - - /** - * Return true if this LoyaltyAcquirerData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoyaltyAcquirerData loyaltyAcquirerData = (LoyaltyAcquirerData) o; - return Objects.equals(this.loyaltyAcquirerID, loyaltyAcquirerData.loyaltyAcquirerID) && - Objects.equals(this.approvalCode, loyaltyAcquirerData.approvalCode) && - Objects.equals(this.loyaltyTransactionID, loyaltyAcquirerData.loyaltyTransactionID) && - Objects.equals(this.hostReconciliationID, loyaltyAcquirerData.hostReconciliationID); - } - - @Override - public int hashCode() { - return Objects.hash(loyaltyAcquirerID, approvalCode, loyaltyTransactionID, hostReconciliationID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoyaltyAcquirerData {\n"); - sb.append(" loyaltyAcquirerID: ").append(toIndentedString(loyaltyAcquirerID)).append("\n"); - sb.append(" approvalCode: ").append(toIndentedString(approvalCode)).append("\n"); - sb.append(" loyaltyTransactionID: ").append(toIndentedString(loyaltyTransactionID)).append("\n"); - sb.append(" hostReconciliationID: ").append(toIndentedString(hostReconciliationID)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of LoyaltyAcquirerData given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoyaltyAcquirerData - * @throws JsonProcessingException if the JSON string is invalid with respect to LoyaltyAcquirerData - */ - public static LoyaltyAcquirerData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, LoyaltyAcquirerData.class); - } -/** - * Convert an instance of LoyaltyAcquirerData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LoyaltyAmount.java b/src/main/java/com/adyen/model/terminal/LoyaltyAmount.java deleted file mode 100644 index cf7982465..000000000 --- a/src/main/java/com/adyen/model/terminal/LoyaltyAmount.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyUnit; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * An awarded amount or an amount to redeem to the loyalty account might be sent in the Payment request message. Amount of a loyalty account. - */ -@ApiModel(description = "An awarded amount or an amount to redeem to the loyalty account might be sent in the Payment request message. Amount of a loyalty account.") -@JsonPropertyOrder({ - LoyaltyAmount.JSON_PROPERTY_LOYALTY_UNIT, - LoyaltyAmount.JSON_PROPERTY_CURRENCY, - LoyaltyAmount.JSON_PROPERTY_AMOUNT_VALUE -}) - -public class LoyaltyAmount { - public static final String JSON_PROPERTY_LOYALTY_UNIT = "LoyaltyUnit"; - private LoyaltyUnit loyaltyUnit; - - public static final String JSON_PROPERTY_CURRENCY = "Currency"; - private String currency; - - public static final String JSON_PROPERTY_AMOUNT_VALUE = "AmountValue"; - private BigDecimal amountValue; - - public LoyaltyAmount() { - } - - public LoyaltyAmount loyaltyUnit(LoyaltyUnit loyaltyUnit) { - this.loyaltyUnit = loyaltyUnit; - return this; - } - - /** - * Get loyaltyUnit - * @return loyaltyUnit - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyUnit getLoyaltyUnit() { - return loyaltyUnit; - } - - - /** - * loyaltyUnit - * - * @param loyaltyUnit - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyUnit(LoyaltyUnit loyaltyUnit) { - this.loyaltyUnit = loyaltyUnit; - } - - - public LoyaltyAmount currency(String currency) { - this.currency = currency; - return this; - } - - /** - * Get currency - * @return currency - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCurrency() { - return currency; - } - - - /** - * currency - * - * @param currency - */ - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrency(String currency) { - this.currency = currency; - } - - - public LoyaltyAmount amountValue(BigDecimal amountValue) { - this.amountValue = amountValue; - return this; - } - - /** - * Get amountValue - * minimum: 0.0 - * maximum: 99999999.999999 - * @return amountValue - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_AMOUNT_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getAmountValue() { - return amountValue; - } - - - /** - * amountValue - * - * @param amountValue - */ - @JsonProperty(JSON_PROPERTY_AMOUNT_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAmountValue(BigDecimal amountValue) { - this.amountValue = amountValue; - } - - - /** - * Return true if this LoyaltyAmount object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoyaltyAmount loyaltyAmount = (LoyaltyAmount) o; - return Objects.equals(this.loyaltyUnit, loyaltyAmount.loyaltyUnit) && - Objects.equals(this.currency, loyaltyAmount.currency) && - Objects.equals(this.amountValue, loyaltyAmount.amountValue); - } - - @Override - public int hashCode() { - return Objects.hash(loyaltyUnit, currency, amountValue); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoyaltyAmount {\n"); - sb.append(" loyaltyUnit: ").append(toIndentedString(loyaltyUnit)).append("\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append(" amountValue: ").append(toIndentedString(amountValue)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of LoyaltyAmount given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoyaltyAmount - * @throws JsonProcessingException if the JSON string is invalid with respect to LoyaltyAmount - */ - public static LoyaltyAmount fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, LoyaltyAmount.class); - } -/** - * Convert an instance of LoyaltyAmount to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LoyaltyData.java b/src/main/java/com/adyen/model/terminal/LoyaltyData.java deleted file mode 100644 index fa31012ad..000000000 --- a/src/main/java/com/adyen/model/terminal/LoyaltyData.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyAccountID; -import com.adyen.model.terminal.LoyaltyAmount; -import com.adyen.model.terminal.TransactionIDType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * In the Payment, Loyalty or Balance Inquiry Request message, it allows the Sale Terminal to send the identification of the loyalty account or an awarded amount or an amount to redeem to the loyalty account. Data related to a Loyalty program or account. - */ -@ApiModel(description = "In the Payment, Loyalty or Balance Inquiry Request message, it allows the Sale Terminal to send the identification of the loyalty account or an awarded amount or an amount to redeem to the loyalty account. Data related to a Loyalty program or account.") -@JsonPropertyOrder({ - LoyaltyData.JSON_PROPERTY_CARD_ACQUISITION_REFERENCE, - LoyaltyData.JSON_PROPERTY_LOYALTY_ACCOUNT_I_D, - LoyaltyData.JSON_PROPERTY_LOYALTY_AMOUNT -}) - -public class LoyaltyData { - public static final String JSON_PROPERTY_CARD_ACQUISITION_REFERENCE = "CardAcquisitionReference"; - private TransactionIDType cardAcquisitionReference; - - public static final String JSON_PROPERTY_LOYALTY_ACCOUNT_I_D = "LoyaltyAccountID"; - private LoyaltyAccountID loyaltyAccountID; - - public static final String JSON_PROPERTY_LOYALTY_AMOUNT = "LoyaltyAmount"; - private LoyaltyAmount loyaltyAmount; - - public LoyaltyData() { - } - - public LoyaltyData cardAcquisitionReference(TransactionIDType cardAcquisitionReference) { - this.cardAcquisitionReference = cardAcquisitionReference; - return this; - } - - /** - * Get cardAcquisitionReference - * @return cardAcquisitionReference - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CARD_ACQUISITION_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransactionIDType getCardAcquisitionReference() { - return cardAcquisitionReference; - } - - - /** - * cardAcquisitionReference - * - * @param cardAcquisitionReference - */ - @JsonProperty(JSON_PROPERTY_CARD_ACQUISITION_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCardAcquisitionReference(TransactionIDType cardAcquisitionReference) { - this.cardAcquisitionReference = cardAcquisitionReference; - } - - - public LoyaltyData loyaltyAccountID(LoyaltyAccountID loyaltyAccountID) { - this.loyaltyAccountID = loyaltyAccountID; - return this; - } - - /** - * Get loyaltyAccountID - * @return loyaltyAccountID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_ACCOUNT_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyAccountID getLoyaltyAccountID() { - return loyaltyAccountID; - } - - - /** - * loyaltyAccountID - * - * @param loyaltyAccountID - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_ACCOUNT_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyAccountID(LoyaltyAccountID loyaltyAccountID) { - this.loyaltyAccountID = loyaltyAccountID; - } - - - public LoyaltyData loyaltyAmount(LoyaltyAmount loyaltyAmount) { - this.loyaltyAmount = loyaltyAmount; - return this; - } - - /** - * Get loyaltyAmount - * @return loyaltyAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyAmount getLoyaltyAmount() { - return loyaltyAmount; - } - - - /** - * loyaltyAmount - * - * @param loyaltyAmount - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyAmount(LoyaltyAmount loyaltyAmount) { - this.loyaltyAmount = loyaltyAmount; - } - - - /** - * Return true if this LoyaltyData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoyaltyData loyaltyData = (LoyaltyData) o; - return Objects.equals(this.cardAcquisitionReference, loyaltyData.cardAcquisitionReference) && - Objects.equals(this.loyaltyAccountID, loyaltyData.loyaltyAccountID) && - Objects.equals(this.loyaltyAmount, loyaltyData.loyaltyAmount); - } - - @Override - public int hashCode() { - return Objects.hash(cardAcquisitionReference, loyaltyAccountID, loyaltyAmount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoyaltyData {\n"); - sb.append(" cardAcquisitionReference: ").append(toIndentedString(cardAcquisitionReference)).append("\n"); - sb.append(" loyaltyAccountID: ").append(toIndentedString(loyaltyAccountID)).append("\n"); - sb.append(" loyaltyAmount: ").append(toIndentedString(loyaltyAmount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of LoyaltyData given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoyaltyData - * @throws JsonProcessingException if the JSON string is invalid with respect to LoyaltyData - */ - public static LoyaltyData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, LoyaltyData.class); - } -/** - * Convert an instance of LoyaltyData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LoyaltyHandling.java b/src/main/java/com/adyen/model/terminal/LoyaltyHandling.java deleted file mode 100644 index 07beaf05d..000000000 --- a/src/main/java/com/adyen/model/terminal/LoyaltyHandling.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets LoyaltyHandling - */ -public enum LoyaltyHandling { - - ALLOWED("Allowed"), - - FORBIDDEN("Forbidden"), - - PROCESSED("Processed"), - - PROPOSED("Proposed"), - - REQUIRED("Required"); - - private String value; - - LoyaltyHandling(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static LoyaltyHandling fromValue(String value) { - for (LoyaltyHandling b : LoyaltyHandling.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LoyaltyRequest.java b/src/main/java/com/adyen/model/terminal/LoyaltyRequest.java deleted file mode 100644 index 933fd01d1..000000000 --- a/src/main/java/com/adyen/model/terminal/LoyaltyRequest.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyData; -import com.adyen.model.terminal.LoyaltyTransaction; -import com.adyen.model.terminal.SaleData; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the Loyalty transaction to process. Content of the Loyalty Request message. - */ -@ApiModel(description = "It conveys Information related to the Loyalty transaction to process. Content of the Loyalty Request message.") -@JsonPropertyOrder({ - LoyaltyRequest.JSON_PROPERTY_SALE_DATA, - LoyaltyRequest.JSON_PROPERTY_LOYALTY_TRANSACTION, - LoyaltyRequest.JSON_PROPERTY_LOYALTY_DATA -}) - -public class LoyaltyRequest { - public static final String JSON_PROPERTY_SALE_DATA = "SaleData"; - private SaleData saleData; - - public static final String JSON_PROPERTY_LOYALTY_TRANSACTION = "LoyaltyTransaction"; - private LoyaltyTransaction loyaltyTransaction; - - public static final String JSON_PROPERTY_LOYALTY_DATA = "LoyaltyData"; - private LoyaltyData loyaltyData; - - public LoyaltyRequest() { - } - - public LoyaltyRequest saleData(SaleData saleData) { - this.saleData = saleData; - return this; - } - - /** - * Get saleData - * @return saleData - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SaleData getSaleData() { - return saleData; - } - - - /** - * saleData - * - * @param saleData - */ - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleData(SaleData saleData) { - this.saleData = saleData; - } - - - public LoyaltyRequest loyaltyTransaction(LoyaltyTransaction loyaltyTransaction) { - this.loyaltyTransaction = loyaltyTransaction; - return this; - } - - /** - * Get loyaltyTransaction - * @return loyaltyTransaction - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_TRANSACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyTransaction getLoyaltyTransaction() { - return loyaltyTransaction; - } - - - /** - * loyaltyTransaction - * - * @param loyaltyTransaction - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_TRANSACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyTransaction(LoyaltyTransaction loyaltyTransaction) { - this.loyaltyTransaction = loyaltyTransaction; - } - - - public LoyaltyRequest loyaltyData(LoyaltyData loyaltyData) { - this.loyaltyData = loyaltyData; - return this; - } - - /** - * Get loyaltyData - * @return loyaltyData - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyData getLoyaltyData() { - return loyaltyData; - } - - - /** - * loyaltyData - * - * @param loyaltyData - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyData(LoyaltyData loyaltyData) { - this.loyaltyData = loyaltyData; - } - - - /** - * Return true if this LoyaltyRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoyaltyRequest loyaltyRequest = (LoyaltyRequest) o; - return Objects.equals(this.saleData, loyaltyRequest.saleData) && - Objects.equals(this.loyaltyTransaction, loyaltyRequest.loyaltyTransaction) && - Objects.equals(this.loyaltyData, loyaltyRequest.loyaltyData); - } - - @Override - public int hashCode() { - return Objects.hash(saleData, loyaltyTransaction, loyaltyData); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoyaltyRequest {\n"); - sb.append(" saleData: ").append(toIndentedString(saleData)).append("\n"); - sb.append(" loyaltyTransaction: ").append(toIndentedString(loyaltyTransaction)).append("\n"); - sb.append(" loyaltyData: ").append(toIndentedString(loyaltyData)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of LoyaltyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoyaltyRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to LoyaltyRequest - */ - public static LoyaltyRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, LoyaltyRequest.class); - } -/** - * Convert an instance of LoyaltyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LoyaltyResponse.java b/src/main/java/com/adyen/model/terminal/LoyaltyResponse.java deleted file mode 100644 index 20217b970..000000000 --- a/src/main/java/com/adyen/model/terminal/LoyaltyResponse.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyResult; -import com.adyen.model.terminal.POIData; -import com.adyen.model.terminal.PaymentReceipt; -import com.adyen.model.terminal.Response; -import com.adyen.model.terminal.SaleData; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the Loyalty transaction processed by the POI System. Content of the Loyalty Response message. - */ -@ApiModel(description = "It conveys Information related to the Loyalty transaction processed by the POI System. Content of the Loyalty Response message.") -@JsonPropertyOrder({ - LoyaltyResponse.JSON_PROPERTY_RESPONSE, - LoyaltyResponse.JSON_PROPERTY_SALE_DATA, - LoyaltyResponse.JSON_PROPERTY_PO_I_DATA, - LoyaltyResponse.JSON_PROPERTY_LOYALTY_RESULT, - LoyaltyResponse.JSON_PROPERTY_PAYMENT_RECEIPT -}) - -public class LoyaltyResponse { - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public static final String JSON_PROPERTY_SALE_DATA = "SaleData"; - private SaleData saleData; - - public static final String JSON_PROPERTY_PO_I_DATA = "POIData"; - private POIData poIData; - - public static final String JSON_PROPERTY_LOYALTY_RESULT = "LoyaltyResult"; - private List loyaltyResult = null; - - public static final String JSON_PROPERTY_PAYMENT_RECEIPT = "PaymentReceipt"; - private List paymentReceipt = null; - - public LoyaltyResponse() { - } - - public LoyaltyResponse response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - public LoyaltyResponse saleData(SaleData saleData) { - this.saleData = saleData; - return this; - } - - /** - * Get saleData - * @return saleData - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SaleData getSaleData() { - return saleData; - } - - - /** - * saleData - * - * @param saleData - */ - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleData(SaleData saleData) { - this.saleData = saleData; - } - - - public LoyaltyResponse poIData(POIData poIData) { - this.poIData = poIData; - return this; - } - - /** - * Get poIData - * @return poIData - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PO_I_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public POIData getPoIData() { - return poIData; - } - - - /** - * poIData - * - * @param poIData - */ - @JsonProperty(JSON_PROPERTY_PO_I_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoIData(POIData poIData) { - this.poIData = poIData; - } - - - public LoyaltyResponse loyaltyResult(List loyaltyResult) { - this.loyaltyResult = loyaltyResult; - return this; - } - - public LoyaltyResponse addLoyaltyResultItem(LoyaltyResult loyaltyResultItem) { - if (this.loyaltyResult == null) { - this.loyaltyResult = new ArrayList<>(); - } - this.loyaltyResult.add(loyaltyResultItem); - return this; - } - - /** - * Get loyaltyResult - * @return loyaltyResult - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getLoyaltyResult() { - return loyaltyResult; - } - - - /** - * loyaltyResult - * - * @param loyaltyResult - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyResult(List loyaltyResult) { - this.loyaltyResult = loyaltyResult; - } - - - public LoyaltyResponse paymentReceipt(List paymentReceipt) { - this.paymentReceipt = paymentReceipt; - return this; - } - - public LoyaltyResponse addPaymentReceiptItem(PaymentReceipt paymentReceiptItem) { - if (this.paymentReceipt == null) { - this.paymentReceipt = new ArrayList<>(); - } - this.paymentReceipt.add(paymentReceiptItem); - return this; - } - - /** - * Get paymentReceipt - * @return paymentReceipt - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_RECEIPT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPaymentReceipt() { - return paymentReceipt; - } - - - /** - * paymentReceipt - * - * @param paymentReceipt - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_RECEIPT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentReceipt(List paymentReceipt) { - this.paymentReceipt = paymentReceipt; - } - - - /** - * Return true if this LoyaltyResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoyaltyResponse loyaltyResponse = (LoyaltyResponse) o; - return Objects.equals(this.response, loyaltyResponse.response) && - Objects.equals(this.saleData, loyaltyResponse.saleData) && - Objects.equals(this.poIData, loyaltyResponse.poIData) && - Objects.equals(this.loyaltyResult, loyaltyResponse.loyaltyResult) && - Objects.equals(this.paymentReceipt, loyaltyResponse.paymentReceipt); - } - - @Override - public int hashCode() { - return Objects.hash(response, saleData, poIData, loyaltyResult, paymentReceipt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoyaltyResponse {\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append(" saleData: ").append(toIndentedString(saleData)).append("\n"); - sb.append(" poIData: ").append(toIndentedString(poIData)).append("\n"); - sb.append(" loyaltyResult: ").append(toIndentedString(loyaltyResult)).append("\n"); - sb.append(" paymentReceipt: ").append(toIndentedString(paymentReceipt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of LoyaltyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoyaltyResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to LoyaltyResponse - */ - public static LoyaltyResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, LoyaltyResponse.class); - } -/** - * Convert an instance of LoyaltyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LoyaltyResult.java b/src/main/java/com/adyen/model/terminal/LoyaltyResult.java deleted file mode 100644 index b7bafb53c..000000000 --- a/src/main/java/com/adyen/model/terminal/LoyaltyResult.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyAccount; -import com.adyen.model.terminal.LoyaltyAcquirerData; -import com.adyen.model.terminal.LoyaltyAmount; -import com.adyen.model.terminal.Rebates; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * In the Message Response, the result of each loyalty brand transaction. Data related to the result of a processed loyalty transaction. - */ -@ApiModel(description = "In the Message Response, the result of each loyalty brand transaction. Data related to the result of a processed loyalty transaction.") -@JsonPropertyOrder({ - LoyaltyResult.JSON_PROPERTY_LOYALTY_ACCOUNT, - LoyaltyResult.JSON_PROPERTY_CURRENT_BALANCE, - LoyaltyResult.JSON_PROPERTY_LOYALTY_AMOUNT, - LoyaltyResult.JSON_PROPERTY_LOYALTY_ACQUIRER_DATA, - LoyaltyResult.JSON_PROPERTY_REBATES -}) - -public class LoyaltyResult { - public static final String JSON_PROPERTY_LOYALTY_ACCOUNT = "LoyaltyAccount"; - private LoyaltyAccount loyaltyAccount; - - public static final String JSON_PROPERTY_CURRENT_BALANCE = "CurrentBalance"; - private BigDecimal currentBalance; - - public static final String JSON_PROPERTY_LOYALTY_AMOUNT = "LoyaltyAmount"; - private LoyaltyAmount loyaltyAmount; - - public static final String JSON_PROPERTY_LOYALTY_ACQUIRER_DATA = "LoyaltyAcquirerData"; - private LoyaltyAcquirerData loyaltyAcquirerData; - - public static final String JSON_PROPERTY_REBATES = "Rebates"; - private Rebates rebates; - - public LoyaltyResult() { - } - - public LoyaltyResult loyaltyAccount(LoyaltyAccount loyaltyAccount) { - this.loyaltyAccount = loyaltyAccount; - return this; - } - - /** - * Get loyaltyAccount - * @return loyaltyAccount - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyAccount getLoyaltyAccount() { - return loyaltyAccount; - } - - - /** - * loyaltyAccount - * - * @param loyaltyAccount - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyAccount(LoyaltyAccount loyaltyAccount) { - this.loyaltyAccount = loyaltyAccount; - } - - - public LoyaltyResult currentBalance(BigDecimal currentBalance) { - this.currentBalance = currentBalance; - return this; - } - - /** - * if known (provided by the card or an external host). - * minimum: 0.0 - * maximum: 99999999.999999 - * @return currentBalance - **/ - @ApiModelProperty(value = "if known (provided by the card or an external host).") - @JsonProperty(JSON_PROPERTY_CURRENT_BALANCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getCurrentBalance() { - return currentBalance; - } - - - /** - * if known (provided by the card or an external host). - * - * @param currentBalance - */ - @JsonProperty(JSON_PROPERTY_CURRENT_BALANCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrentBalance(BigDecimal currentBalance) { - this.currentBalance = currentBalance; - } - - - public LoyaltyResult loyaltyAmount(LoyaltyAmount loyaltyAmount) { - this.loyaltyAmount = loyaltyAmount; - return this; - } - - /** - * Get loyaltyAmount - * @return loyaltyAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyAmount getLoyaltyAmount() { - return loyaltyAmount; - } - - - /** - * loyaltyAmount - * - * @param loyaltyAmount - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyAmount(LoyaltyAmount loyaltyAmount) { - this.loyaltyAmount = loyaltyAmount; - } - - - public LoyaltyResult loyaltyAcquirerData(LoyaltyAcquirerData loyaltyAcquirerData) { - this.loyaltyAcquirerData = loyaltyAcquirerData; - return this; - } - - /** - * Get loyaltyAcquirerData - * @return loyaltyAcquirerData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_ACQUIRER_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyAcquirerData getLoyaltyAcquirerData() { - return loyaltyAcquirerData; - } - - - /** - * loyaltyAcquirerData - * - * @param loyaltyAcquirerData - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_ACQUIRER_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyAcquirerData(LoyaltyAcquirerData loyaltyAcquirerData) { - this.loyaltyAcquirerData = loyaltyAcquirerData; - } - - - public LoyaltyResult rebates(Rebates rebates) { - this.rebates = rebates; - return this; - } - - /** - * Get rebates - * @return rebates - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_REBATES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Rebates getRebates() { - return rebates; - } - - - /** - * rebates - * - * @param rebates - */ - @JsonProperty(JSON_PROPERTY_REBATES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRebates(Rebates rebates) { - this.rebates = rebates; - } - - - /** - * Return true if this LoyaltyResult object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoyaltyResult loyaltyResult = (LoyaltyResult) o; - return Objects.equals(this.loyaltyAccount, loyaltyResult.loyaltyAccount) && - Objects.equals(this.currentBalance, loyaltyResult.currentBalance) && - Objects.equals(this.loyaltyAmount, loyaltyResult.loyaltyAmount) && - Objects.equals(this.loyaltyAcquirerData, loyaltyResult.loyaltyAcquirerData) && - Objects.equals(this.rebates, loyaltyResult.rebates); - } - - @Override - public int hashCode() { - return Objects.hash(loyaltyAccount, currentBalance, loyaltyAmount, loyaltyAcquirerData, rebates); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoyaltyResult {\n"); - sb.append(" loyaltyAccount: ").append(toIndentedString(loyaltyAccount)).append("\n"); - sb.append(" currentBalance: ").append(toIndentedString(currentBalance)).append("\n"); - sb.append(" loyaltyAmount: ").append(toIndentedString(loyaltyAmount)).append("\n"); - sb.append(" loyaltyAcquirerData: ").append(toIndentedString(loyaltyAcquirerData)).append("\n"); - sb.append(" rebates: ").append(toIndentedString(rebates)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of LoyaltyResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoyaltyResult - * @throws JsonProcessingException if the JSON string is invalid with respect to LoyaltyResult - */ - public static LoyaltyResult fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, LoyaltyResult.class); - } -/** - * Convert an instance of LoyaltyResult to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LoyaltyTotals.java b/src/main/java/com/adyen/model/terminal/LoyaltyTotals.java deleted file mode 100644 index 3dd582d9b..000000000 --- a/src/main/java/com/adyen/model/terminal/LoyaltyTotals.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.TransactionType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Totals of the loyalty transaction during the reconciliation period. - */ -@ApiModel(description = "Totals of the loyalty transaction during the reconciliation period.") -@JsonPropertyOrder({ - LoyaltyTotals.JSON_PROPERTY_TRANSACTION_TYPE, - LoyaltyTotals.JSON_PROPERTY_TRANSACTION_COUNT, - LoyaltyTotals.JSON_PROPERTY_TRANSACTION_AMOUNT -}) - -public class LoyaltyTotals { - public static final String JSON_PROPERTY_TRANSACTION_TYPE = "TransactionType"; - private TransactionType transactionType; - - public static final String JSON_PROPERTY_TRANSACTION_COUNT = "TransactionCount"; - private Integer transactionCount; - - public static final String JSON_PROPERTY_TRANSACTION_AMOUNT = "TransactionAmount"; - private BigDecimal transactionAmount; - - public LoyaltyTotals() { - } - - public LoyaltyTotals transactionType(TransactionType transactionType) { - this.transactionType = transactionType; - return this; - } - - /** - * Get transactionType - * @return transactionType - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_TRANSACTION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransactionType getTransactionType() { - return transactionType; - } - - - /** - * transactionType - * - * @param transactionType - */ - @JsonProperty(JSON_PROPERTY_TRANSACTION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransactionType(TransactionType transactionType) { - this.transactionType = transactionType; - } - - - public LoyaltyTotals transactionCount(Integer transactionCount) { - this.transactionCount = transactionCount; - return this; - } - - /** - * Number of processed transaction during the period. - * @return transactionCount - **/ - @ApiModelProperty(required = true, value = "Number of processed transaction during the period.") - @JsonProperty(JSON_PROPERTY_TRANSACTION_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getTransactionCount() { - return transactionCount; - } - - - /** - * Number of processed transaction during the period. - * - * @param transactionCount - */ - @JsonProperty(JSON_PROPERTY_TRANSACTION_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransactionCount(Integer transactionCount) { - this.transactionCount = transactionCount; - } - - - public LoyaltyTotals transactionAmount(BigDecimal transactionAmount) { - this.transactionAmount = transactionAmount; - return this; - } - - /** - * Sum of amount of processed transaction during the period. - * minimum: 0.0 - * maximum: 99999999.999999 - * @return transactionAmount - **/ - @ApiModelProperty(required = true, value = "Sum of amount of processed transaction during the period.") - @JsonProperty(JSON_PROPERTY_TRANSACTION_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getTransactionAmount() { - return transactionAmount; - } - - - /** - * Sum of amount of processed transaction during the period. - * - * @param transactionAmount - */ - @JsonProperty(JSON_PROPERTY_TRANSACTION_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransactionAmount(BigDecimal transactionAmount) { - this.transactionAmount = transactionAmount; - } - - - /** - * Return true if this LoyaltyTotals object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoyaltyTotals loyaltyTotals = (LoyaltyTotals) o; - return Objects.equals(this.transactionType, loyaltyTotals.transactionType) && - Objects.equals(this.transactionCount, loyaltyTotals.transactionCount) && - Objects.equals(this.transactionAmount, loyaltyTotals.transactionAmount); - } - - @Override - public int hashCode() { - return Objects.hash(transactionType, transactionCount, transactionAmount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoyaltyTotals {\n"); - sb.append(" transactionType: ").append(toIndentedString(transactionType)).append("\n"); - sb.append(" transactionCount: ").append(toIndentedString(transactionCount)).append("\n"); - sb.append(" transactionAmount: ").append(toIndentedString(transactionAmount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of LoyaltyTotals given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoyaltyTotals - * @throws JsonProcessingException if the JSON string is invalid with respect to LoyaltyTotals - */ - public static LoyaltyTotals fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, LoyaltyTotals.class); - } -/** - * Convert an instance of LoyaltyTotals to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LoyaltyTransaction.java b/src/main/java/com/adyen/model/terminal/LoyaltyTransaction.java deleted file mode 100644 index b6f043442..000000000 --- a/src/main/java/com/adyen/model/terminal/LoyaltyTransaction.java +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyTransactionType; -import com.adyen.model.terminal.OriginalPOITransaction; -import com.adyen.model.terminal.SaleItem; -import com.adyen.model.terminal.TransactionConditions; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * LoyaltyTransaction - */ -@JsonPropertyOrder({ - LoyaltyTransaction.JSON_PROPERTY_LOYALTY_TRANSACTION_TYPE, - LoyaltyTransaction.JSON_PROPERTY_CURRENCY, - LoyaltyTransaction.JSON_PROPERTY_TOTAL_AMOUNT, - LoyaltyTransaction.JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION, - LoyaltyTransaction.JSON_PROPERTY_TRANSACTION_CONDITIONS, - LoyaltyTransaction.JSON_PROPERTY_SALE_ITEM -}) - -public class LoyaltyTransaction { - public static final String JSON_PROPERTY_LOYALTY_TRANSACTION_TYPE = "LoyaltyTransactionType"; - private LoyaltyTransactionType loyaltyTransactionType; - - public static final String JSON_PROPERTY_CURRENCY = "Currency"; - private String currency; - - public static final String JSON_PROPERTY_TOTAL_AMOUNT = "TotalAmount"; - private BigDecimal totalAmount; - - public static final String JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION = "OriginalPOITransaction"; - private OriginalPOITransaction originalPOITransaction; - - public static final String JSON_PROPERTY_TRANSACTION_CONDITIONS = "TransactionConditions"; - private TransactionConditions transactionConditions; - - public static final String JSON_PROPERTY_SALE_ITEM = "SaleItem"; - private List saleItem = null; - - public LoyaltyTransaction() { - } - - public LoyaltyTransaction loyaltyTransactionType(LoyaltyTransactionType loyaltyTransactionType) { - this.loyaltyTransactionType = loyaltyTransactionType; - return this; - } - - /** - * Get loyaltyTransactionType - * @return loyaltyTransactionType - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_TRANSACTION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyTransactionType getLoyaltyTransactionType() { - return loyaltyTransactionType; - } - - - /** - * loyaltyTransactionType - * - * @param loyaltyTransactionType - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_TRANSACTION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyTransactionType(LoyaltyTransactionType loyaltyTransactionType) { - this.loyaltyTransactionType = loyaltyTransactionType; - } - - - public LoyaltyTransaction currency(String currency) { - this.currency = currency; - return this; - } - - /** - * Get currency - * @return currency - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCurrency() { - return currency; - } - - - /** - * currency - * - * @param currency - */ - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrency(String currency) { - this.currency = currency; - } - - - public LoyaltyTransaction totalAmount(BigDecimal totalAmount) { - this.totalAmount = totalAmount; - return this; - } - - /** - * Get totalAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return totalAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TOTAL_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getTotalAmount() { - return totalAmount; - } - - - /** - * totalAmount - * - * @param totalAmount - */ - @JsonProperty(JSON_PROPERTY_TOTAL_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotalAmount(BigDecimal totalAmount) { - this.totalAmount = totalAmount; - } - - - public LoyaltyTransaction originalPOITransaction(OriginalPOITransaction originalPOITransaction) { - this.originalPOITransaction = originalPOITransaction; - return this; - } - - /** - * Get originalPOITransaction - * @return originalPOITransaction - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OriginalPOITransaction getOriginalPOITransaction() { - return originalPOITransaction; - } - - - /** - * originalPOITransaction - * - * @param originalPOITransaction - */ - @JsonProperty(JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalPOITransaction(OriginalPOITransaction originalPOITransaction) { - this.originalPOITransaction = originalPOITransaction; - } - - - public LoyaltyTransaction transactionConditions(TransactionConditions transactionConditions) { - this.transactionConditions = transactionConditions; - return this; - } - - /** - * Get transactionConditions - * @return transactionConditions - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TRANSACTION_CONDITIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransactionConditions getTransactionConditions() { - return transactionConditions; - } - - - /** - * transactionConditions - * - * @param transactionConditions - */ - @JsonProperty(JSON_PROPERTY_TRANSACTION_CONDITIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransactionConditions(TransactionConditions transactionConditions) { - this.transactionConditions = transactionConditions; - } - - - public LoyaltyTransaction saleItem(List saleItem) { - this.saleItem = saleItem; - return this; - } - - public LoyaltyTransaction addSaleItemItem(SaleItem saleItemItem) { - if (this.saleItem == null) { - this.saleItem = new ArrayList<>(); - } - this.saleItem.add(saleItemItem); - return this; - } - - /** - * Get saleItem - * @return saleItem - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SALE_ITEM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getSaleItem() { - return saleItem; - } - - - /** - * saleItem - * - * @param saleItem - */ - @JsonProperty(JSON_PROPERTY_SALE_ITEM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleItem(List saleItem) { - this.saleItem = saleItem; - } - - - /** - * Return true if this LoyaltyTransaction object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoyaltyTransaction loyaltyTransaction = (LoyaltyTransaction) o; - return Objects.equals(this.loyaltyTransactionType, loyaltyTransaction.loyaltyTransactionType) && - Objects.equals(this.currency, loyaltyTransaction.currency) && - Objects.equals(this.totalAmount, loyaltyTransaction.totalAmount) && - Objects.equals(this.originalPOITransaction, loyaltyTransaction.originalPOITransaction) && - Objects.equals(this.transactionConditions, loyaltyTransaction.transactionConditions) && - Objects.equals(this.saleItem, loyaltyTransaction.saleItem); - } - - @Override - public int hashCode() { - return Objects.hash(loyaltyTransactionType, currency, totalAmount, originalPOITransaction, transactionConditions, saleItem); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoyaltyTransaction {\n"); - sb.append(" loyaltyTransactionType: ").append(toIndentedString(loyaltyTransactionType)).append("\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append(" totalAmount: ").append(toIndentedString(totalAmount)).append("\n"); - sb.append(" originalPOITransaction: ").append(toIndentedString(originalPOITransaction)).append("\n"); - sb.append(" transactionConditions: ").append(toIndentedString(transactionConditions)).append("\n"); - sb.append(" saleItem: ").append(toIndentedString(saleItem)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of LoyaltyTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoyaltyTransaction - * @throws JsonProcessingException if the JSON string is invalid with respect to LoyaltyTransaction - */ - public static LoyaltyTransaction fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, LoyaltyTransaction.class); - } -/** - * Convert an instance of LoyaltyTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LoyaltyTransactionType.java b/src/main/java/com/adyen/model/terminal/LoyaltyTransactionType.java deleted file mode 100644 index 6a84b1578..000000000 --- a/src/main/java/com/adyen/model/terminal/LoyaltyTransactionType.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets LoyaltyTransactionType - */ -public enum LoyaltyTransactionType { - - AWARD("Award"), - - AWARDREFUND("AwardRefund"), - - REBATE("Rebate"), - - REBATEREFUND("RebateRefund"), - - REDEMPTION("Redemption"), - - REDEMPTIONREFUND("RedemptionRefund"); - - private String value; - - LoyaltyTransactionType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static LoyaltyTransactionType fromValue(String value) { - for (LoyaltyTransactionType b : LoyaltyTransactionType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/LoyaltyUnit.java b/src/main/java/com/adyen/model/terminal/LoyaltyUnit.java deleted file mode 100644 index 4c00d40f6..000000000 --- a/src/main/java/com/adyen/model/terminal/LoyaltyUnit.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets LoyaltyUnit - */ -public enum LoyaltyUnit { - - MONETARY("Monetary"), - - POINT("Point"); - - private String value; - - LoyaltyUnit(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static LoyaltyUnit fromValue(String value) { - for (LoyaltyUnit b : LoyaltyUnit.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/MenuEntry.java b/src/main/java/com/adyen/model/terminal/MenuEntry.java deleted file mode 100644 index 428f8d7d0..000000000 --- a/src/main/java/com/adyen/model/terminal/MenuEntry.java +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.MenuEntryTag; -import com.adyen.model.terminal.OutputFormat; -import com.adyen.model.terminal.OutputText; -import com.adyen.model.terminal.PredefinedContent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys message text and parameters of the menu entry. This output data could be only provided for an input command, in order to choose an entryof the menu. An entryof the menu to present to the Cashier. - */ -@ApiModel(description = "It conveys message text and parameters of the menu entry. This output data could be only provided for an input command, in order to choose an entryof the menu. An entryof the menu to present to the Cashier.") -@JsonPropertyOrder({ - MenuEntry.JSON_PROPERTY_MENU_ENTRY_TAG, - MenuEntry.JSON_PROPERTY_DEFAULT_SELECTED_FLAG, - MenuEntry.JSON_PROPERTY_OUTPUT_FORMAT, - MenuEntry.JSON_PROPERTY_PREDEFINED_CONTENT, - MenuEntry.JSON_PROPERTY_OUTPUT_TEXT, - MenuEntry.JSON_PROPERTY_OUTPUT_X_H_T_M_L -}) - -public class MenuEntry { - public static final String JSON_PROPERTY_MENU_ENTRY_TAG = "MenuEntryTag"; - private MenuEntryTag menuEntryTag; - - public static final String JSON_PROPERTY_DEFAULT_SELECTED_FLAG = "DefaultSelectedFlag"; - private Boolean defaultSelectedFlag = false; - - public static final String JSON_PROPERTY_OUTPUT_FORMAT = "OutputFormat"; - private OutputFormat outputFormat; - - public static final String JSON_PROPERTY_PREDEFINED_CONTENT = "PredefinedContent"; - private PredefinedContent predefinedContent; - - public static final String JSON_PROPERTY_OUTPUT_TEXT = "OutputText"; - private List outputText = null; - - public static final String JSON_PROPERTY_OUTPUT_X_H_T_M_L = "OutputXHTML"; - private byte[] outputXHTML; - - public MenuEntry() { - } - - public MenuEntry menuEntryTag(MenuEntryTag menuEntryTag) { - this.menuEntryTag = menuEntryTag; - return this; - } - - /** - * Get menuEntryTag - * @return menuEntryTag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MENU_ENTRY_TAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public MenuEntryTag getMenuEntryTag() { - return menuEntryTag; - } - - - /** - * menuEntryTag - * - * @param menuEntryTag - */ - @JsonProperty(JSON_PROPERTY_MENU_ENTRY_TAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMenuEntryTag(MenuEntryTag menuEntryTag) { - this.menuEntryTag = menuEntryTag; - } - - - public MenuEntry defaultSelectedFlag(Boolean defaultSelectedFlag) { - this.defaultSelectedFlag = defaultSelectedFlag; - return this; - } - - /** - * Get defaultSelectedFlag - * @return defaultSelectedFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DEFAULT_SELECTED_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDefaultSelectedFlag() { - return defaultSelectedFlag; - } - - - /** - * defaultSelectedFlag - * - * @param defaultSelectedFlag - */ - @JsonProperty(JSON_PROPERTY_DEFAULT_SELECTED_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDefaultSelectedFlag(Boolean defaultSelectedFlag) { - this.defaultSelectedFlag = defaultSelectedFlag; - } - - - public MenuEntry outputFormat(OutputFormat outputFormat) { - this.outputFormat = outputFormat; - return this; - } - - /** - * Get outputFormat - * @return outputFormat - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_OUTPUT_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OutputFormat getOutputFormat() { - return outputFormat; - } - - - /** - * outputFormat - * - * @param outputFormat - */ - @JsonProperty(JSON_PROPERTY_OUTPUT_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutputFormat(OutputFormat outputFormat) { - this.outputFormat = outputFormat; - } - - - public MenuEntry predefinedContent(PredefinedContent predefinedContent) { - this.predefinedContent = predefinedContent; - return this; - } - - /** - * Get predefinedContent - * @return predefinedContent - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREDEFINED_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PredefinedContent getPredefinedContent() { - return predefinedContent; - } - - - /** - * predefinedContent - * - * @param predefinedContent - */ - @JsonProperty(JSON_PROPERTY_PREDEFINED_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPredefinedContent(PredefinedContent predefinedContent) { - this.predefinedContent = predefinedContent; - } - - - public MenuEntry outputText(List outputText) { - this.outputText = outputText; - return this; - } - - public MenuEntry addOutputTextItem(OutputText outputTextItem) { - if (this.outputText == null) { - this.outputText = new ArrayList<>(); - } - this.outputText.add(outputTextItem); - return this; - } - - /** - * Get outputText - * @return outputText - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_OUTPUT_TEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getOutputText() { - return outputText; - } - - - /** - * outputText - * - * @param outputText - */ - @JsonProperty(JSON_PROPERTY_OUTPUT_TEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutputText(List outputText) { - this.outputText = outputText; - } - - - public MenuEntry outputXHTML(byte[] outputXHTML) { - this.outputXHTML = outputXHTML; - return this; - } - - /** - * Get outputXHTML - * @return outputXHTML - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_OUTPUT_X_H_T_M_L) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getOutputXHTML() { - return outputXHTML; - } - - - /** - * outputXHTML - * - * @param outputXHTML - */ - @JsonProperty(JSON_PROPERTY_OUTPUT_X_H_T_M_L) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutputXHTML(byte[] outputXHTML) { - this.outputXHTML = outputXHTML; - } - - - /** - * Return true if this MenuEntry object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MenuEntry menuEntry = (MenuEntry) o; - return Objects.equals(this.menuEntryTag, menuEntry.menuEntryTag) && - Objects.equals(this.defaultSelectedFlag, menuEntry.defaultSelectedFlag) && - Objects.equals(this.outputFormat, menuEntry.outputFormat) && - Objects.equals(this.predefinedContent, menuEntry.predefinedContent) && - Objects.equals(this.outputText, menuEntry.outputText) && - Arrays.equals(this.outputXHTML, menuEntry.outputXHTML); - } - - @Override - public int hashCode() { - return Objects.hash(menuEntryTag, defaultSelectedFlag, outputFormat, predefinedContent, outputText, Arrays.hashCode(outputXHTML)); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MenuEntry {\n"); - sb.append(" menuEntryTag: ").append(toIndentedString(menuEntryTag)).append("\n"); - sb.append(" defaultSelectedFlag: ").append(toIndentedString(defaultSelectedFlag)).append("\n"); - sb.append(" outputFormat: ").append(toIndentedString(outputFormat)).append("\n"); - sb.append(" predefinedContent: ").append(toIndentedString(predefinedContent)).append("\n"); - sb.append(" outputText: ").append(toIndentedString(outputText)).append("\n"); - sb.append(" outputXHTML: ").append(toIndentedString(outputXHTML)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of MenuEntry given an JSON string - * - * @param jsonString JSON string - * @return An instance of MenuEntry - * @throws JsonProcessingException if the JSON string is invalid with respect to MenuEntry - */ - public static MenuEntry fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, MenuEntry.class); - } -/** - * Convert an instance of MenuEntry to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/MenuEntryTag.java b/src/main/java/com/adyen/model/terminal/MenuEntryTag.java deleted file mode 100644 index 8ddf5f14b..000000000 --- a/src/main/java/com/adyen/model/terminal/MenuEntryTag.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import io.swagger.annotations.ApiModel; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Characteristics related to the selection of a menu entry. - */ -public enum MenuEntryTag { - - NONSELECTABLE("NonSelectable"), - - NONSELECTABLESUBMENU("NonSelectableSubMenu"), - - SELECTABLE("Selectable"), - - SUBMENU("SubMenu"); - - private String value; - - MenuEntryTag(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static MenuEntryTag fromValue(String value) { - for (MenuEntryTag b : MenuEntryTag.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/MessageCategory.java b/src/main/java/com/adyen/model/terminal/MessageCategory.java deleted file mode 100644 index 86af37a6f..000000000 --- a/src/main/java/com/adyen/model/terminal/MessageCategory.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets MessageCategory - */ -public enum MessageCategory { - - ABORT("Abort"), - - ADMIN("Admin"), - - BALANCEINQUIRY("BalanceInquiry"), - - CARDACQUISITION("CardAcquisition"), - - CARDREADERAPDU("CardReaderAPDU"), - - DIAGNOSIS("Diagnosis"), - - DISPLAY("Display"), - - ENABLESERVICE("EnableService"), - - EVENT("Event"), - - GETTOTALS("GetTotals"), - - INPUT("Input"), - - INPUTUPDATE("InputUpdate"), - - LOGIN("Login"), - - LOGOUT("Logout"), - - LOYALTY("Loyalty"), - - PAYMENT("Payment"), - - PRINT("Print"), - - RECONCILIATION("Reconciliation"), - - REVERSAL("Reversal"), - - STOREDVALUE("StoredValue"), - - TRANSACTIONSTATUS("TransactionStatus"); - - private String value; - - MessageCategory(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static MessageCategory fromValue(String value) { - for (MessageCategory b : MessageCategory.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/MessageClass.java b/src/main/java/com/adyen/model/terminal/MessageClass.java deleted file mode 100644 index 3095e7e45..000000000 --- a/src/main/java/com/adyen/model/terminal/MessageClass.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets MessageClass - */ -public enum MessageClass { - - DEVICE("Device"), - - EVENT("Event"), - - SERVICE("Service"); - - private String value; - - MessageClass(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static MessageClass fromValue(String value) { - for (MessageClass b : MessageClass.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/MessageHeader.java b/src/main/java/com/adyen/model/terminal/MessageHeader.java deleted file mode 100644 index e163c43d8..000000000 --- a/src/main/java/com/adyen/model/terminal/MessageHeader.java +++ /dev/null @@ -1,389 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.MessageCategory; -import com.adyen.model.terminal.MessageClass; -import com.adyen.model.terminal.MessageType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the Sale to POI protocol management. Message header of the Sale to POI protocol message. - */ -@ApiModel(description = "It conveys Information related to the Sale to POI protocol management. Message header of the Sale to POI protocol message.") -@JsonPropertyOrder({ - MessageHeader.JSON_PROPERTY_PROTOCOL_VERSION, - MessageHeader.JSON_PROPERTY_MESSAGE_CLASS, - MessageHeader.JSON_PROPERTY_MESSAGE_CATEGORY, - MessageHeader.JSON_PROPERTY_MESSAGE_TYPE, - MessageHeader.JSON_PROPERTY_SERVICE_I_D, - MessageHeader.JSON_PROPERTY_DEVICE_I_D, - MessageHeader.JSON_PROPERTY_SALE_I_D, - MessageHeader.JSON_PROPERTY_P_O_I_I_D -}) - -public class MessageHeader { - public static final String JSON_PROPERTY_PROTOCOL_VERSION = "ProtocolVersion"; - private String protocolVersion; - - public static final String JSON_PROPERTY_MESSAGE_CLASS = "MessageClass"; - private MessageClass messageClass; - - public static final String JSON_PROPERTY_MESSAGE_CATEGORY = "MessageCategory"; - private MessageCategory messageCategory; - - public static final String JSON_PROPERTY_MESSAGE_TYPE = "MessageType"; - private MessageType messageType; - - public static final String JSON_PROPERTY_SERVICE_I_D = "ServiceID"; - private String serviceID; - - public static final String JSON_PROPERTY_DEVICE_I_D = "DeviceID"; - private String deviceID; - - public static final String JSON_PROPERTY_SALE_I_D = "SaleID"; - private String saleID; - - public static final String JSON_PROPERTY_P_O_I_I_D = "POIID"; - private String POIID; - - public MessageHeader() { - } - - public MessageHeader protocolVersion(String protocolVersion) { - this.protocolVersion = protocolVersion; - return this; - } - - /** - * If MessageCategory is Login or Diagnosis. - * @return protocolVersion - **/ - @ApiModelProperty(value = "If MessageCategory is Login or Diagnosis.") - @JsonProperty(JSON_PROPERTY_PROTOCOL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getProtocolVersion() { - return protocolVersion; - } - - - /** - * If MessageCategory is Login or Diagnosis. - * - * @param protocolVersion - */ - @JsonProperty(JSON_PROPERTY_PROTOCOL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProtocolVersion(String protocolVersion) { - this.protocolVersion = protocolVersion; - } - - - public MessageHeader messageClass(MessageClass messageClass) { - this.messageClass = messageClass; - return this; - } - - /** - * Get messageClass - * @return messageClass - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_MESSAGE_CLASS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public MessageClass getMessageClass() { - return messageClass; - } - - - /** - * messageClass - * - * @param messageClass - */ - @JsonProperty(JSON_PROPERTY_MESSAGE_CLASS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessageClass(MessageClass messageClass) { - this.messageClass = messageClass; - } - - - public MessageHeader messageCategory(MessageCategory messageCategory) { - this.messageCategory = messageCategory; - return this; - } - - /** - * Get messageCategory - * @return messageCategory - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_MESSAGE_CATEGORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public MessageCategory getMessageCategory() { - return messageCategory; - } - - - /** - * messageCategory - * - * @param messageCategory - */ - @JsonProperty(JSON_PROPERTY_MESSAGE_CATEGORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessageCategory(MessageCategory messageCategory) { - this.messageCategory = messageCategory; - } - - - public MessageHeader messageType(MessageType messageType) { - this.messageType = messageType; - return this; - } - - /** - * Get messageType - * @return messageType - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_MESSAGE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public MessageType getMessageType() { - return messageType; - } - - - /** - * messageType - * - * @param messageType - */ - @JsonProperty(JSON_PROPERTY_MESSAGE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessageType(MessageType messageType) { - this.messageType = messageType; - } - - - public MessageHeader serviceID(String serviceID) { - this.serviceID = serviceID; - return this; - } - - /** - * Required if Service or Event MessageClass message or if Device MessageClass and request from POI or response from Sale. - * @return serviceID - **/ - @ApiModelProperty(value = "Required if Service or Event MessageClass message or if Device MessageClass and request from POI or response from Sale.") - @JsonProperty(JSON_PROPERTY_SERVICE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getServiceID() { - return serviceID; - } - - - /** - * Required if Service or Event MessageClass message or if Device MessageClass and request from POI or response from Sale. - * - * @param serviceID - */ - @JsonProperty(JSON_PROPERTY_SERVICE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setServiceID(String serviceID) { - this.serviceID = serviceID; - } - - - public MessageHeader deviceID(String deviceID) { - this.deviceID = deviceID; - return this; - } - - /** - * If Device MessageClass. - * @return deviceID - **/ - @ApiModelProperty(value = "If Device MessageClass.") - @JsonProperty(JSON_PROPERTY_DEVICE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getDeviceID() { - return deviceID; - } - - - /** - * If Device MessageClass. - * - * @param deviceID - */ - @JsonProperty(JSON_PROPERTY_DEVICE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeviceID(String deviceID) { - this.deviceID = deviceID; - } - - - public MessageHeader saleID(String saleID) { - this.saleID = saleID; - return this; - } - - /** - * Identification of a Sale System or a Sale Terminal for the Sale to POI protocol. - * @return saleID - **/ - @ApiModelProperty(required = true, value = "Identification of a Sale System or a Sale Terminal for the Sale to POI protocol.") - @JsonProperty(JSON_PROPERTY_SALE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSaleID() { - return saleID; - } - - - /** - * Identification of a Sale System or a Sale Terminal for the Sale to POI protocol. - * - * @param saleID - */ - @JsonProperty(JSON_PROPERTY_SALE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleID(String saleID) { - this.saleID = saleID; - } - - - public MessageHeader POIID(String POIID) { - this.POIID = POIID; - return this; - } - - /** - * Identification of a POI System or a POI Terminal for the Sale to POI protocol. - * @return POIID - **/ - @ApiModelProperty(required = true, value = "Identification of a POI System or a POI Terminal for the Sale to POI protocol.") - @JsonProperty(JSON_PROPERTY_P_O_I_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPOIID() { - return POIID; - } - - - /** - * Identification of a POI System or a POI Terminal for the Sale to POI protocol. - * - * @param POIID - */ - @JsonProperty(JSON_PROPERTY_P_O_I_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPOIID(String POIID) { - this.POIID = POIID; - } - - - /** - * Return true if this MessageHeader object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MessageHeader messageHeader = (MessageHeader) o; - return Objects.equals(this.protocolVersion, messageHeader.protocolVersion) && - Objects.equals(this.messageClass, messageHeader.messageClass) && - Objects.equals(this.messageCategory, messageHeader.messageCategory) && - Objects.equals(this.messageType, messageHeader.messageType) && - Objects.equals(this.serviceID, messageHeader.serviceID) && - Objects.equals(this.deviceID, messageHeader.deviceID) && - Objects.equals(this.saleID, messageHeader.saleID) && - Objects.equals(this.POIID, messageHeader.POIID); - } - - @Override - public int hashCode() { - return Objects.hash(protocolVersion, messageClass, messageCategory, messageType, serviceID, deviceID, saleID, POIID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MessageHeader {\n"); - sb.append(" protocolVersion: ").append(toIndentedString(protocolVersion)).append("\n"); - sb.append(" messageClass: ").append(toIndentedString(messageClass)).append("\n"); - sb.append(" messageCategory: ").append(toIndentedString(messageCategory)).append("\n"); - sb.append(" messageType: ").append(toIndentedString(messageType)).append("\n"); - sb.append(" serviceID: ").append(toIndentedString(serviceID)).append("\n"); - sb.append(" deviceID: ").append(toIndentedString(deviceID)).append("\n"); - sb.append(" saleID: ").append(toIndentedString(saleID)).append("\n"); - sb.append(" POIID: ").append(toIndentedString(POIID)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of MessageHeader given an JSON string - * - * @param jsonString JSON string - * @return An instance of MessageHeader - * @throws JsonProcessingException if the JSON string is invalid with respect to MessageHeader - */ - public static MessageHeader fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, MessageHeader.class); - } -/** - * Convert an instance of MessageHeader to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/MessageReference.java b/src/main/java/com/adyen/model/terminal/MessageReference.java deleted file mode 100644 index 9b9ccea5a..000000000 --- a/src/main/java/com/adyen/model/terminal/MessageReference.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.MessageCategory; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * To abort a transaction in progress or to request the status of a transaction from which no response has been received. It identifies the message header of the message request to abort or request the status. Identification of a previous POI transaction. - */ -@ApiModel(description = "To abort a transaction in progress or to request the status of a transaction from which no response has been received. It identifies the message header of the message request to abort or request the status. Identification of a previous POI transaction.") -@JsonPropertyOrder({ - MessageReference.JSON_PROPERTY_MESSAGE_CATEGORY, - MessageReference.JSON_PROPERTY_SERVICE_I_D, - MessageReference.JSON_PROPERTY_DEVICE_I_D, - MessageReference.JSON_PROPERTY_SALE_I_D, - MessageReference.JSON_PROPERTY_P_O_I_I_D -}) - -public class MessageReference { - public static final String JSON_PROPERTY_MESSAGE_CATEGORY = "MessageCategory"; - private MessageCategory messageCategory; - - public static final String JSON_PROPERTY_SERVICE_I_D = "ServiceID"; - private String serviceID; - - public static final String JSON_PROPERTY_DEVICE_I_D = "DeviceID"; - private String deviceID; - - public static final String JSON_PROPERTY_SALE_I_D = "SaleID"; - private String saleID; - - public static final String JSON_PROPERTY_P_O_I_I_D = "POIID"; - private String POIID; - - public MessageReference() { - } - - public MessageReference messageCategory(MessageCategory messageCategory) { - this.messageCategory = messageCategory; - return this; - } - - /** - * Get messageCategory - * @return messageCategory - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MESSAGE_CATEGORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public MessageCategory getMessageCategory() { - return messageCategory; - } - - - /** - * messageCategory - * - * @param messageCategory - */ - @JsonProperty(JSON_PROPERTY_MESSAGE_CATEGORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessageCategory(MessageCategory messageCategory) { - this.messageCategory = messageCategory; - } - - - public MessageReference serviceID(String serviceID) { - this.serviceID = serviceID; - return this; - } - - /** - * Identification of a message pair, which processes a transaction. - * @return serviceID - **/ - @ApiModelProperty(value = "Identification of a message pair, which processes a transaction.") - @JsonProperty(JSON_PROPERTY_SERVICE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getServiceID() { - return serviceID; - } - - - /** - * Identification of a message pair, which processes a transaction. - * - * @param serviceID - */ - @JsonProperty(JSON_PROPERTY_SERVICE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setServiceID(String serviceID) { - this.serviceID = serviceID; - } - - - public MessageReference deviceID(String deviceID) { - this.deviceID = deviceID; - return this; - } - - /** - * Identification of a device message pair. - * @return deviceID - **/ - @ApiModelProperty(value = "Identification of a device message pair.") - @JsonProperty(JSON_PROPERTY_DEVICE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getDeviceID() { - return deviceID; - } - - - /** - * Identification of a device message pair. - * - * @param deviceID - */ - @JsonProperty(JSON_PROPERTY_DEVICE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeviceID(String deviceID) { - this.deviceID = deviceID; - } - - - public MessageReference saleID(String saleID) { - this.saleID = saleID; - return this; - } - - /** - * default MessageHeader.SaleID. - * @return saleID - **/ - @ApiModelProperty(value = "default MessageHeader.SaleID.") - @JsonProperty(JSON_PROPERTY_SALE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSaleID() { - return saleID; - } - - - /** - * default MessageHeader.SaleID. - * - * @param saleID - */ - @JsonProperty(JSON_PROPERTY_SALE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleID(String saleID) { - this.saleID = saleID; - } - - - public MessageReference POIID(String POIID) { - this.POIID = POIID; - return this; - } - - /** - * default MessageHeader.POIID. - * @return POIID - **/ - @ApiModelProperty(value = "default MessageHeader.POIID.") - @JsonProperty(JSON_PROPERTY_P_O_I_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPOIID() { - return POIID; - } - - - /** - * default MessageHeader.POIID. - * - * @param POIID - */ - @JsonProperty(JSON_PROPERTY_P_O_I_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPOIID(String POIID) { - this.POIID = POIID; - } - - - /** - * Return true if this MessageReference object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MessageReference messageReference = (MessageReference) o; - return Objects.equals(this.messageCategory, messageReference.messageCategory) && - Objects.equals(this.serviceID, messageReference.serviceID) && - Objects.equals(this.deviceID, messageReference.deviceID) && - Objects.equals(this.saleID, messageReference.saleID) && - Objects.equals(this.POIID, messageReference.POIID); - } - - @Override - public int hashCode() { - return Objects.hash(messageCategory, serviceID, deviceID, saleID, POIID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MessageReference {\n"); - sb.append(" messageCategory: ").append(toIndentedString(messageCategory)).append("\n"); - sb.append(" serviceID: ").append(toIndentedString(serviceID)).append("\n"); - sb.append(" deviceID: ").append(toIndentedString(deviceID)).append("\n"); - sb.append(" saleID: ").append(toIndentedString(saleID)).append("\n"); - sb.append(" POIID: ").append(toIndentedString(POIID)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of MessageReference given an JSON string - * - * @param jsonString JSON string - * @return An instance of MessageReference - * @throws JsonProcessingException if the JSON string is invalid with respect to MessageReference - */ - public static MessageReference fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, MessageReference.class); - } -/** - * Convert an instance of MessageReference to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/MessageType.java b/src/main/java/com/adyen/model/terminal/MessageType.java deleted file mode 100644 index 63b5bc954..000000000 --- a/src/main/java/com/adyen/model/terminal/MessageType.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets MessageType - */ -public enum MessageType { - - NOTIFICATION("Notification"), - - REQUEST("Request"), - - RESPONSE("Response"); - - private String value; - - MessageType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static MessageType fromValue(String value) { - for (MessageType b : MessageType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/MobileData.java b/src/main/java/com/adyen/model/terminal/MobileData.java deleted file mode 100644 index 5f738c844..000000000 --- a/src/main/java/com/adyen/model/terminal/MobileData.java +++ /dev/null @@ -1,320 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.Geolocation; -import com.adyen.model.terminal.SensitiveMobileData; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Mobile phone is used as a payment instrument for the transaction. Information related to the mobile for the payment transaction. - */ -@ApiModel(description = "Mobile phone is used as a payment instrument for the transaction. Information related to the mobile for the payment transaction.") -@JsonPropertyOrder({ - MobileData.JSON_PROPERTY_MOBILE_COUNTRY_CODE, - MobileData.JSON_PROPERTY_MOBILE_NETWORK_CODE, - MobileData.JSON_PROPERTY_MASKED_M_S_I_S_D_N, - MobileData.JSON_PROPERTY_GEOLOCATION, - MobileData.JSON_PROPERTY_PROTECTED_MOBILE_DATA, - MobileData.JSON_PROPERTY_SENSITIVE_MOBILE_DATA -}) - -public class MobileData { - public static final String JSON_PROPERTY_MOBILE_COUNTRY_CODE = "MobileCountryCode"; - private Integer mobileCountryCode; - - public static final String JSON_PROPERTY_MOBILE_NETWORK_CODE = "MobileNetworkCode"; - private Integer mobileNetworkCode; - - public static final String JSON_PROPERTY_MASKED_M_S_I_S_D_N = "MaskedMSISDN"; - private Integer maskedMSISDN; - - public static final String JSON_PROPERTY_GEOLOCATION = "Geolocation"; - private Geolocation geolocation; - - public static final String JSON_PROPERTY_PROTECTED_MOBILE_DATA = "ProtectedMobileData"; - private String protectedMobileData; - - public static final String JSON_PROPERTY_SENSITIVE_MOBILE_DATA = "SensitiveMobileData"; - private SensitiveMobileData sensitiveMobileData; - - public MobileData() { - } - - public MobileData mobileCountryCode(Integer mobileCountryCode) { - this.mobileCountryCode = mobileCountryCode; - return this; - } - - /** - * If data available. - * minimum: 3 - * maximum: 3 - * @return mobileCountryCode - **/ - @ApiModelProperty(value = "If data available.") - @JsonProperty(JSON_PROPERTY_MOBILE_COUNTRY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getMobileCountryCode() { - return mobileCountryCode; - } - - - /** - * If data available. - * - * @param mobileCountryCode - */ - @JsonProperty(JSON_PROPERTY_MOBILE_COUNTRY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMobileCountryCode(Integer mobileCountryCode) { - this.mobileCountryCode = mobileCountryCode; - } - - - public MobileData mobileNetworkCode(Integer mobileNetworkCode) { - this.mobileNetworkCode = mobileNetworkCode; - return this; - } - - /** - * If data available. - * minimum: 2 - * maximum: 3 - * @return mobileNetworkCode - **/ - @ApiModelProperty(value = "If data available.") - @JsonProperty(JSON_PROPERTY_MOBILE_NETWORK_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getMobileNetworkCode() { - return mobileNetworkCode; - } - - - /** - * If data available. - * - * @param mobileNetworkCode - */ - @JsonProperty(JSON_PROPERTY_MOBILE_NETWORK_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMobileNetworkCode(Integer mobileNetworkCode) { - this.mobileNetworkCode = mobileNetworkCode; - } - - - public MobileData maskedMSISDN(Integer maskedMSISDN) { - this.maskedMSISDN = maskedMSISDN; - return this; - } - - /** - * If data available. - * @return maskedMSISDN - **/ - @ApiModelProperty(value = "If data available.") - @JsonProperty(JSON_PROPERTY_MASKED_M_S_I_S_D_N) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getMaskedMSISDN() { - return maskedMSISDN; - } - - - /** - * If data available. - * - * @param maskedMSISDN - */ - @JsonProperty(JSON_PROPERTY_MASKED_M_S_I_S_D_N) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMaskedMSISDN(Integer maskedMSISDN) { - this.maskedMSISDN = maskedMSISDN; - } - - - public MobileData geolocation(Geolocation geolocation) { - this.geolocation = geolocation; - return this; - } - - /** - * Get geolocation - * @return geolocation - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_GEOLOCATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Geolocation getGeolocation() { - return geolocation; - } - - - /** - * geolocation - * - * @param geolocation - */ - @JsonProperty(JSON_PROPERTY_GEOLOCATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGeolocation(Geolocation geolocation) { - this.geolocation = geolocation; - } - - - public MobileData protectedMobileData(String protectedMobileData) { - this.protectedMobileData = protectedMobileData; - return this; - } - - /** - * SensitiveMobileData. - * @return protectedMobileData - **/ - @ApiModelProperty(value = "SensitiveMobileData.") - @JsonProperty(JSON_PROPERTY_PROTECTED_MOBILE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getProtectedMobileData() { - return protectedMobileData; - } - - - /** - * SensitiveMobileData. - * - * @param protectedMobileData - */ - @JsonProperty(JSON_PROPERTY_PROTECTED_MOBILE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProtectedMobileData(String protectedMobileData) { - this.protectedMobileData = protectedMobileData; - } - - - public MobileData sensitiveMobileData(SensitiveMobileData sensitiveMobileData) { - this.sensitiveMobileData = sensitiveMobileData; - return this; - } - - /** - * Get sensitiveMobileData - * @return sensitiveMobileData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SENSITIVE_MOBILE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SensitiveMobileData getSensitiveMobileData() { - return sensitiveMobileData; - } - - - /** - * sensitiveMobileData - * - * @param sensitiveMobileData - */ - @JsonProperty(JSON_PROPERTY_SENSITIVE_MOBILE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSensitiveMobileData(SensitiveMobileData sensitiveMobileData) { - this.sensitiveMobileData = sensitiveMobileData; - } - - - /** - * Return true if this MobileData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MobileData mobileData = (MobileData) o; - return Objects.equals(this.mobileCountryCode, mobileData.mobileCountryCode) && - Objects.equals(this.mobileNetworkCode, mobileData.mobileNetworkCode) && - Objects.equals(this.maskedMSISDN, mobileData.maskedMSISDN) && - Objects.equals(this.geolocation, mobileData.geolocation) && - Objects.equals(this.protectedMobileData, mobileData.protectedMobileData) && - Objects.equals(this.sensitiveMobileData, mobileData.sensitiveMobileData); - } - - @Override - public int hashCode() { - return Objects.hash(mobileCountryCode, mobileNetworkCode, maskedMSISDN, geolocation, protectedMobileData, sensitiveMobileData); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MobileData {\n"); - sb.append(" mobileCountryCode: ").append(toIndentedString(mobileCountryCode)).append("\n"); - sb.append(" mobileNetworkCode: ").append(toIndentedString(mobileNetworkCode)).append("\n"); - sb.append(" maskedMSISDN: ").append(toIndentedString(maskedMSISDN)).append("\n"); - sb.append(" geolocation: ").append(toIndentedString(geolocation)).append("\n"); - sb.append(" protectedMobileData: ").append(toIndentedString(protectedMobileData)).append("\n"); - sb.append(" sensitiveMobileData: ").append(toIndentedString(sensitiveMobileData)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of MobileData given an JSON string - * - * @param jsonString JSON string - * @return An instance of MobileData - * @throws JsonProcessingException if the JSON string is invalid with respect to MobileData - */ - public static MobileData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, MobileData.class); - } -/** - * Convert an instance of MobileData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/OriginalPOITransaction.java b/src/main/java/com/adyen/model/terminal/OriginalPOITransaction.java deleted file mode 100644 index ac19f3fcd..000000000 --- a/src/main/java/com/adyen/model/terminal/OriginalPOITransaction.java +++ /dev/null @@ -1,426 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.TransactionIDType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * In the Payment or the Loyalty Request message, it allows using the card of a previous CardAcquisition or Payment/Loyalty request. Identification of a previous POI transaction. - */ -@ApiModel(description = "In the Payment or the Loyalty Request message, it allows using the card of a previous CardAcquisition or Payment/Loyalty request. Identification of a previous POI transaction.") -@JsonPropertyOrder({ - OriginalPOITransaction.JSON_PROPERTY_SALE_I_D, - OriginalPOITransaction.JSON_PROPERTY_P_O_I_I_D, - OriginalPOITransaction.JSON_PROPERTY_PO_I_TRANSACTION_I_D, - OriginalPOITransaction.JSON_PROPERTY_REUSE_CARD_DATA_FLAG, - OriginalPOITransaction.JSON_PROPERTY_APPROVAL_CODE, - OriginalPOITransaction.JSON_PROPERTY_CUSTOMER_LANGUAGE, - OriginalPOITransaction.JSON_PROPERTY_ACQUIRER_I_D, - OriginalPOITransaction.JSON_PROPERTY_AMOUNT_VALUE, - OriginalPOITransaction.JSON_PROPERTY_HOST_TRANSACTION_I_D -}) - -public class OriginalPOITransaction { - public static final String JSON_PROPERTY_SALE_I_D = "SaleID"; - private String saleID; - - public static final String JSON_PROPERTY_P_O_I_I_D = "POIID"; - private String POIID; - - public static final String JSON_PROPERTY_PO_I_TRANSACTION_I_D = "POITransactionID"; - private TransactionIDType poITransactionID; - - public static final String JSON_PROPERTY_REUSE_CARD_DATA_FLAG = "ReuseCardDataFlag"; - private Boolean reuseCardDataFlag = true; - - public static final String JSON_PROPERTY_APPROVAL_CODE = "ApprovalCode"; - private String approvalCode; - - public static final String JSON_PROPERTY_CUSTOMER_LANGUAGE = "CustomerLanguage"; - private String customerLanguage; - - public static final String JSON_PROPERTY_ACQUIRER_I_D = "AcquirerID"; - private Integer acquirerID; - - public static final String JSON_PROPERTY_AMOUNT_VALUE = "AmountValue"; - private BigDecimal amountValue; - - public static final String JSON_PROPERTY_HOST_TRANSACTION_I_D = "HostTransactionID"; - private TransactionIDType hostTransactionID; - - public OriginalPOITransaction() { - } - - public OriginalPOITransaction saleID(String saleID) { - this.saleID = saleID; - return this; - } - - /** - * Identification of a Sale System or a Sale Terminal for the Sale to POI protocol. - * @return saleID - **/ - @ApiModelProperty(value = "Identification of a Sale System or a Sale Terminal for the Sale to POI protocol.") - @JsonProperty(JSON_PROPERTY_SALE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSaleID() { - return saleID; - } - - - /** - * Identification of a Sale System or a Sale Terminal for the Sale to POI protocol. - * - * @param saleID - */ - @JsonProperty(JSON_PROPERTY_SALE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleID(String saleID) { - this.saleID = saleID; - } - - - public OriginalPOITransaction POIID(String POIID) { - this.POIID = POIID; - return this; - } - - /** - * If original transaction is coming from another POI. - * @return POIID - **/ - @ApiModelProperty(value = "If original transaction is coming from another POI.") - @JsonProperty(JSON_PROPERTY_P_O_I_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPOIID() { - return POIID; - } - - - /** - * If original transaction is coming from another POI. - * - * @param POIID - */ - @JsonProperty(JSON_PROPERTY_P_O_I_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPOIID(String POIID) { - this.POIID = POIID; - } - - - public OriginalPOITransaction poITransactionID(TransactionIDType poITransactionID) { - this.poITransactionID = poITransactionID; - return this; - } - - /** - * Get poITransactionID - * @return poITransactionID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PO_I_TRANSACTION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransactionIDType getPoITransactionID() { - return poITransactionID; - } - - - /** - * poITransactionID - * - * @param poITransactionID - */ - @JsonProperty(JSON_PROPERTY_PO_I_TRANSACTION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoITransactionID(TransactionIDType poITransactionID) { - this.poITransactionID = poITransactionID; - } - - - public OriginalPOITransaction reuseCardDataFlag(Boolean reuseCardDataFlag) { - this.reuseCardDataFlag = reuseCardDataFlag; - return this; - } - - /** - * Indicate if the card data has to be got from a previous transaction. - * @return reuseCardDataFlag - **/ - @ApiModelProperty(value = "Indicate if the card data has to be got from a previous transaction.") - @JsonProperty(JSON_PROPERTY_REUSE_CARD_DATA_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getReuseCardDataFlag() { - return reuseCardDataFlag; - } - - - /** - * Indicate if the card data has to be got from a previous transaction. - * - * @param reuseCardDataFlag - */ - @JsonProperty(JSON_PROPERTY_REUSE_CARD_DATA_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReuseCardDataFlag(Boolean reuseCardDataFlag) { - this.reuseCardDataFlag = reuseCardDataFlag; - } - - - public OriginalPOITransaction approvalCode(String approvalCode) { - this.approvalCode = approvalCode; - return this; - } - - /** - * If referral. - * @return approvalCode - **/ - @ApiModelProperty(value = "If referral.") - @JsonProperty(JSON_PROPERTY_APPROVAL_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getApprovalCode() { - return approvalCode; - } - - - /** - * If referral. - * - * @param approvalCode - */ - @JsonProperty(JSON_PROPERTY_APPROVAL_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApprovalCode(String approvalCode) { - this.approvalCode = approvalCode; - } - - - public OriginalPOITransaction customerLanguage(String customerLanguage) { - this.customerLanguage = customerLanguage; - return this; - } - - /** - * If the language is selected by the Sale System before the request to the POI. - * @return customerLanguage - **/ - @ApiModelProperty(value = "If the language is selected by the Sale System before the request to the POI.") - @JsonProperty(JSON_PROPERTY_CUSTOMER_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCustomerLanguage() { - return customerLanguage; - } - - - /** - * If the language is selected by the Sale System before the request to the POI. - * - * @param customerLanguage - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerLanguage(String customerLanguage) { - this.customerLanguage = customerLanguage; - } - - - public OriginalPOITransaction acquirerID(Integer acquirerID) { - this.acquirerID = acquirerID; - return this; - } - - /** - * Restrict to these Acquirer if present. - * @return acquirerID - **/ - @ApiModelProperty(value = "Restrict to these Acquirer if present.") - @JsonProperty(JSON_PROPERTY_ACQUIRER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getAcquirerID() { - return acquirerID; - } - - - /** - * Restrict to these Acquirer if present. - * - * @param acquirerID - */ - @JsonProperty(JSON_PROPERTY_ACQUIRER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAcquirerID(Integer acquirerID) { - this.acquirerID = acquirerID; - } - - - public OriginalPOITransaction amountValue(BigDecimal amountValue) { - this.amountValue = amountValue; - return this; - } - - /** - * Get amountValue - * minimum: 0.0 - * maximum: 99999999.999999 - * @return amountValue - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_AMOUNT_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getAmountValue() { - return amountValue; - } - - - /** - * amountValue - * - * @param amountValue - */ - @JsonProperty(JSON_PROPERTY_AMOUNT_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAmountValue(BigDecimal amountValue) { - this.amountValue = amountValue; - } - - - public OriginalPOITransaction hostTransactionID(TransactionIDType hostTransactionID) { - this.hostTransactionID = hostTransactionID; - return this; - } - - /** - * Get hostTransactionID - * @return hostTransactionID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_HOST_TRANSACTION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransactionIDType getHostTransactionID() { - return hostTransactionID; - } - - - /** - * hostTransactionID - * - * @param hostTransactionID - */ - @JsonProperty(JSON_PROPERTY_HOST_TRANSACTION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHostTransactionID(TransactionIDType hostTransactionID) { - this.hostTransactionID = hostTransactionID; - } - - - /** - * Return true if this OriginalPOITransaction object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OriginalPOITransaction originalPOITransaction = (OriginalPOITransaction) o; - return Objects.equals(this.saleID, originalPOITransaction.saleID) && - Objects.equals(this.POIID, originalPOITransaction.POIID) && - Objects.equals(this.poITransactionID, originalPOITransaction.poITransactionID) && - Objects.equals(this.reuseCardDataFlag, originalPOITransaction.reuseCardDataFlag) && - Objects.equals(this.approvalCode, originalPOITransaction.approvalCode) && - Objects.equals(this.customerLanguage, originalPOITransaction.customerLanguage) && - Objects.equals(this.acquirerID, originalPOITransaction.acquirerID) && - Objects.equals(this.amountValue, originalPOITransaction.amountValue) && - Objects.equals(this.hostTransactionID, originalPOITransaction.hostTransactionID); - } - - @Override - public int hashCode() { - return Objects.hash(saleID, POIID, poITransactionID, reuseCardDataFlag, approvalCode, customerLanguage, acquirerID, amountValue, hostTransactionID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OriginalPOITransaction {\n"); - sb.append(" saleID: ").append(toIndentedString(saleID)).append("\n"); - sb.append(" POIID: ").append(toIndentedString(POIID)).append("\n"); - sb.append(" poITransactionID: ").append(toIndentedString(poITransactionID)).append("\n"); - sb.append(" reuseCardDataFlag: ").append(toIndentedString(reuseCardDataFlag)).append("\n"); - sb.append(" approvalCode: ").append(toIndentedString(approvalCode)).append("\n"); - sb.append(" customerLanguage: ").append(toIndentedString(customerLanguage)).append("\n"); - sb.append(" acquirerID: ").append(toIndentedString(acquirerID)).append("\n"); - sb.append(" amountValue: ").append(toIndentedString(amountValue)).append("\n"); - sb.append(" hostTransactionID: ").append(toIndentedString(hostTransactionID)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of OriginalPOITransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of OriginalPOITransaction - * @throws JsonProcessingException if the JSON string is invalid with respect to OriginalPOITransaction - */ - public static OriginalPOITransaction fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, OriginalPOITransaction.class); - } -/** - * Convert an instance of OriginalPOITransaction to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/OutputBarcode.java b/src/main/java/com/adyen/model/terminal/OutputBarcode.java deleted file mode 100644 index 77e911c48..000000000 --- a/src/main/java/com/adyen/model/terminal/OutputBarcode.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.BarcodeType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * OutputBarcode - */ -@JsonPropertyOrder({ - OutputBarcode.JSON_PROPERTY_BARCODE_TYPE, - OutputBarcode.JSON_PROPERTY_BARCODE_VALUE -}) - -public class OutputBarcode { - public static final String JSON_PROPERTY_BARCODE_TYPE = "BarcodeType"; - private BarcodeType barcodeType; - - public static final String JSON_PROPERTY_BARCODE_VALUE = "BarcodeValue"; - private String barcodeValue; - - public OutputBarcode() { - } - - public OutputBarcode barcodeType(BarcodeType barcodeType) { - this.barcodeType = barcodeType; - return this; - } - - /** - * Get barcodeType - * @return barcodeType - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BARCODE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BarcodeType getBarcodeType() { - return barcodeType; - } - - - /** - * barcodeType - * - * @param barcodeType - */ - @JsonProperty(JSON_PROPERTY_BARCODE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBarcodeType(BarcodeType barcodeType) { - this.barcodeType = barcodeType; - } - - - public OutputBarcode barcodeValue(String barcodeValue) { - this.barcodeValue = barcodeValue; - return this; - } - - /** - * Get barcodeValue - * @return barcodeValue - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_BARCODE_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBarcodeValue() { - return barcodeValue; - } - - - /** - * barcodeValue - * - * @param barcodeValue - */ - @JsonProperty(JSON_PROPERTY_BARCODE_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBarcodeValue(String barcodeValue) { - this.barcodeValue = barcodeValue; - } - - - /** - * Return true if this OutputBarcode object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OutputBarcode outputBarcode = (OutputBarcode) o; - return Objects.equals(this.barcodeType, outputBarcode.barcodeType) && - Objects.equals(this.barcodeValue, outputBarcode.barcodeValue); - } - - @Override - public int hashCode() { - return Objects.hash(barcodeType, barcodeValue); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OutputBarcode {\n"); - sb.append(" barcodeType: ").append(toIndentedString(barcodeType)).append("\n"); - sb.append(" barcodeValue: ").append(toIndentedString(barcodeValue)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of OutputBarcode given an JSON string - * - * @param jsonString JSON string - * @return An instance of OutputBarcode - * @throws JsonProcessingException if the JSON string is invalid with respect to OutputBarcode - */ - public static OutputBarcode fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, OutputBarcode.class); - } -/** - * Convert an instance of OutputBarcode to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/OutputContent.java b/src/main/java/com/adyen/model/terminal/OutputContent.java deleted file mode 100644 index e74403077..000000000 --- a/src/main/java/com/adyen/model/terminal/OutputContent.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.OutputBarcode; -import com.adyen.model.terminal.OutputFormat; -import com.adyen.model.terminal.OutputText; -import com.adyen.model.terminal.PredefinedContent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * This is a sequence of elements if they have different formats. Content to display or print. - */ -@ApiModel(description = "This is a sequence of elements if they have different formats. Content to display or print.") -@JsonPropertyOrder({ - OutputContent.JSON_PROPERTY_OUTPUT_FORMAT, - OutputContent.JSON_PROPERTY_PREDEFINED_CONTENT, - OutputContent.JSON_PROPERTY_OUTPUT_TEXT, - OutputContent.JSON_PROPERTY_OUTPUT_X_H_T_M_L, - OutputContent.JSON_PROPERTY_OUTPUT_BARCODE -}) - -public class OutputContent { - public static final String JSON_PROPERTY_OUTPUT_FORMAT = "OutputFormat"; - private OutputFormat outputFormat; - - public static final String JSON_PROPERTY_PREDEFINED_CONTENT = "PredefinedContent"; - private PredefinedContent predefinedContent; - - public static final String JSON_PROPERTY_OUTPUT_TEXT = "OutputText"; - private List outputText = null; - - public static final String JSON_PROPERTY_OUTPUT_X_H_T_M_L = "OutputXHTML"; - private byte[] outputXHTML; - - public static final String JSON_PROPERTY_OUTPUT_BARCODE = "OutputBarcode"; - private OutputBarcode outputBarcode; - - public OutputContent() { - } - - public OutputContent outputFormat(OutputFormat outputFormat) { - this.outputFormat = outputFormat; - return this; - } - - /** - * Get outputFormat - * @return outputFormat - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_OUTPUT_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OutputFormat getOutputFormat() { - return outputFormat; - } - - - /** - * outputFormat - * - * @param outputFormat - */ - @JsonProperty(JSON_PROPERTY_OUTPUT_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutputFormat(OutputFormat outputFormat) { - this.outputFormat = outputFormat; - } - - - public OutputContent predefinedContent(PredefinedContent predefinedContent) { - this.predefinedContent = predefinedContent; - return this; - } - - /** - * Get predefinedContent - * @return predefinedContent - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREDEFINED_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PredefinedContent getPredefinedContent() { - return predefinedContent; - } - - - /** - * predefinedContent - * - * @param predefinedContent - */ - @JsonProperty(JSON_PROPERTY_PREDEFINED_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPredefinedContent(PredefinedContent predefinedContent) { - this.predefinedContent = predefinedContent; - } - - - public OutputContent outputText(List outputText) { - this.outputText = outputText; - return this; - } - - public OutputContent addOutputTextItem(OutputText outputTextItem) { - if (this.outputText == null) { - this.outputText = new ArrayList<>(); - } - this.outputText.add(outputTextItem); - return this; - } - - /** - * Get outputText - * @return outputText - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_OUTPUT_TEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getOutputText() { - return outputText; - } - - - /** - * outputText - * - * @param outputText - */ - @JsonProperty(JSON_PROPERTY_OUTPUT_TEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutputText(List outputText) { - this.outputText = outputText; - } - - - public OutputContent outputXHTML(byte[] outputXHTML) { - this.outputXHTML = outputXHTML; - return this; - } - - /** - * Mandatory, if OutputFormat is XHTML, not allowed otherwise. - * @return outputXHTML - **/ - @ApiModelProperty(value = "Mandatory, if OutputFormat is XHTML, not allowed otherwise.") - @JsonProperty(JSON_PROPERTY_OUTPUT_X_H_T_M_L) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getOutputXHTML() { - return outputXHTML; - } - - - /** - * Mandatory, if OutputFormat is XHTML, not allowed otherwise. - * - * @param outputXHTML - */ - @JsonProperty(JSON_PROPERTY_OUTPUT_X_H_T_M_L) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutputXHTML(byte[] outputXHTML) { - this.outputXHTML = outputXHTML; - } - - - public OutputContent outputBarcode(OutputBarcode outputBarcode) { - this.outputBarcode = outputBarcode; - return this; - } - - /** - * Get outputBarcode - * @return outputBarcode - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_OUTPUT_BARCODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OutputBarcode getOutputBarcode() { - return outputBarcode; - } - - - /** - * outputBarcode - * - * @param outputBarcode - */ - @JsonProperty(JSON_PROPERTY_OUTPUT_BARCODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutputBarcode(OutputBarcode outputBarcode) { - this.outputBarcode = outputBarcode; - } - - - /** - * Return true if this OutputContent object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OutputContent outputContent = (OutputContent) o; - return Objects.equals(this.outputFormat, outputContent.outputFormat) && - Objects.equals(this.predefinedContent, outputContent.predefinedContent) && - Objects.equals(this.outputText, outputContent.outputText) && - Arrays.equals(this.outputXHTML, outputContent.outputXHTML) && - Objects.equals(this.outputBarcode, outputContent.outputBarcode); - } - - @Override - public int hashCode() { - return Objects.hash(outputFormat, predefinedContent, outputText, Arrays.hashCode(outputXHTML), outputBarcode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OutputContent {\n"); - sb.append(" outputFormat: ").append(toIndentedString(outputFormat)).append("\n"); - sb.append(" predefinedContent: ").append(toIndentedString(predefinedContent)).append("\n"); - sb.append(" outputText: ").append(toIndentedString(outputText)).append("\n"); - sb.append(" outputXHTML: ").append(toIndentedString(outputXHTML)).append("\n"); - sb.append(" outputBarcode: ").append(toIndentedString(outputBarcode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of OutputContent given an JSON string - * - * @param jsonString JSON string - * @return An instance of OutputContent - * @throws JsonProcessingException if the JSON string is invalid with respect to OutputContent - */ - public static OutputContent fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, OutputContent.class); - } -/** - * Convert an instance of OutputContent to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/OutputFormat.java b/src/main/java/com/adyen/model/terminal/OutputFormat.java deleted file mode 100644 index dd1c27465..000000000 --- a/src/main/java/com/adyen/model/terminal/OutputFormat.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets OutputFormat - */ -public enum OutputFormat { - - BARCODE("BarCode"), - - MESSAGEREF("MessageRef"), - - TEXT("Text"), - - XHTML("XHTML"); - - private String value; - - OutputFormat(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static OutputFormat fromValue(String value) { - for (OutputFormat b : OutputFormat.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/OutputResult.java b/src/main/java/com/adyen/model/terminal/OutputResult.java deleted file mode 100644 index 834a27b38..000000000 --- a/src/main/java/com/adyen/model/terminal/OutputResult.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.Device; -import com.adyen.model.terminal.InfoQualify; -import com.adyen.model.terminal.Response; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * In the message response, it contains the result of the output, if required in the message request. Information related to the result the output (display, print, input). - */ -@ApiModel(description = "In the message response, it contains the result of the output, if required in the message request. Information related to the result the output (display, print, input).") -@JsonPropertyOrder({ - OutputResult.JSON_PROPERTY_DEVICE, - OutputResult.JSON_PROPERTY_INFO_QUALIFY, - OutputResult.JSON_PROPERTY_RESPONSE -}) - -public class OutputResult { - public static final String JSON_PROPERTY_DEVICE = "Device"; - private Device device; - - public static final String JSON_PROPERTY_INFO_QUALIFY = "InfoQualify"; - private InfoQualify infoQualify; - - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public OutputResult() { - } - - public OutputResult device(Device device) { - this.device = device; - return this; - } - - /** - * Get device - * @return device - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_DEVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Device getDevice() { - return device; - } - - - /** - * device - * - * @param device - */ - @JsonProperty(JSON_PROPERTY_DEVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDevice(Device device) { - this.device = device; - } - - - public OutputResult infoQualify(InfoQualify infoQualify) { - this.infoQualify = infoQualify; - return this; - } - - /** - * Get infoQualify - * @return infoQualify - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_INFO_QUALIFY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public InfoQualify getInfoQualify() { - return infoQualify; - } - - - /** - * infoQualify - * - * @param infoQualify - */ - @JsonProperty(JSON_PROPERTY_INFO_QUALIFY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInfoQualify(InfoQualify infoQualify) { - this.infoQualify = infoQualify; - } - - - public OutputResult response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - /** - * Return true if this OutputResult object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OutputResult outputResult = (OutputResult) o; - return Objects.equals(this.device, outputResult.device) && - Objects.equals(this.infoQualify, outputResult.infoQualify) && - Objects.equals(this.response, outputResult.response); - } - - @Override - public int hashCode() { - return Objects.hash(device, infoQualify, response); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OutputResult {\n"); - sb.append(" device: ").append(toIndentedString(device)).append("\n"); - sb.append(" infoQualify: ").append(toIndentedString(infoQualify)).append("\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of OutputResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of OutputResult - * @throws JsonProcessingException if the JSON string is invalid with respect to OutputResult - */ - public static OutputResult fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, OutputResult.class); - } -/** - * Convert an instance of OutputResult to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/OutputText.java b/src/main/java/com/adyen/model/terminal/OutputText.java deleted file mode 100644 index 06ef642a2..000000000 --- a/src/main/java/com/adyen/model/terminal/OutputText.java +++ /dev/null @@ -1,503 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.Alignment; -import com.adyen.model.terminal.CharacterHeight; -import com.adyen.model.terminal.CharacterStyle; -import com.adyen.model.terminal.CharacterWidth; -import com.adyen.model.terminal.Color; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the content of the text message and its format. All the data elements related to the format of the text to display or print are parameters valid for the whole Text content. Content of text message to display or print. - */ -@ApiModel(description = "It conveys Information related to the content of the text message and its format. All the data elements related to the format of the text to display or print are parameters valid for the whole Text content. Content of text message to display or print.") -@JsonPropertyOrder({ - OutputText.JSON_PROPERTY_TEXT, - OutputText.JSON_PROPERTY_CHARACTER_SET, - OutputText.JSON_PROPERTY_FONT, - OutputText.JSON_PROPERTY_START_ROW, - OutputText.JSON_PROPERTY_START_COLUMN, - OutputText.JSON_PROPERTY_COLOR, - OutputText.JSON_PROPERTY_CHARACTER_WIDTH, - OutputText.JSON_PROPERTY_CHARACTER_HEIGHT, - OutputText.JSON_PROPERTY_CHARACTER_STYLE, - OutputText.JSON_PROPERTY_ALIGNMENT, - OutputText.JSON_PROPERTY_END_OF_LINE_FLAG -}) - -public class OutputText { - public static final String JSON_PROPERTY_TEXT = "Text"; - private String text; - - public static final String JSON_PROPERTY_CHARACTER_SET = "CharacterSet"; - private Integer characterSet; - - public static final String JSON_PROPERTY_FONT = "Font"; - private String font; - - public static final String JSON_PROPERTY_START_ROW = "StartRow"; - private Integer startRow; - - public static final String JSON_PROPERTY_START_COLUMN = "StartColumn"; - private Integer startColumn; - - public static final String JSON_PROPERTY_COLOR = "Color"; - private Color color; - - public static final String JSON_PROPERTY_CHARACTER_WIDTH = "CharacterWidth"; - private CharacterWidth characterWidth; - - public static final String JSON_PROPERTY_CHARACTER_HEIGHT = "CharacterHeight"; - private CharacterHeight characterHeight; - - public static final String JSON_PROPERTY_CHARACTER_STYLE = "CharacterStyle"; - private CharacterStyle characterStyle; - - public static final String JSON_PROPERTY_ALIGNMENT = "Alignment"; - private Alignment alignment; - - public static final String JSON_PROPERTY_END_OF_LINE_FLAG = "EndOfLineFlag"; - private Boolean endOfLineFlag = true; - - public OutputText() { - } - - public OutputText text(String text) { - this.text = text; - return this; - } - - /** - * Get text - * @return text - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_TEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getText() { - return text; - } - - - /** - * text - * - * @param text - */ - @JsonProperty(JSON_PROPERTY_TEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setText(String text) { - this.text = text; - } - - - public OutputText characterSet(Integer characterSet) { - this.characterSet = characterSet; - return this; - } - - /** - * Get characterSet - * @return characterSet - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CHARACTER_SET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getCharacterSet() { - return characterSet; - } - - - /** - * characterSet - * - * @param characterSet - */ - @JsonProperty(JSON_PROPERTY_CHARACTER_SET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCharacterSet(Integer characterSet) { - this.characterSet = characterSet; - } - - - public OutputText font(String font) { - this.font = font; - return this; - } - - /** - * Get font - * @return font - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FONT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getFont() { - return font; - } - - - /** - * font - * - * @param font - */ - @JsonProperty(JSON_PROPERTY_FONT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFont(String font) { - this.font = font; - } - - - public OutputText startRow(Integer startRow) { - this.startRow = startRow; - return this; - } - - /** - * Get startRow - * minimum: 1 - * maximum: 500 - * @return startRow - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_START_ROW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getStartRow() { - return startRow; - } - - - /** - * startRow - * - * @param startRow - */ - @JsonProperty(JSON_PROPERTY_START_ROW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStartRow(Integer startRow) { - this.startRow = startRow; - } - - - public OutputText startColumn(Integer startColumn) { - this.startColumn = startColumn; - return this; - } - - /** - * Get startColumn - * minimum: 1 - * maximum: 500 - * @return startColumn - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_START_COLUMN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getStartColumn() { - return startColumn; - } - - - /** - * startColumn - * - * @param startColumn - */ - @JsonProperty(JSON_PROPERTY_START_COLUMN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStartColumn(Integer startColumn) { - this.startColumn = startColumn; - } - - - public OutputText color(Color color) { - this.color = color; - return this; - } - - /** - * Get color - * @return color - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Color getColor() { - return color; - } - - - /** - * color - * - * @param color - */ - @JsonProperty(JSON_PROPERTY_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setColor(Color color) { - this.color = color; - } - - - public OutputText characterWidth(CharacterWidth characterWidth) { - this.characterWidth = characterWidth; - return this; - } - - /** - * Get characterWidth - * @return characterWidth - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CHARACTER_WIDTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public CharacterWidth getCharacterWidth() { - return characterWidth; - } - - - /** - * characterWidth - * - * @param characterWidth - */ - @JsonProperty(JSON_PROPERTY_CHARACTER_WIDTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCharacterWidth(CharacterWidth characterWidth) { - this.characterWidth = characterWidth; - } - - - public OutputText characterHeight(CharacterHeight characterHeight) { - this.characterHeight = characterHeight; - return this; - } - - /** - * Get characterHeight - * @return characterHeight - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CHARACTER_HEIGHT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public CharacterHeight getCharacterHeight() { - return characterHeight; - } - - - /** - * characterHeight - * - * @param characterHeight - */ - @JsonProperty(JSON_PROPERTY_CHARACTER_HEIGHT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCharacterHeight(CharacterHeight characterHeight) { - this.characterHeight = characterHeight; - } - - - public OutputText characterStyle(CharacterStyle characterStyle) { - this.characterStyle = characterStyle; - return this; - } - - /** - * Get characterStyle - * @return characterStyle - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CHARACTER_STYLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public CharacterStyle getCharacterStyle() { - return characterStyle; - } - - - /** - * characterStyle - * - * @param characterStyle - */ - @JsonProperty(JSON_PROPERTY_CHARACTER_STYLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCharacterStyle(CharacterStyle characterStyle) { - this.characterStyle = characterStyle; - } - - - public OutputText alignment(Alignment alignment) { - this.alignment = alignment; - return this; - } - - /** - * Get alignment - * @return alignment - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ALIGNMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Alignment getAlignment() { - return alignment; - } - - - /** - * alignment - * - * @param alignment - */ - @JsonProperty(JSON_PROPERTY_ALIGNMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAlignment(Alignment alignment) { - this.alignment = alignment; - } - - - public OutputText endOfLineFlag(Boolean endOfLineFlag) { - this.endOfLineFlag = endOfLineFlag; - return this; - } - - /** - * Get endOfLineFlag - * @return endOfLineFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_END_OF_LINE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getEndOfLineFlag() { - return endOfLineFlag; - } - - - /** - * endOfLineFlag - * - * @param endOfLineFlag - */ - @JsonProperty(JSON_PROPERTY_END_OF_LINE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEndOfLineFlag(Boolean endOfLineFlag) { - this.endOfLineFlag = endOfLineFlag; - } - - - /** - * Return true if this OutputText object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OutputText outputText = (OutputText) o; - return Objects.equals(this.text, outputText.text) && - Objects.equals(this.characterSet, outputText.characterSet) && - Objects.equals(this.font, outputText.font) && - Objects.equals(this.startRow, outputText.startRow) && - Objects.equals(this.startColumn, outputText.startColumn) && - Objects.equals(this.color, outputText.color) && - Objects.equals(this.characterWidth, outputText.characterWidth) && - Objects.equals(this.characterHeight, outputText.characterHeight) && - Objects.equals(this.characterStyle, outputText.characterStyle) && - Objects.equals(this.alignment, outputText.alignment) && - Objects.equals(this.endOfLineFlag, outputText.endOfLineFlag); - } - - @Override - public int hashCode() { - return Objects.hash(text, characterSet, font, startRow, startColumn, color, characterWidth, characterHeight, characterStyle, alignment, endOfLineFlag); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OutputText {\n"); - sb.append(" text: ").append(toIndentedString(text)).append("\n"); - sb.append(" characterSet: ").append(toIndentedString(characterSet)).append("\n"); - sb.append(" font: ").append(toIndentedString(font)).append("\n"); - sb.append(" startRow: ").append(toIndentedString(startRow)).append("\n"); - sb.append(" startColumn: ").append(toIndentedString(startColumn)).append("\n"); - sb.append(" color: ").append(toIndentedString(color)).append("\n"); - sb.append(" characterWidth: ").append(toIndentedString(characterWidth)).append("\n"); - sb.append(" characterHeight: ").append(toIndentedString(characterHeight)).append("\n"); - sb.append(" characterStyle: ").append(toIndentedString(characterStyle)).append("\n"); - sb.append(" alignment: ").append(toIndentedString(alignment)).append("\n"); - sb.append(" endOfLineFlag: ").append(toIndentedString(endOfLineFlag)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of OutputText given an JSON string - * - * @param jsonString JSON string - * @return An instance of OutputText - * @throws JsonProcessingException if the JSON string is invalid with respect to OutputText - */ - public static OutputText fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, OutputText.class); - } -/** - * Convert an instance of OutputText to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PINFormat.java b/src/main/java/com/adyen/model/terminal/PINFormat.java deleted file mode 100644 index 97754c233..000000000 --- a/src/main/java/com/adyen/model/terminal/PINFormat.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets PINFormat - */ -public enum PINFormat { - - ISO0("ISO0"), - - ISO1("ISO1"), - - ISO2("ISO2"), - - ISO3("ISO3"); - - private String value; - - PINFormat(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static PINFormat fromValue(String value) { - for (PINFormat b : PINFormat.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PINRequestType.java b/src/main/java/com/adyen/model/terminal/PINRequestType.java deleted file mode 100644 index d191d3e97..000000000 --- a/src/main/java/com/adyen/model/terminal/PINRequestType.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import io.swagger.annotations.ApiModel; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Type of PIN Service. - */ -public enum PINRequestType { - - PINENTER("PINEnter"), - - PINVERIFY("PINVerify"), - - PINVERIFYONLY("PINVerifyOnly"); - - private String value; - - PINRequestType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static PINRequestType fromValue(String value) { - for (PINRequestType b : PINRequestType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/POIData.java b/src/main/java/com/adyen/model/terminal/POIData.java deleted file mode 100644 index d74248317..000000000 --- a/src/main/java/com/adyen/model/terminal/POIData.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.TransactionIDType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * In the Message Response, identification of the POI transaction. Data related to the POI System. - */ -@ApiModel(description = "In the Message Response, identification of the POI transaction. Data related to the POI System.") -@JsonPropertyOrder({ - POIData.JSON_PROPERTY_PO_I_TRANSACTION_I_D, - POIData.JSON_PROPERTY_PO_I_RECONCILIATION_I_D -}) - -public class POIData { - public static final String JSON_PROPERTY_PO_I_TRANSACTION_I_D = "POITransactionID"; - private TransactionIDType poITransactionID; - - public static final String JSON_PROPERTY_PO_I_RECONCILIATION_I_D = "POIReconciliationID"; - private Integer poIReconciliationID; - - public POIData() { - } - - public POIData poITransactionID(TransactionIDType poITransactionID) { - this.poITransactionID = poITransactionID; - return this; - } - - /** - * Get poITransactionID - * @return poITransactionID - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PO_I_TRANSACTION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransactionIDType getPoITransactionID() { - return poITransactionID; - } - - - /** - * poITransactionID - * - * @param poITransactionID - */ - @JsonProperty(JSON_PROPERTY_PO_I_TRANSACTION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoITransactionID(TransactionIDType poITransactionID) { - this.poITransactionID = poITransactionID; - } - - - public POIData poIReconciliationID(Integer poIReconciliationID) { - this.poIReconciliationID = poIReconciliationID; - return this; - } - - /** - * If Result is Success. - * @return poIReconciliationID - **/ - @ApiModelProperty(value = "If Result is Success.") - @JsonProperty(JSON_PROPERTY_PO_I_RECONCILIATION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getPoIReconciliationID() { - return poIReconciliationID; - } - - - /** - * If Result is Success. - * - * @param poIReconciliationID - */ - @JsonProperty(JSON_PROPERTY_PO_I_RECONCILIATION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoIReconciliationID(Integer poIReconciliationID) { - this.poIReconciliationID = poIReconciliationID; - } - - - /** - * Return true if this POIData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - POIData poIData = (POIData) o; - return Objects.equals(this.poITransactionID, poIData.poITransactionID) && - Objects.equals(this.poIReconciliationID, poIData.poIReconciliationID); - } - - @Override - public int hashCode() { - return Objects.hash(poITransactionID, poIReconciliationID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class POIData {\n"); - sb.append(" poITransactionID: ").append(toIndentedString(poITransactionID)).append("\n"); - sb.append(" poIReconciliationID: ").append(toIndentedString(poIReconciliationID)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of POIData given an JSON string - * - * @param jsonString JSON string - * @return An instance of POIData - * @throws JsonProcessingException if the JSON string is invalid with respect to POIData - */ - public static POIData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, POIData.class); - } -/** - * Convert an instance of POIData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/POIProfile.java b/src/main/java/com/adyen/model/terminal/POIProfile.java deleted file mode 100644 index 6cfa4a97b..000000000 --- a/src/main/java/com/adyen/model/terminal/POIProfile.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.GenericProfile; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * POIProfile - */ -@JsonPropertyOrder({ - POIProfile.JSON_PROPERTY_GENERIC_PROFILE, - POIProfile.JSON_PROPERTY_SERVICE_PROFILES -}) - -public class POIProfile { - public static final String JSON_PROPERTY_GENERIC_PROFILE = "GenericProfile"; - private GenericProfile genericProfile; - - /** - * Gets or Sets serviceProfiles - */ - public enum ServiceProfilesEnum { - BATCH("Batch"), - - CARDREADER("CardReader"), - - COMMUNICATION("Communication"), - - LOYALTY("Loyalty"), - - ONETIMERES("OneTimeRes"), - - PIN("PIN"), - - RESERVATION("Reservation"), - - SOUND("Sound"), - - STOREDVALUE("StoredValue"), - - SYNCHRO("Synchro"); - - private String value; - - ServiceProfilesEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ServiceProfilesEnum fromValue(String value) { - for (ServiceProfilesEnum b : ServiceProfilesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_SERVICE_PROFILES = "ServiceProfiles"; - private List serviceProfiles = null; - - public POIProfile() { - } - - public POIProfile genericProfile(GenericProfile genericProfile) { - this.genericProfile = genericProfile; - return this; - } - - /** - * Get genericProfile - * @return genericProfile - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_GENERIC_PROFILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public GenericProfile getGenericProfile() { - return genericProfile; - } - - - /** - * genericProfile - * - * @param genericProfile - */ - @JsonProperty(JSON_PROPERTY_GENERIC_PROFILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGenericProfile(GenericProfile genericProfile) { - this.genericProfile = genericProfile; - } - - - public POIProfile serviceProfiles(List serviceProfiles) { - this.serviceProfiles = serviceProfiles; - return this; - } - - public POIProfile addServiceProfilesItem(ServiceProfilesEnum serviceProfilesItem) { - if (this.serviceProfiles == null) { - this.serviceProfiles = new ArrayList<>(); - } - this.serviceProfiles.add(serviceProfilesItem); - return this; - } - - /** - * Get serviceProfiles - * @return serviceProfiles - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SERVICE_PROFILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getServiceProfiles() { - return serviceProfiles; - } - - - /** - * serviceProfiles - * - * @param serviceProfiles - */ - @JsonProperty(JSON_PROPERTY_SERVICE_PROFILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setServiceProfiles(List serviceProfiles) { - this.serviceProfiles = serviceProfiles; - } - - - /** - * Return true if this POIProfile object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - POIProfile poIProfile = (POIProfile) o; - return Objects.equals(this.genericProfile, poIProfile.genericProfile) && - Objects.equals(this.serviceProfiles, poIProfile.serviceProfiles); - } - - @Override - public int hashCode() { - return Objects.hash(genericProfile, serviceProfiles); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class POIProfile {\n"); - sb.append(" genericProfile: ").append(toIndentedString(genericProfile)).append("\n"); - sb.append(" serviceProfiles: ").append(toIndentedString(serviceProfiles)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of POIProfile given an JSON string - * - * @param jsonString JSON string - * @return An instance of POIProfile - * @throws JsonProcessingException if the JSON string is invalid with respect to POIProfile - */ - public static POIProfile fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, POIProfile.class); - } -/** - * Convert an instance of POIProfile to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/POISoftware.java b/src/main/java/com/adyen/model/terminal/POISoftware.java deleted file mode 100644 index 48556675d..000000000 --- a/src/main/java/com/adyen/model/terminal/POISoftware.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * POISoftware - */ -@JsonPropertyOrder({ - POISoftware.JSON_PROPERTY_MANUFACTURER_I_D, - POISoftware.JSON_PROPERTY_APPLICATION_NAME, - POISoftware.JSON_PROPERTY_SOFTWARE_VERSION, - POISoftware.JSON_PROPERTY_CERTIFICATION_CODE -}) - -public class POISoftware { - public static final String JSON_PROPERTY_MANUFACTURER_I_D = "ManufacturerID"; - private String manufacturerID; - - public static final String JSON_PROPERTY_APPLICATION_NAME = "ApplicationName"; - private String applicationName; - - public static final String JSON_PROPERTY_SOFTWARE_VERSION = "SoftwareVersion"; - private String softwareVersion; - - public static final String JSON_PROPERTY_CERTIFICATION_CODE = "CertificationCode"; - private String certificationCode; - - public POISoftware() { - } - - public POISoftware manufacturerID(String manufacturerID) { - this.manufacturerID = manufacturerID; - return this; - } - - /** - * Get manufacturerID - * @return manufacturerID - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_MANUFACTURER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getManufacturerID() { - return manufacturerID; - } - - - /** - * manufacturerID - * - * @param manufacturerID - */ - @JsonProperty(JSON_PROPERTY_MANUFACTURER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setManufacturerID(String manufacturerID) { - this.manufacturerID = manufacturerID; - } - - - public POISoftware applicationName(String applicationName) { - this.applicationName = applicationName; - return this; - } - - /** - * Get applicationName - * @return applicationName - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_APPLICATION_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getApplicationName() { - return applicationName; - } - - - /** - * applicationName - * - * @param applicationName - */ - @JsonProperty(JSON_PROPERTY_APPLICATION_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApplicationName(String applicationName) { - this.applicationName = applicationName; - } - - - public POISoftware softwareVersion(String softwareVersion) { - this.softwareVersion = softwareVersion; - return this; - } - - /** - * Get softwareVersion - * @return softwareVersion - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_SOFTWARE_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSoftwareVersion() { - return softwareVersion; - } - - - /** - * softwareVersion - * - * @param softwareVersion - */ - @JsonProperty(JSON_PROPERTY_SOFTWARE_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSoftwareVersion(String softwareVersion) { - this.softwareVersion = softwareVersion; - } - - - public POISoftware certificationCode(String certificationCode) { - this.certificationCode = certificationCode; - return this; - } - - /** - * Get certificationCode - * @return certificationCode - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_CERTIFICATION_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCertificationCode() { - return certificationCode; - } - - - /** - * certificationCode - * - * @param certificationCode - */ - @JsonProperty(JSON_PROPERTY_CERTIFICATION_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCertificationCode(String certificationCode) { - this.certificationCode = certificationCode; - } - - - /** - * Return true if this POISoftware object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - POISoftware poISoftware = (POISoftware) o; - return Objects.equals(this.manufacturerID, poISoftware.manufacturerID) && - Objects.equals(this.applicationName, poISoftware.applicationName) && - Objects.equals(this.softwareVersion, poISoftware.softwareVersion) && - Objects.equals(this.certificationCode, poISoftware.certificationCode); - } - - @Override - public int hashCode() { - return Objects.hash(manufacturerID, applicationName, softwareVersion, certificationCode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class POISoftware {\n"); - sb.append(" manufacturerID: ").append(toIndentedString(manufacturerID)).append("\n"); - sb.append(" applicationName: ").append(toIndentedString(applicationName)).append("\n"); - sb.append(" softwareVersion: ").append(toIndentedString(softwareVersion)).append("\n"); - sb.append(" certificationCode: ").append(toIndentedString(certificationCode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of POISoftware given an JSON string - * - * @param jsonString JSON string - * @return An instance of POISoftware - * @throws JsonProcessingException if the JSON string is invalid with respect to POISoftware - */ - public static POISoftware fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, POISoftware.class); - } -/** - * Convert an instance of POISoftware to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/POIStatus.java b/src/main/java/com/adyen/model/terminal/POIStatus.java deleted file mode 100644 index 01e0c394e..000000000 --- a/src/main/java/com/adyen/model/terminal/POIStatus.java +++ /dev/null @@ -1,399 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.CashHandlingDevice; -import com.adyen.model.terminal.GlobalStatus; -import com.adyen.model.terminal.PrinterStatus; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Indicate the availability of the POI Terminal components. The data element is absent if the component is not part of the POI Terminal. State of a POI Terminal. - */ -@ApiModel(description = "Indicate the availability of the POI Terminal components. The data element is absent if the component is not part of the POI Terminal. State of a POI Terminal.") -@JsonPropertyOrder({ - POIStatus.JSON_PROPERTY_GLOBAL_STATUS, - POIStatus.JSON_PROPERTY_SECURITY_O_K_FLAG, - POIStatus.JSON_PROPERTY_PE_D_O_K_FLAG, - POIStatus.JSON_PROPERTY_CARD_READER_O_K_FLAG, - POIStatus.JSON_PROPERTY_PRINTER_STATUS, - POIStatus.JSON_PROPERTY_COMMUNICATION_O_K_FLAG, - POIStatus.JSON_PROPERTY_CASH_HANDLING_DEVICE, - POIStatus.JSON_PROPERTY_FRAUD_PREVENTION_FLAG -}) - -public class POIStatus { - public static final String JSON_PROPERTY_GLOBAL_STATUS = "GlobalStatus"; - private GlobalStatus globalStatus; - - public static final String JSON_PROPERTY_SECURITY_O_K_FLAG = "SecurityOKFlag"; - private Boolean securityOKFlag; - - public static final String JSON_PROPERTY_PE_D_O_K_FLAG = "PEDOKFlag"; - private Boolean peDOKFlag; - - public static final String JSON_PROPERTY_CARD_READER_O_K_FLAG = "CardReaderOKFlag"; - private Boolean cardReaderOKFlag; - - public static final String JSON_PROPERTY_PRINTER_STATUS = "PrinterStatus"; - private PrinterStatus printerStatus; - - public static final String JSON_PROPERTY_COMMUNICATION_O_K_FLAG = "CommunicationOKFlag"; - private Boolean communicationOKFlag; - - public static final String JSON_PROPERTY_CASH_HANDLING_DEVICE = "CashHandlingDevice"; - private List cashHandlingDevice = null; - - public static final String JSON_PROPERTY_FRAUD_PREVENTION_FLAG = "FraudPreventionFlag"; - private Boolean fraudPreventionFlag; - - public POIStatus() { - } - - public POIStatus globalStatus(GlobalStatus globalStatus) { - this.globalStatus = globalStatus; - return this; - } - - /** - * Get globalStatus - * @return globalStatus - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_GLOBAL_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public GlobalStatus getGlobalStatus() { - return globalStatus; - } - - - /** - * globalStatus - * - * @param globalStatus - */ - @JsonProperty(JSON_PROPERTY_GLOBAL_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGlobalStatus(GlobalStatus globalStatus) { - this.globalStatus = globalStatus; - } - - - public POIStatus securityOKFlag(Boolean securityOKFlag) { - this.securityOKFlag = securityOKFlag; - return this; - } - - /** - * If security module present. - * @return securityOKFlag - **/ - @ApiModelProperty(value = "If security module present.") - @JsonProperty(JSON_PROPERTY_SECURITY_O_K_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getSecurityOKFlag() { - return securityOKFlag; - } - - - /** - * If security module present. - * - * @param securityOKFlag - */ - @JsonProperty(JSON_PROPERTY_SECURITY_O_K_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecurityOKFlag(Boolean securityOKFlag) { - this.securityOKFlag = securityOKFlag; - } - - - public POIStatus peDOKFlag(Boolean peDOKFlag) { - this.peDOKFlag = peDOKFlag; - return this; - } - - /** - * If PED present. - * @return peDOKFlag - **/ - @ApiModelProperty(value = "If PED present.") - @JsonProperty(JSON_PROPERTY_PE_D_O_K_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getPeDOKFlag() { - return peDOKFlag; - } - - - /** - * If PED present. - * - * @param peDOKFlag - */ - @JsonProperty(JSON_PROPERTY_PE_D_O_K_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPeDOKFlag(Boolean peDOKFlag) { - this.peDOKFlag = peDOKFlag; - } - - - public POIStatus cardReaderOKFlag(Boolean cardReaderOKFlag) { - this.cardReaderOKFlag = cardReaderOKFlag; - return this; - } - - /** - * If card reader device present. - * @return cardReaderOKFlag - **/ - @ApiModelProperty(value = "If card reader device present.") - @JsonProperty(JSON_PROPERTY_CARD_READER_O_K_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getCardReaderOKFlag() { - return cardReaderOKFlag; - } - - - /** - * If card reader device present. - * - * @param cardReaderOKFlag - */ - @JsonProperty(JSON_PROPERTY_CARD_READER_O_K_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCardReaderOKFlag(Boolean cardReaderOKFlag) { - this.cardReaderOKFlag = cardReaderOKFlag; - } - - - public POIStatus printerStatus(PrinterStatus printerStatus) { - this.printerStatus = printerStatus; - return this; - } - - /** - * Get printerStatus - * @return printerStatus - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PRINTER_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PrinterStatus getPrinterStatus() { - return printerStatus; - } - - - /** - * printerStatus - * - * @param printerStatus - */ - @JsonProperty(JSON_PROPERTY_PRINTER_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrinterStatus(PrinterStatus printerStatus) { - this.printerStatus = printerStatus; - } - - - public POIStatus communicationOKFlag(Boolean communicationOKFlag) { - this.communicationOKFlag = communicationOKFlag; - return this; - } - - /** - * If communication infrastructure present. - * @return communicationOKFlag - **/ - @ApiModelProperty(value = "If communication infrastructure present.") - @JsonProperty(JSON_PROPERTY_COMMUNICATION_O_K_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getCommunicationOKFlag() { - return communicationOKFlag; - } - - - /** - * If communication infrastructure present. - * - * @param communicationOKFlag - */ - @JsonProperty(JSON_PROPERTY_COMMUNICATION_O_K_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCommunicationOKFlag(Boolean communicationOKFlag) { - this.communicationOKFlag = communicationOKFlag; - } - - - public POIStatus cashHandlingDevice(List cashHandlingDevice) { - this.cashHandlingDevice = cashHandlingDevice; - return this; - } - - public POIStatus addCashHandlingDeviceItem(CashHandlingDevice cashHandlingDeviceItem) { - if (this.cashHandlingDevice == null) { - this.cashHandlingDevice = new ArrayList<>(); - } - this.cashHandlingDevice.add(cashHandlingDeviceItem); - return this; - } - - /** - * Get cashHandlingDevice - * @return cashHandlingDevice - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CASH_HANDLING_DEVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getCashHandlingDevice() { - return cashHandlingDevice; - } - - - /** - * cashHandlingDevice - * - * @param cashHandlingDevice - */ - @JsonProperty(JSON_PROPERTY_CASH_HANDLING_DEVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCashHandlingDevice(List cashHandlingDevice) { - this.cashHandlingDevice = cashHandlingDevice; - } - - - public POIStatus fraudPreventionFlag(Boolean fraudPreventionFlag) { - this.fraudPreventionFlag = fraudPreventionFlag; - return this; - } - - /** - * default False. - * @return fraudPreventionFlag - **/ - @ApiModelProperty(value = "default False.") - @JsonProperty(JSON_PROPERTY_FRAUD_PREVENTION_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getFraudPreventionFlag() { - return fraudPreventionFlag; - } - - - /** - * default False. - * - * @param fraudPreventionFlag - */ - @JsonProperty(JSON_PROPERTY_FRAUD_PREVENTION_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFraudPreventionFlag(Boolean fraudPreventionFlag) { - this.fraudPreventionFlag = fraudPreventionFlag; - } - - - /** - * Return true if this POIStatus object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - POIStatus poIStatus = (POIStatus) o; - return Objects.equals(this.globalStatus, poIStatus.globalStatus) && - Objects.equals(this.securityOKFlag, poIStatus.securityOKFlag) && - Objects.equals(this.peDOKFlag, poIStatus.peDOKFlag) && - Objects.equals(this.cardReaderOKFlag, poIStatus.cardReaderOKFlag) && - Objects.equals(this.printerStatus, poIStatus.printerStatus) && - Objects.equals(this.communicationOKFlag, poIStatus.communicationOKFlag) && - Objects.equals(this.cashHandlingDevice, poIStatus.cashHandlingDevice) && - Objects.equals(this.fraudPreventionFlag, poIStatus.fraudPreventionFlag); - } - - @Override - public int hashCode() { - return Objects.hash(globalStatus, securityOKFlag, peDOKFlag, cardReaderOKFlag, printerStatus, communicationOKFlag, cashHandlingDevice, fraudPreventionFlag); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class POIStatus {\n"); - sb.append(" globalStatus: ").append(toIndentedString(globalStatus)).append("\n"); - sb.append(" securityOKFlag: ").append(toIndentedString(securityOKFlag)).append("\n"); - sb.append(" peDOKFlag: ").append(toIndentedString(peDOKFlag)).append("\n"); - sb.append(" cardReaderOKFlag: ").append(toIndentedString(cardReaderOKFlag)).append("\n"); - sb.append(" printerStatus: ").append(toIndentedString(printerStatus)).append("\n"); - sb.append(" communicationOKFlag: ").append(toIndentedString(communicationOKFlag)).append("\n"); - sb.append(" cashHandlingDevice: ").append(toIndentedString(cashHandlingDevice)).append("\n"); - sb.append(" fraudPreventionFlag: ").append(toIndentedString(fraudPreventionFlag)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of POIStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of POIStatus - * @throws JsonProcessingException if the JSON string is invalid with respect to POIStatus - */ - public static POIStatus fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, POIStatus.class); - } -/** - * Convert an instance of POIStatus to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/POISystemData.java b/src/main/java/com/adyen/model/terminal/POISystemData.java deleted file mode 100644 index abcd3d6bd..000000000 --- a/src/main/java/com/adyen/model/terminal/POISystemData.java +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.POISoftware; -import com.adyen.model.terminal.POIStatus; -import com.adyen.model.terminal.POITerminalData; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.time.OffsetDateTime; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * POISystemData - */ -@JsonPropertyOrder({ - POISystemData.JSON_PROPERTY_DATE_TIME, - POISystemData.JSON_PROPERTY_PO_I_SOFTWARE, - POISystemData.JSON_PROPERTY_PO_I_TERMINAL_DATA, - POISystemData.JSON_PROPERTY_PO_I_STATUS -}) - -public class POISystemData { - public static final String JSON_PROPERTY_DATE_TIME = "DateTime"; - private OffsetDateTime dateTime; - - public static final String JSON_PROPERTY_PO_I_SOFTWARE = "POISoftware"; - private POISoftware poISoftware; - - public static final String JSON_PROPERTY_PO_I_TERMINAL_DATA = "POITerminalData"; - private POITerminalData poITerminalData; - - public static final String JSON_PROPERTY_PO_I_STATUS = "POIStatus"; - private POIStatus poIStatus; - - public POISystemData() { - } - - public POISystemData dateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; - return this; - } - - /** - * Get dateTime - * @return dateTime - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_DATE_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OffsetDateTime getDateTime() { - return dateTime; - } - - - /** - * dateTime - * - * @param dateTime - */ - @JsonProperty(JSON_PROPERTY_DATE_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; - } - - - public POISystemData poISoftware(POISoftware poISoftware) { - this.poISoftware = poISoftware; - return this; - } - - /** - * Get poISoftware - * @return poISoftware - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PO_I_SOFTWARE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public POISoftware getPoISoftware() { - return poISoftware; - } - - - /** - * poISoftware - * - * @param poISoftware - */ - @JsonProperty(JSON_PROPERTY_PO_I_SOFTWARE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoISoftware(POISoftware poISoftware) { - this.poISoftware = poISoftware; - } - - - public POISystemData poITerminalData(POITerminalData poITerminalData) { - this.poITerminalData = poITerminalData; - return this; - } - - /** - * Get poITerminalData - * @return poITerminalData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PO_I_TERMINAL_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public POITerminalData getPoITerminalData() { - return poITerminalData; - } - - - /** - * poITerminalData - * - * @param poITerminalData - */ - @JsonProperty(JSON_PROPERTY_PO_I_TERMINAL_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoITerminalData(POITerminalData poITerminalData) { - this.poITerminalData = poITerminalData; - } - - - public POISystemData poIStatus(POIStatus poIStatus) { - this.poIStatus = poIStatus; - return this; - } - - /** - * Get poIStatus - * @return poIStatus - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PO_I_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public POIStatus getPoIStatus() { - return poIStatus; - } - - - /** - * poIStatus - * - * @param poIStatus - */ - @JsonProperty(JSON_PROPERTY_PO_I_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoIStatus(POIStatus poIStatus) { - this.poIStatus = poIStatus; - } - - - /** - * Return true if this POISystemData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - POISystemData poISystemData = (POISystemData) o; - return Objects.equals(this.dateTime, poISystemData.dateTime) && - Objects.equals(this.poISoftware, poISystemData.poISoftware) && - Objects.equals(this.poITerminalData, poISystemData.poITerminalData) && - Objects.equals(this.poIStatus, poISystemData.poIStatus); - } - - @Override - public int hashCode() { - return Objects.hash(dateTime, poISoftware, poITerminalData, poIStatus); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class POISystemData {\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" poISoftware: ").append(toIndentedString(poISoftware)).append("\n"); - sb.append(" poITerminalData: ").append(toIndentedString(poITerminalData)).append("\n"); - sb.append(" poIStatus: ").append(toIndentedString(poIStatus)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of POISystemData given an JSON string - * - * @param jsonString JSON string - * @return An instance of POISystemData - * @throws JsonProcessingException if the JSON string is invalid with respect to POISystemData - */ - public static POISystemData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, POISystemData.class); - } -/** - * Convert an instance of POISystemData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/POITerminalData.java b/src/main/java/com/adyen/model/terminal/POITerminalData.java deleted file mode 100644 index efd94c3aa..000000000 --- a/src/main/java/com/adyen/model/terminal/POITerminalData.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.POIProfile; -import com.adyen.model.terminal.TerminalEnvironment; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * POITerminalData - */ -@JsonPropertyOrder({ - POITerminalData.JSON_PROPERTY_TERMINAL_ENVIRONMENT, - POITerminalData.JSON_PROPERTY_PO_I_CAPABILITIES, - POITerminalData.JSON_PROPERTY_PO_I_PROFILE, - POITerminalData.JSON_PROPERTY_PO_I_SERIAL_NUMBER -}) - -public class POITerminalData { - public static final String JSON_PROPERTY_TERMINAL_ENVIRONMENT = "TerminalEnvironment"; - private TerminalEnvironment terminalEnvironment; - - /** - * Gets or Sets poICapabilities - */ - public enum PoICapabilitiesEnum { - CASHHANDLING("CashHandling"), - - CASHIERDISPLAY("CashierDisplay"), - - CASHIERERROR("CashierError"), - - CASHIERINPUT("CashierInput"), - - CUSTOMERDISPLAY("CustomerDisplay"), - - CUSTOMERERROR("CustomerError"), - - CUSTOMERINPUT("CustomerInput"), - - EMVCONTACTLESS("EMVContactless"), - - ICC("ICC"), - - MAGSTRIPE("MagStripe"), - - PRINTERDOCUMENT("PrinterDocument"), - - PRINTERRECEIPT("PrinterReceipt"), - - PRINTERVOUCHER("PrinterVoucher"); - - private String value; - - PoICapabilitiesEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static PoICapabilitiesEnum fromValue(String value) { - for (PoICapabilitiesEnum b : PoICapabilitiesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_PO_I_CAPABILITIES = "POICapabilities"; - private List poICapabilities = new ArrayList<>(); - - public static final String JSON_PROPERTY_PO_I_PROFILE = "POIProfile"; - private POIProfile poIProfile; - - public static final String JSON_PROPERTY_PO_I_SERIAL_NUMBER = "POISerialNumber"; - private String poISerialNumber; - - public POITerminalData() { - } - - public POITerminalData terminalEnvironment(TerminalEnvironment terminalEnvironment) { - this.terminalEnvironment = terminalEnvironment; - return this; - } - - /** - * Get terminalEnvironment - * @return terminalEnvironment - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_TERMINAL_ENVIRONMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TerminalEnvironment getTerminalEnvironment() { - return terminalEnvironment; - } - - - /** - * terminalEnvironment - * - * @param terminalEnvironment - */ - @JsonProperty(JSON_PROPERTY_TERMINAL_ENVIRONMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTerminalEnvironment(TerminalEnvironment terminalEnvironment) { - this.terminalEnvironment = terminalEnvironment; - } - - - public POITerminalData poICapabilities(List poICapabilities) { - this.poICapabilities = poICapabilities; - return this; - } - - public POITerminalData addPoICapabilitiesItem(PoICapabilitiesEnum poICapabilitiesItem) { - this.poICapabilities.add(poICapabilitiesItem); - return this; - } - - /** - * Get poICapabilities - * @return poICapabilities - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PO_I_CAPABILITIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPoICapabilities() { - return poICapabilities; - } - - - /** - * poICapabilities - * - * @param poICapabilities - */ - @JsonProperty(JSON_PROPERTY_PO_I_CAPABILITIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoICapabilities(List poICapabilities) { - this.poICapabilities = poICapabilities; - } - - - public POITerminalData poIProfile(POIProfile poIProfile) { - this.poIProfile = poIProfile; - return this; - } - - /** - * Get poIProfile - * @return poIProfile - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PO_I_PROFILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public POIProfile getPoIProfile() { - return poIProfile; - } - - - /** - * poIProfile - * - * @param poIProfile - */ - @JsonProperty(JSON_PROPERTY_PO_I_PROFILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoIProfile(POIProfile poIProfile) { - this.poIProfile = poIProfile; - } - - - public POITerminalData poISerialNumber(String poISerialNumber) { - this.poISerialNumber = poISerialNumber; - return this; - } - - /** - * Get poISerialNumber - * @return poISerialNumber - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PO_I_SERIAL_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPoISerialNumber() { - return poISerialNumber; - } - - - /** - * poISerialNumber - * - * @param poISerialNumber - */ - @JsonProperty(JSON_PROPERTY_PO_I_SERIAL_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoISerialNumber(String poISerialNumber) { - this.poISerialNumber = poISerialNumber; - } - - - /** - * Return true if this POITerminalData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - POITerminalData poITerminalData = (POITerminalData) o; - return Objects.equals(this.terminalEnvironment, poITerminalData.terminalEnvironment) && - Objects.equals(this.poICapabilities, poITerminalData.poICapabilities) && - Objects.equals(this.poIProfile, poITerminalData.poIProfile) && - Objects.equals(this.poISerialNumber, poITerminalData.poISerialNumber); - } - - @Override - public int hashCode() { - return Objects.hash(terminalEnvironment, poICapabilities, poIProfile, poISerialNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class POITerminalData {\n"); - sb.append(" terminalEnvironment: ").append(toIndentedString(terminalEnvironment)).append("\n"); - sb.append(" poICapabilities: ").append(toIndentedString(poICapabilities)).append("\n"); - sb.append(" poIProfile: ").append(toIndentedString(poIProfile)).append("\n"); - sb.append(" poISerialNumber: ").append(toIndentedString(poISerialNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of POITerminalData given an JSON string - * - * @param jsonString JSON string - * @return An instance of POITerminalData - * @throws JsonProcessingException if the JSON string is invalid with respect to POITerminalData - */ - public static POITerminalData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, POITerminalData.class); - } -/** - * Convert an instance of POITerminalData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PaymentAccountReq.java b/src/main/java/com/adyen/model/terminal/PaymentAccountReq.java deleted file mode 100644 index 6a4b83696..000000000 --- a/src/main/java/com/adyen/model/terminal/PaymentAccountReq.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.AccountType; -import com.adyen.model.terminal.PaymentInstrumentData; -import com.adyen.model.terminal.TransactionIDType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * PaymentAccountReq - */ -@JsonPropertyOrder({ - PaymentAccountReq.JSON_PROPERTY_ACCOUNT_TYPE, - PaymentAccountReq.JSON_PROPERTY_CARD_ACQUISITION_REFERENCE, - PaymentAccountReq.JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA -}) - -public class PaymentAccountReq { - public static final String JSON_PROPERTY_ACCOUNT_TYPE = "AccountType"; - private AccountType accountType; - - public static final String JSON_PROPERTY_CARD_ACQUISITION_REFERENCE = "CardAcquisitionReference"; - private TransactionIDType cardAcquisitionReference; - - public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA = "PaymentInstrumentData"; - private PaymentInstrumentData paymentInstrumentData; - - public PaymentAccountReq() { - } - - public PaymentAccountReq accountType(AccountType accountType) { - this.accountType = accountType; - return this; - } - - /** - * Get accountType - * @return accountType - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public AccountType getAccountType() { - return accountType; - } - - - /** - * accountType - * - * @param accountType - */ - @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountType(AccountType accountType) { - this.accountType = accountType; - } - - - public PaymentAccountReq cardAcquisitionReference(TransactionIDType cardAcquisitionReference) { - this.cardAcquisitionReference = cardAcquisitionReference; - return this; - } - - /** - * Get cardAcquisitionReference - * @return cardAcquisitionReference - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CARD_ACQUISITION_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransactionIDType getCardAcquisitionReference() { - return cardAcquisitionReference; - } - - - /** - * cardAcquisitionReference - * - * @param cardAcquisitionReference - */ - @JsonProperty(JSON_PROPERTY_CARD_ACQUISITION_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCardAcquisitionReference(TransactionIDType cardAcquisitionReference) { - this.cardAcquisitionReference = cardAcquisitionReference; - } - - - public PaymentAccountReq paymentInstrumentData(PaymentInstrumentData paymentInstrumentData) { - this.paymentInstrumentData = paymentInstrumentData; - return this; - } - - /** - * Get paymentInstrumentData - * @return paymentInstrumentData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentInstrumentData getPaymentInstrumentData() { - return paymentInstrumentData; - } - - - /** - * paymentInstrumentData - * - * @param paymentInstrumentData - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentInstrumentData(PaymentInstrumentData paymentInstrumentData) { - this.paymentInstrumentData = paymentInstrumentData; - } - - - /** - * Return true if this PaymentAccountReq object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentAccountReq paymentAccountReq = (PaymentAccountReq) o; - return Objects.equals(this.accountType, paymentAccountReq.accountType) && - Objects.equals(this.cardAcquisitionReference, paymentAccountReq.cardAcquisitionReference) && - Objects.equals(this.paymentInstrumentData, paymentAccountReq.paymentInstrumentData); - } - - @Override - public int hashCode() { - return Objects.hash(accountType, cardAcquisitionReference, paymentInstrumentData); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentAccountReq {\n"); - sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); - sb.append(" cardAcquisitionReference: ").append(toIndentedString(cardAcquisitionReference)).append("\n"); - sb.append(" paymentInstrumentData: ").append(toIndentedString(paymentInstrumentData)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PaymentAccountReq given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentAccountReq - * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentAccountReq - */ - public static PaymentAccountReq fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PaymentAccountReq.class); - } -/** - * Convert an instance of PaymentAccountReq to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PaymentAccountStatus.java b/src/main/java/com/adyen/model/terminal/PaymentAccountStatus.java deleted file mode 100644 index 740e05e13..000000000 --- a/src/main/java/com/adyen/model/terminal/PaymentAccountStatus.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.PaymentAcquirerData; -import com.adyen.model.terminal.PaymentInstrumentData; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * PaymentAccountStatus - */ -@JsonPropertyOrder({ - PaymentAccountStatus.JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA, - PaymentAccountStatus.JSON_PROPERTY_CURRENT_BALANCE, - PaymentAccountStatus.JSON_PROPERTY_CURRENCY, - PaymentAccountStatus.JSON_PROPERTY_PAYMENT_ACQUIRER_DATA -}) - -public class PaymentAccountStatus { - public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA = "PaymentInstrumentData"; - private PaymentInstrumentData paymentInstrumentData; - - public static final String JSON_PROPERTY_CURRENT_BALANCE = "CurrentBalance"; - private BigDecimal currentBalance; - - public static final String JSON_PROPERTY_CURRENCY = "Currency"; - private String currency; - - public static final String JSON_PROPERTY_PAYMENT_ACQUIRER_DATA = "PaymentAcquirerData"; - private PaymentAcquirerData paymentAcquirerData; - - public PaymentAccountStatus() { - } - - public PaymentAccountStatus paymentInstrumentData(PaymentInstrumentData paymentInstrumentData) { - this.paymentInstrumentData = paymentInstrumentData; - return this; - } - - /** - * Get paymentInstrumentData - * @return paymentInstrumentData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentInstrumentData getPaymentInstrumentData() { - return paymentInstrumentData; - } - - - /** - * paymentInstrumentData - * - * @param paymentInstrumentData - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentInstrumentData(PaymentInstrumentData paymentInstrumentData) { - this.paymentInstrumentData = paymentInstrumentData; - } - - - public PaymentAccountStatus currentBalance(BigDecimal currentBalance) { - this.currentBalance = currentBalance; - return this; - } - - /** - * Get currentBalance - * minimum: 0.0 - * maximum: 99999999.999999 - * @return currentBalance - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CURRENT_BALANCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getCurrentBalance() { - return currentBalance; - } - - - /** - * currentBalance - * - * @param currentBalance - */ - @JsonProperty(JSON_PROPERTY_CURRENT_BALANCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrentBalance(BigDecimal currentBalance) { - this.currentBalance = currentBalance; - } - - - public PaymentAccountStatus currency(String currency) { - this.currency = currency; - return this; - } - - /** - * Get currency - * @return currency - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCurrency() { - return currency; - } - - - /** - * currency - * - * @param currency - */ - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrency(String currency) { - this.currency = currency; - } - - - public PaymentAccountStatus paymentAcquirerData(PaymentAcquirerData paymentAcquirerData) { - this.paymentAcquirerData = paymentAcquirerData; - return this; - } - - /** - * Get paymentAcquirerData - * @return paymentAcquirerData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_ACQUIRER_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentAcquirerData getPaymentAcquirerData() { - return paymentAcquirerData; - } - - - /** - * paymentAcquirerData - * - * @param paymentAcquirerData - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_ACQUIRER_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentAcquirerData(PaymentAcquirerData paymentAcquirerData) { - this.paymentAcquirerData = paymentAcquirerData; - } - - - /** - * Return true if this PaymentAccountStatus object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentAccountStatus paymentAccountStatus = (PaymentAccountStatus) o; - return Objects.equals(this.paymentInstrumentData, paymentAccountStatus.paymentInstrumentData) && - Objects.equals(this.currentBalance, paymentAccountStatus.currentBalance) && - Objects.equals(this.currency, paymentAccountStatus.currency) && - Objects.equals(this.paymentAcquirerData, paymentAccountStatus.paymentAcquirerData); - } - - @Override - public int hashCode() { - return Objects.hash(paymentInstrumentData, currentBalance, currency, paymentAcquirerData); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentAccountStatus {\n"); - sb.append(" paymentInstrumentData: ").append(toIndentedString(paymentInstrumentData)).append("\n"); - sb.append(" currentBalance: ").append(toIndentedString(currentBalance)).append("\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append(" paymentAcquirerData: ").append(toIndentedString(paymentAcquirerData)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PaymentAccountStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentAccountStatus - * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentAccountStatus - */ - public static PaymentAccountStatus fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PaymentAccountStatus.class); - } -/** - * Convert an instance of PaymentAccountStatus to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PaymentAcquirerData.java b/src/main/java/com/adyen/model/terminal/PaymentAcquirerData.java deleted file mode 100644 index 49aab8b4a..000000000 --- a/src/main/java/com/adyen/model/terminal/PaymentAcquirerData.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.TransactionIDType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Data related to the response from the payment Acquirer. - */ -@ApiModel(description = "Data related to the response from the payment Acquirer.") -@JsonPropertyOrder({ - PaymentAcquirerData.JSON_PROPERTY_ACQUIRER_I_D, - PaymentAcquirerData.JSON_PROPERTY_MERCHANT_I_D, - PaymentAcquirerData.JSON_PROPERTY_ACQUIRER_P_O_I_I_D, - PaymentAcquirerData.JSON_PROPERTY_ACQUIRER_TRANSACTION_I_D, - PaymentAcquirerData.JSON_PROPERTY_APPROVAL_CODE, - PaymentAcquirerData.JSON_PROPERTY_HOST_RECONCILIATION_I_D -}) - -public class PaymentAcquirerData { - public static final String JSON_PROPERTY_ACQUIRER_I_D = "AcquirerID"; - private Integer acquirerID; - - public static final String JSON_PROPERTY_MERCHANT_I_D = "MerchantID"; - private String merchantID; - - public static final String JSON_PROPERTY_ACQUIRER_P_O_I_I_D = "AcquirerPOIID"; - private String acquirerPOIID; - - public static final String JSON_PROPERTY_ACQUIRER_TRANSACTION_I_D = "AcquirerTransactionID"; - private TransactionIDType acquirerTransactionID; - - public static final String JSON_PROPERTY_APPROVAL_CODE = "ApprovalCode"; - private String approvalCode; - - public static final String JSON_PROPERTY_HOST_RECONCILIATION_I_D = "HostReconciliationID"; - private String hostReconciliationID; - - public PaymentAcquirerData() { - } - - public PaymentAcquirerData acquirerID(Integer acquirerID) { - this.acquirerID = acquirerID; - return this; - } - - /** - * If several Acquirers. - * @return acquirerID - **/ - @ApiModelProperty(value = "If several Acquirers.") - @JsonProperty(JSON_PROPERTY_ACQUIRER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getAcquirerID() { - return acquirerID; - } - - - /** - * If several Acquirers. - * - * @param acquirerID - */ - @JsonProperty(JSON_PROPERTY_ACQUIRER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAcquirerID(Integer acquirerID) { - this.acquirerID = acquirerID; - } - - - public PaymentAcquirerData merchantID(String merchantID) { - this.merchantID = merchantID; - return this; - } - - /** - * Identification of the Merchant for the Acquirer. - * @return merchantID - **/ - @ApiModelProperty(required = true, value = "Identification of the Merchant for the Acquirer.") - @JsonProperty(JSON_PROPERTY_MERCHANT_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getMerchantID() { - return merchantID; - } - - - /** - * Identification of the Merchant for the Acquirer. - * - * @param merchantID - */ - @JsonProperty(JSON_PROPERTY_MERCHANT_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMerchantID(String merchantID) { - this.merchantID = merchantID; - } - - - public PaymentAcquirerData acquirerPOIID(String acquirerPOIID) { - this.acquirerPOIID = acquirerPOIID; - return this; - } - - /** - * Identification of the POI for the payment Acquirer. - * @return acquirerPOIID - **/ - @ApiModelProperty(required = true, value = "Identification of the POI for the payment Acquirer.") - @JsonProperty(JSON_PROPERTY_ACQUIRER_P_O_I_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getAcquirerPOIID() { - return acquirerPOIID; - } - - - /** - * Identification of the POI for the payment Acquirer. - * - * @param acquirerPOIID - */ - @JsonProperty(JSON_PROPERTY_ACQUIRER_P_O_I_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAcquirerPOIID(String acquirerPOIID) { - this.acquirerPOIID = acquirerPOIID; - } - - - public PaymentAcquirerData acquirerTransactionID(TransactionIDType acquirerTransactionID) { - this.acquirerTransactionID = acquirerTransactionID; - return this; - } - - /** - * Get acquirerTransactionID - * @return acquirerTransactionID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ACQUIRER_TRANSACTION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransactionIDType getAcquirerTransactionID() { - return acquirerTransactionID; - } - - - /** - * acquirerTransactionID - * - * @param acquirerTransactionID - */ - @JsonProperty(JSON_PROPERTY_ACQUIRER_TRANSACTION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAcquirerTransactionID(TransactionIDType acquirerTransactionID) { - this.acquirerTransactionID = acquirerTransactionID; - } - - - public PaymentAcquirerData approvalCode(String approvalCode) { - this.approvalCode = approvalCode; - return this; - } - - /** - * If available. - * @return approvalCode - **/ - @ApiModelProperty(value = "If available.") - @JsonProperty(JSON_PROPERTY_APPROVAL_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getApprovalCode() { - return approvalCode; - } - - - /** - * If available. - * - * @param approvalCode - */ - @JsonProperty(JSON_PROPERTY_APPROVAL_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApprovalCode(String approvalCode) { - this.approvalCode = approvalCode; - } - - - public PaymentAcquirerData hostReconciliationID(String hostReconciliationID) { - this.hostReconciliationID = hostReconciliationID; - return this; - } - - /** - * Get hostReconciliationID - * @return hostReconciliationID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_HOST_RECONCILIATION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getHostReconciliationID() { - return hostReconciliationID; - } - - - /** - * hostReconciliationID - * - * @param hostReconciliationID - */ - @JsonProperty(JSON_PROPERTY_HOST_RECONCILIATION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHostReconciliationID(String hostReconciliationID) { - this.hostReconciliationID = hostReconciliationID; - } - - - /** - * Return true if this PaymentAcquirerData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentAcquirerData paymentAcquirerData = (PaymentAcquirerData) o; - return Objects.equals(this.acquirerID, paymentAcquirerData.acquirerID) && - Objects.equals(this.merchantID, paymentAcquirerData.merchantID) && - Objects.equals(this.acquirerPOIID, paymentAcquirerData.acquirerPOIID) && - Objects.equals(this.acquirerTransactionID, paymentAcquirerData.acquirerTransactionID) && - Objects.equals(this.approvalCode, paymentAcquirerData.approvalCode) && - Objects.equals(this.hostReconciliationID, paymentAcquirerData.hostReconciliationID); - } - - @Override - public int hashCode() { - return Objects.hash(acquirerID, merchantID, acquirerPOIID, acquirerTransactionID, approvalCode, hostReconciliationID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentAcquirerData {\n"); - sb.append(" acquirerID: ").append(toIndentedString(acquirerID)).append("\n"); - sb.append(" merchantID: ").append(toIndentedString(merchantID)).append("\n"); - sb.append(" acquirerPOIID: ").append(toIndentedString(acquirerPOIID)).append("\n"); - sb.append(" acquirerTransactionID: ").append(toIndentedString(acquirerTransactionID)).append("\n"); - sb.append(" approvalCode: ").append(toIndentedString(approvalCode)).append("\n"); - sb.append(" hostReconciliationID: ").append(toIndentedString(hostReconciliationID)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PaymentAcquirerData given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentAcquirerData - * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentAcquirerData - */ - public static PaymentAcquirerData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PaymentAcquirerData.class); - } -/** - * Convert an instance of PaymentAcquirerData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PaymentData.java b/src/main/java/com/adyen/model/terminal/PaymentData.java deleted file mode 100644 index b4b6b3074..000000000 --- a/src/main/java/com/adyen/model/terminal/PaymentData.java +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.CustomerOrder; -import com.adyen.model.terminal.Instalment; -import com.adyen.model.terminal.PaymentInstrumentData; -import com.adyen.model.terminal.PaymentType; -import com.adyen.model.terminal.TransactionIDType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.time.LocalDate; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * PaymentData - */ -@JsonPropertyOrder({ - PaymentData.JSON_PROPERTY_PAYMENT_TYPE, - PaymentData.JSON_PROPERTY_SPLIT_PAYMENT_FLAG, - PaymentData.JSON_PROPERTY_REQUESTED_VALIDITY_DATE, - PaymentData.JSON_PROPERTY_CARD_ACQUISITION_REFERENCE, - PaymentData.JSON_PROPERTY_INSTALMENT, - PaymentData.JSON_PROPERTY_CUSTOMER_ORDER, - PaymentData.JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA -}) - -public class PaymentData { - public static final String JSON_PROPERTY_PAYMENT_TYPE = "PaymentType"; - private PaymentType paymentType; - - public static final String JSON_PROPERTY_SPLIT_PAYMENT_FLAG = "SplitPaymentFlag"; - private Boolean splitPaymentFlag = false; - - public static final String JSON_PROPERTY_REQUESTED_VALIDITY_DATE = "RequestedValidityDate"; - private LocalDate requestedValidityDate; - - public static final String JSON_PROPERTY_CARD_ACQUISITION_REFERENCE = "CardAcquisitionReference"; - private TransactionIDType cardAcquisitionReference; - - public static final String JSON_PROPERTY_INSTALMENT = "Instalment"; - private Instalment instalment; - - public static final String JSON_PROPERTY_CUSTOMER_ORDER = "CustomerOrder"; - private CustomerOrder customerOrder; - - public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA = "PaymentInstrumentData"; - private PaymentInstrumentData paymentInstrumentData; - - public PaymentData() { - } - - public PaymentData paymentType(PaymentType paymentType) { - this.paymentType = paymentType; - return this; - } - - /** - * Get paymentType - * @return paymentType - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentType getPaymentType() { - return paymentType; - } - - - /** - * paymentType - * - * @param paymentType - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentType(PaymentType paymentType) { - this.paymentType = paymentType; - } - - - public PaymentData splitPaymentFlag(Boolean splitPaymentFlag) { - this.splitPaymentFlag = splitPaymentFlag; - return this; - } - - /** - * Get splitPaymentFlag - * @return splitPaymentFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SPLIT_PAYMENT_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getSplitPaymentFlag() { - return splitPaymentFlag; - } - - - /** - * splitPaymentFlag - * - * @param splitPaymentFlag - */ - @JsonProperty(JSON_PROPERTY_SPLIT_PAYMENT_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSplitPaymentFlag(Boolean splitPaymentFlag) { - this.splitPaymentFlag = splitPaymentFlag; - } - - - public PaymentData requestedValidityDate(LocalDate requestedValidityDate) { - this.requestedValidityDate = requestedValidityDate; - return this; - } - - /** - * Get requestedValidityDate - * @return requestedValidityDate - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_REQUESTED_VALIDITY_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LocalDate getRequestedValidityDate() { - return requestedValidityDate; - } - - - /** - * requestedValidityDate - * - * @param requestedValidityDate - */ - @JsonProperty(JSON_PROPERTY_REQUESTED_VALIDITY_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestedValidityDate(LocalDate requestedValidityDate) { - this.requestedValidityDate = requestedValidityDate; - } - - - public PaymentData cardAcquisitionReference(TransactionIDType cardAcquisitionReference) { - this.cardAcquisitionReference = cardAcquisitionReference; - return this; - } - - /** - * Get cardAcquisitionReference - * @return cardAcquisitionReference - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CARD_ACQUISITION_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransactionIDType getCardAcquisitionReference() { - return cardAcquisitionReference; - } - - - /** - * cardAcquisitionReference - * - * @param cardAcquisitionReference - */ - @JsonProperty(JSON_PROPERTY_CARD_ACQUISITION_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCardAcquisitionReference(TransactionIDType cardAcquisitionReference) { - this.cardAcquisitionReference = cardAcquisitionReference; - } - - - public PaymentData instalment(Instalment instalment) { - this.instalment = instalment; - return this; - } - - /** - * Get instalment - * @return instalment - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_INSTALMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Instalment getInstalment() { - return instalment; - } - - - /** - * instalment - * - * @param instalment - */ - @JsonProperty(JSON_PROPERTY_INSTALMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstalment(Instalment instalment) { - this.instalment = instalment; - } - - - public PaymentData customerOrder(CustomerOrder customerOrder) { - this.customerOrder = customerOrder; - return this; - } - - /** - * Get customerOrder - * @return customerOrder - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public CustomerOrder getCustomerOrder() { - return customerOrder; - } - - - /** - * customerOrder - * - * @param customerOrder - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerOrder(CustomerOrder customerOrder) { - this.customerOrder = customerOrder; - } - - - public PaymentData paymentInstrumentData(PaymentInstrumentData paymentInstrumentData) { - this.paymentInstrumentData = paymentInstrumentData; - return this; - } - - /** - * Get paymentInstrumentData - * @return paymentInstrumentData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentInstrumentData getPaymentInstrumentData() { - return paymentInstrumentData; - } - - - /** - * paymentInstrumentData - * - * @param paymentInstrumentData - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentInstrumentData(PaymentInstrumentData paymentInstrumentData) { - this.paymentInstrumentData = paymentInstrumentData; - } - - - /** - * Return true if this PaymentData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentData paymentData = (PaymentData) o; - return Objects.equals(this.paymentType, paymentData.paymentType) && - Objects.equals(this.splitPaymentFlag, paymentData.splitPaymentFlag) && - Objects.equals(this.requestedValidityDate, paymentData.requestedValidityDate) && - Objects.equals(this.cardAcquisitionReference, paymentData.cardAcquisitionReference) && - Objects.equals(this.instalment, paymentData.instalment) && - Objects.equals(this.customerOrder, paymentData.customerOrder) && - Objects.equals(this.paymentInstrumentData, paymentData.paymentInstrumentData); - } - - @Override - public int hashCode() { - return Objects.hash(paymentType, splitPaymentFlag, requestedValidityDate, cardAcquisitionReference, instalment, customerOrder, paymentInstrumentData); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentData {\n"); - sb.append(" paymentType: ").append(toIndentedString(paymentType)).append("\n"); - sb.append(" splitPaymentFlag: ").append(toIndentedString(splitPaymentFlag)).append("\n"); - sb.append(" requestedValidityDate: ").append(toIndentedString(requestedValidityDate)).append("\n"); - sb.append(" cardAcquisitionReference: ").append(toIndentedString(cardAcquisitionReference)).append("\n"); - sb.append(" instalment: ").append(toIndentedString(instalment)).append("\n"); - sb.append(" customerOrder: ").append(toIndentedString(customerOrder)).append("\n"); - sb.append(" paymentInstrumentData: ").append(toIndentedString(paymentInstrumentData)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PaymentData given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentData - * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentData - */ - public static PaymentData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PaymentData.class); - } -/** - * Convert an instance of PaymentData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PaymentInstrumentData.java b/src/main/java/com/adyen/model/terminal/PaymentInstrumentData.java deleted file mode 100644 index 26c4a4ee9..000000000 --- a/src/main/java/com/adyen/model/terminal/PaymentInstrumentData.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.CardData; -import com.adyen.model.terminal.CheckData; -import com.adyen.model.terminal.MobileData; -import com.adyen.model.terminal.PaymentInstrumentType; -import com.adyen.model.terminal.StoredValueAccountID; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Sent in the result of the payment transaction. For a card, it could also be sent in the CardAcquisition response, to be processed by the Sale System. Data related to the instrument of payment for the transaction. - */ -@ApiModel(description = "Sent in the result of the payment transaction. For a card, it could also be sent in the CardAcquisition response, to be processed by the Sale System. Data related to the instrument of payment for the transaction.") -@JsonPropertyOrder({ - PaymentInstrumentData.JSON_PROPERTY_PAYMENT_INSTRUMENT_TYPE, - PaymentInstrumentData.JSON_PROPERTY_PROTECTED_CARD_DATA, - PaymentInstrumentData.JSON_PROPERTY_CARD_DATA, - PaymentInstrumentData.JSON_PROPERTY_CHECK_DATA, - PaymentInstrumentData.JSON_PROPERTY_MOBILE_DATA, - PaymentInstrumentData.JSON_PROPERTY_STORED_VALUE_ACCOUNT_I_D -}) - -public class PaymentInstrumentData { - public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_TYPE = "PaymentInstrumentType"; - private PaymentInstrumentType paymentInstrumentType; - - public static final String JSON_PROPERTY_PROTECTED_CARD_DATA = "ProtectedCardData"; - private String protectedCardData; - - public static final String JSON_PROPERTY_CARD_DATA = "CardData"; - private CardData cardData; - - public static final String JSON_PROPERTY_CHECK_DATA = "CheckData"; - private CheckData checkData; - - public static final String JSON_PROPERTY_MOBILE_DATA = "MobileData"; - private MobileData mobileData; - - public static final String JSON_PROPERTY_STORED_VALUE_ACCOUNT_I_D = "StoredValueAccountID"; - private StoredValueAccountID storedValueAccountID; - - public PaymentInstrumentData() { - } - - public PaymentInstrumentData paymentInstrumentType(PaymentInstrumentType paymentInstrumentType) { - this.paymentInstrumentType = paymentInstrumentType; - return this; - } - - /** - * Get paymentInstrumentType - * @return paymentInstrumentType - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentInstrumentType getPaymentInstrumentType() { - return paymentInstrumentType; - } - - - /** - * paymentInstrumentType - * - * @param paymentInstrumentType - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentInstrumentType(PaymentInstrumentType paymentInstrumentType) { - this.paymentInstrumentType = paymentInstrumentType; - } - - - public PaymentInstrumentData protectedCardData(String protectedCardData) { - this.protectedCardData = protectedCardData; - return this; - } - - /** - * Get protectedCardData - * @return protectedCardData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PROTECTED_CARD_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getProtectedCardData() { - return protectedCardData; - } - - - /** - * protectedCardData - * - * @param protectedCardData - */ - @JsonProperty(JSON_PROPERTY_PROTECTED_CARD_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProtectedCardData(String protectedCardData) { - this.protectedCardData = protectedCardData; - } - - - public PaymentInstrumentData cardData(CardData cardData) { - this.cardData = cardData; - return this; - } - - /** - * Get cardData - * @return cardData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CARD_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public CardData getCardData() { - return cardData; - } - - - /** - * cardData - * - * @param cardData - */ - @JsonProperty(JSON_PROPERTY_CARD_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCardData(CardData cardData) { - this.cardData = cardData; - } - - - public PaymentInstrumentData checkData(CheckData checkData) { - this.checkData = checkData; - return this; - } - - /** - * Get checkData - * @return checkData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CHECK_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public CheckData getCheckData() { - return checkData; - } - - - /** - * checkData - * - * @param checkData - */ - @JsonProperty(JSON_PROPERTY_CHECK_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCheckData(CheckData checkData) { - this.checkData = checkData; - } - - - public PaymentInstrumentData mobileData(MobileData mobileData) { - this.mobileData = mobileData; - return this; - } - - /** - * Get mobileData - * @return mobileData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MOBILE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public MobileData getMobileData() { - return mobileData; - } - - - /** - * mobileData - * - * @param mobileData - */ - @JsonProperty(JSON_PROPERTY_MOBILE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMobileData(MobileData mobileData) { - this.mobileData = mobileData; - } - - - public PaymentInstrumentData storedValueAccountID(StoredValueAccountID storedValueAccountID) { - this.storedValueAccountID = storedValueAccountID; - return this; - } - - /** - * Get storedValueAccountID - * @return storedValueAccountID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_STORED_VALUE_ACCOUNT_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public StoredValueAccountID getStoredValueAccountID() { - return storedValueAccountID; - } - - - /** - * storedValueAccountID - * - * @param storedValueAccountID - */ - @JsonProperty(JSON_PROPERTY_STORED_VALUE_ACCOUNT_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoredValueAccountID(StoredValueAccountID storedValueAccountID) { - this.storedValueAccountID = storedValueAccountID; - } - - - /** - * Return true if this PaymentInstrumentData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentInstrumentData paymentInstrumentData = (PaymentInstrumentData) o; - return Objects.equals(this.paymentInstrumentType, paymentInstrumentData.paymentInstrumentType) && - Objects.equals(this.protectedCardData, paymentInstrumentData.protectedCardData) && - Objects.equals(this.cardData, paymentInstrumentData.cardData) && - Objects.equals(this.checkData, paymentInstrumentData.checkData) && - Objects.equals(this.mobileData, paymentInstrumentData.mobileData) && - Objects.equals(this.storedValueAccountID, paymentInstrumentData.storedValueAccountID); - } - - @Override - public int hashCode() { - return Objects.hash(paymentInstrumentType, protectedCardData, cardData, checkData, mobileData, storedValueAccountID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentInstrumentData {\n"); - sb.append(" paymentInstrumentType: ").append(toIndentedString(paymentInstrumentType)).append("\n"); - sb.append(" protectedCardData: ").append(toIndentedString(protectedCardData)).append("\n"); - sb.append(" cardData: ").append(toIndentedString(cardData)).append("\n"); - sb.append(" checkData: ").append(toIndentedString(checkData)).append("\n"); - sb.append(" mobileData: ").append(toIndentedString(mobileData)).append("\n"); - sb.append(" storedValueAccountID: ").append(toIndentedString(storedValueAccountID)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PaymentInstrumentData given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentInstrumentData - * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentInstrumentData - */ - public static PaymentInstrumentData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PaymentInstrumentData.class); - } -/** - * Convert an instance of PaymentInstrumentData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PaymentInstrumentType.java b/src/main/java/com/adyen/model/terminal/PaymentInstrumentType.java deleted file mode 100644 index 8efb717c9..000000000 --- a/src/main/java/com/adyen/model/terminal/PaymentInstrumentType.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets PaymentInstrumentType - */ -public enum PaymentInstrumentType { - - CARD("Card"), - - CASH("Cash"), - - CHECK("Check"), - - MOBILE("Mobile"), - - STOREDVALUE("StoredValue"); - - private String value; - - PaymentInstrumentType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static PaymentInstrumentType fromValue(String value) { - for (PaymentInstrumentType b : PaymentInstrumentType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PaymentReceipt.java b/src/main/java/com/adyen/model/terminal/PaymentReceipt.java deleted file mode 100644 index c55fcc27d..000000000 --- a/src/main/java/com/adyen/model/terminal/PaymentReceipt.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.DocumentQualifier; -import com.adyen.model.terminal.OutputContent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * If the payment receipts are printed by the Sale system and the POI or the Sale does not implement the Print exchange (Basic profile). Customer or Merchant payment receipt. - */ -@ApiModel(description = "If the payment receipts are printed by the Sale system and the POI or the Sale does not implement the Print exchange (Basic profile). Customer or Merchant payment receipt.") -@JsonPropertyOrder({ - PaymentReceipt.JSON_PROPERTY_DOCUMENT_QUALIFIER, - PaymentReceipt.JSON_PROPERTY_INTEGRATED_PRINT_FLAG, - PaymentReceipt.JSON_PROPERTY_REQUIRED_SIGNATURE_FLAG, - PaymentReceipt.JSON_PROPERTY_OUTPUT_CONTENT -}) - -public class PaymentReceipt { - public static final String JSON_PROPERTY_DOCUMENT_QUALIFIER = "DocumentQualifier"; - private DocumentQualifier documentQualifier; - - public static final String JSON_PROPERTY_INTEGRATED_PRINT_FLAG = "IntegratedPrintFlag"; - private Boolean integratedPrintFlag; - - public static final String JSON_PROPERTY_REQUIRED_SIGNATURE_FLAG = "RequiredSignatureFlag"; - private Boolean requiredSignatureFlag = false; - - public static final String JSON_PROPERTY_OUTPUT_CONTENT = "OutputContent"; - private OutputContent outputContent; - - public PaymentReceipt() { - } - - public PaymentReceipt documentQualifier(DocumentQualifier documentQualifier) { - this.documentQualifier = documentQualifier; - return this; - } - - /** - * Get documentQualifier - * @return documentQualifier - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_DOCUMENT_QUALIFIER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public DocumentQualifier getDocumentQualifier() { - return documentQualifier; - } - - - /** - * documentQualifier - * - * @param documentQualifier - */ - @JsonProperty(JSON_PROPERTY_DOCUMENT_QUALIFIER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDocumentQualifier(DocumentQualifier documentQualifier) { - this.documentQualifier = documentQualifier; - } - - - public PaymentReceipt integratedPrintFlag(Boolean integratedPrintFlag) { - this.integratedPrintFlag = integratedPrintFlag; - return this; - } - - /** - * Type of the print integrated to other prints. - * @return integratedPrintFlag - **/ - @ApiModelProperty(value = "Type of the print integrated to other prints.") - @JsonProperty(JSON_PROPERTY_INTEGRATED_PRINT_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getIntegratedPrintFlag() { - return integratedPrintFlag; - } - - - /** - * Type of the print integrated to other prints. - * - * @param integratedPrintFlag - */ - @JsonProperty(JSON_PROPERTY_INTEGRATED_PRINT_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIntegratedPrintFlag(Boolean integratedPrintFlag) { - this.integratedPrintFlag = integratedPrintFlag; - } - - - public PaymentReceipt requiredSignatureFlag(Boolean requiredSignatureFlag) { - this.requiredSignatureFlag = requiredSignatureFlag; - return this; - } - - /** - * Indicate that the cardholder payment receipt requires a physical signature by the Customer. - * @return requiredSignatureFlag - **/ - @ApiModelProperty(value = "Indicate that the cardholder payment receipt requires a physical signature by the Customer.") - @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getRequiredSignatureFlag() { - return requiredSignatureFlag; - } - - - /** - * Indicate that the cardholder payment receipt requires a physical signature by the Customer. - * - * @param requiredSignatureFlag - */ - @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequiredSignatureFlag(Boolean requiredSignatureFlag) { - this.requiredSignatureFlag = requiredSignatureFlag; - } - - - public PaymentReceipt outputContent(OutputContent outputContent) { - this.outputContent = outputContent; - return this; - } - - /** - * Get outputContent - * @return outputContent - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_OUTPUT_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OutputContent getOutputContent() { - return outputContent; - } - - - /** - * outputContent - * - * @param outputContent - */ - @JsonProperty(JSON_PROPERTY_OUTPUT_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutputContent(OutputContent outputContent) { - this.outputContent = outputContent; - } - - - /** - * Return true if this PaymentReceipt object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentReceipt paymentReceipt = (PaymentReceipt) o; - return Objects.equals(this.documentQualifier, paymentReceipt.documentQualifier) && - Objects.equals(this.integratedPrintFlag, paymentReceipt.integratedPrintFlag) && - Objects.equals(this.requiredSignatureFlag, paymentReceipt.requiredSignatureFlag) && - Objects.equals(this.outputContent, paymentReceipt.outputContent); - } - - @Override - public int hashCode() { - return Objects.hash(documentQualifier, integratedPrintFlag, requiredSignatureFlag, outputContent); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentReceipt {\n"); - sb.append(" documentQualifier: ").append(toIndentedString(documentQualifier)).append("\n"); - sb.append(" integratedPrintFlag: ").append(toIndentedString(integratedPrintFlag)).append("\n"); - sb.append(" requiredSignatureFlag: ").append(toIndentedString(requiredSignatureFlag)).append("\n"); - sb.append(" outputContent: ").append(toIndentedString(outputContent)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PaymentReceipt given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentReceipt - * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentReceipt - */ - public static PaymentReceipt fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PaymentReceipt.class); - } -/** - * Convert an instance of PaymentReceipt to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PaymentRequest.java b/src/main/java/com/adyen/model/terminal/PaymentRequest.java deleted file mode 100644 index 84504da7e..000000000 --- a/src/main/java/com/adyen/model/terminal/PaymentRequest.java +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyData; -import com.adyen.model.terminal.PaymentData; -import com.adyen.model.terminal.PaymentTransaction; -import com.adyen.model.terminal.SaleData; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Request sent to terminal to initiate payment. It conveys Information related to the Payment transaction to process. Content of the Payment Request message. - */ -@ApiModel(description = "Request sent to terminal to initiate payment. It conveys Information related to the Payment transaction to process. Content of the Payment Request message.") -@JsonPropertyOrder({ - PaymentRequest.JSON_PROPERTY_SALE_DATA, - PaymentRequest.JSON_PROPERTY_PAYMENT_TRANSACTION, - PaymentRequest.JSON_PROPERTY_PAYMENT_DATA, - PaymentRequest.JSON_PROPERTY_LOYALTY_DATA -}) - -public class PaymentRequest { - public static final String JSON_PROPERTY_SALE_DATA = "SaleData"; - private SaleData saleData; - - public static final String JSON_PROPERTY_PAYMENT_TRANSACTION = "PaymentTransaction"; - private PaymentTransaction paymentTransaction; - - public static final String JSON_PROPERTY_PAYMENT_DATA = "PaymentData"; - private PaymentData paymentData; - - public static final String JSON_PROPERTY_LOYALTY_DATA = "LoyaltyData"; - private List loyaltyData = null; - - public PaymentRequest() { - } - - public PaymentRequest saleData(SaleData saleData) { - this.saleData = saleData; - return this; - } - - /** - * Get saleData - * @return saleData - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SaleData getSaleData() { - return saleData; - } - - - /** - * saleData - * - * @param saleData - */ - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleData(SaleData saleData) { - this.saleData = saleData; - } - - - public PaymentRequest paymentTransaction(PaymentTransaction paymentTransaction) { - this.paymentTransaction = paymentTransaction; - return this; - } - - /** - * Get paymentTransaction - * @return paymentTransaction - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_TRANSACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentTransaction getPaymentTransaction() { - return paymentTransaction; - } - - - /** - * paymentTransaction - * - * @param paymentTransaction - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_TRANSACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentTransaction(PaymentTransaction paymentTransaction) { - this.paymentTransaction = paymentTransaction; - } - - - public PaymentRequest paymentData(PaymentData paymentData) { - this.paymentData = paymentData; - return this; - } - - /** - * Get paymentData - * @return paymentData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentData getPaymentData() { - return paymentData; - } - - - /** - * paymentData - * - * @param paymentData - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentData(PaymentData paymentData) { - this.paymentData = paymentData; - } - - - public PaymentRequest loyaltyData(List loyaltyData) { - this.loyaltyData = loyaltyData; - return this; - } - - public PaymentRequest addLoyaltyDataItem(LoyaltyData loyaltyDataItem) { - if (this.loyaltyData == null) { - this.loyaltyData = new ArrayList<>(); - } - this.loyaltyData.add(loyaltyDataItem); - return this; - } - - /** - * Get loyaltyData - * @return loyaltyData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getLoyaltyData() { - return loyaltyData; - } - - - /** - * loyaltyData - * - * @param loyaltyData - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyData(List loyaltyData) { - this.loyaltyData = loyaltyData; - } - - - /** - * Return true if this PaymentRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentRequest paymentRequest = (PaymentRequest) o; - return Objects.equals(this.saleData, paymentRequest.saleData) && - Objects.equals(this.paymentTransaction, paymentRequest.paymentTransaction) && - Objects.equals(this.paymentData, paymentRequest.paymentData) && - Objects.equals(this.loyaltyData, paymentRequest.loyaltyData); - } - - @Override - public int hashCode() { - return Objects.hash(saleData, paymentTransaction, paymentData, loyaltyData); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentRequest {\n"); - sb.append(" saleData: ").append(toIndentedString(saleData)).append("\n"); - sb.append(" paymentTransaction: ").append(toIndentedString(paymentTransaction)).append("\n"); - sb.append(" paymentData: ").append(toIndentedString(paymentData)).append("\n"); - sb.append(" loyaltyData: ").append(toIndentedString(loyaltyData)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PaymentRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentRequest - */ - public static PaymentRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PaymentRequest.class); - } -/** - * Convert an instance of PaymentRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PaymentResponse.java b/src/main/java/com/adyen/model/terminal/PaymentResponse.java deleted file mode 100644 index 794a638f0..000000000 --- a/src/main/java/com/adyen/model/terminal/PaymentResponse.java +++ /dev/null @@ -1,383 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.CustomerOrder; -import com.adyen.model.terminal.LoyaltyResult; -import com.adyen.model.terminal.POIData; -import com.adyen.model.terminal.PaymentReceipt; -import com.adyen.model.terminal.PaymentResult; -import com.adyen.model.terminal.Response; -import com.adyen.model.terminal.SaleData; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the Payment transaction processed by the POI System. Content of the Payment Response message. - */ -@ApiModel(description = "It conveys Information related to the Payment transaction processed by the POI System. Content of the Payment Response message.") -@JsonPropertyOrder({ - PaymentResponse.JSON_PROPERTY_RESPONSE, - PaymentResponse.JSON_PROPERTY_SALE_DATA, - PaymentResponse.JSON_PROPERTY_PO_I_DATA, - PaymentResponse.JSON_PROPERTY_PAYMENT_RESULT, - PaymentResponse.JSON_PROPERTY_LOYALTY_RESULT, - PaymentResponse.JSON_PROPERTY_PAYMENT_RECEIPT, - PaymentResponse.JSON_PROPERTY_CUSTOMER_ORDER -}) - -public class PaymentResponse { - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public static final String JSON_PROPERTY_SALE_DATA = "SaleData"; - private SaleData saleData; - - public static final String JSON_PROPERTY_PO_I_DATA = "POIData"; - private POIData poIData; - - public static final String JSON_PROPERTY_PAYMENT_RESULT = "PaymentResult"; - private PaymentResult paymentResult; - - public static final String JSON_PROPERTY_LOYALTY_RESULT = "LoyaltyResult"; - private List loyaltyResult = null; - - public static final String JSON_PROPERTY_PAYMENT_RECEIPT = "PaymentReceipt"; - private List paymentReceipt = null; - - public static final String JSON_PROPERTY_CUSTOMER_ORDER = "CustomerOrder"; - private List customerOrder = null; - - public PaymentResponse() { - } - - public PaymentResponse response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - public PaymentResponse saleData(SaleData saleData) { - this.saleData = saleData; - return this; - } - - /** - * Get saleData - * @return saleData - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SaleData getSaleData() { - return saleData; - } - - - /** - * saleData - * - * @param saleData - */ - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleData(SaleData saleData) { - this.saleData = saleData; - } - - - public PaymentResponse poIData(POIData poIData) { - this.poIData = poIData; - return this; - } - - /** - * Get poIData - * @return poIData - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PO_I_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public POIData getPoIData() { - return poIData; - } - - - /** - * poIData - * - * @param poIData - */ - @JsonProperty(JSON_PROPERTY_PO_I_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoIData(POIData poIData) { - this.poIData = poIData; - } - - - public PaymentResponse paymentResult(PaymentResult paymentResult) { - this.paymentResult = paymentResult; - return this; - } - - /** - * Get paymentResult - * @return paymentResult - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentResult getPaymentResult() { - return paymentResult; - } - - - /** - * paymentResult - * - * @param paymentResult - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentResult(PaymentResult paymentResult) { - this.paymentResult = paymentResult; - } - - - public PaymentResponse loyaltyResult(List loyaltyResult) { - this.loyaltyResult = loyaltyResult; - return this; - } - - public PaymentResponse addLoyaltyResultItem(LoyaltyResult loyaltyResultItem) { - if (this.loyaltyResult == null) { - this.loyaltyResult = new ArrayList<>(); - } - this.loyaltyResult.add(loyaltyResultItem); - return this; - } - - /** - * Get loyaltyResult - * @return loyaltyResult - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getLoyaltyResult() { - return loyaltyResult; - } - - - /** - * loyaltyResult - * - * @param loyaltyResult - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyResult(List loyaltyResult) { - this.loyaltyResult = loyaltyResult; - } - - - public PaymentResponse paymentReceipt(List paymentReceipt) { - this.paymentReceipt = paymentReceipt; - return this; - } - - public PaymentResponse addPaymentReceiptItem(PaymentReceipt paymentReceiptItem) { - if (this.paymentReceipt == null) { - this.paymentReceipt = new ArrayList<>(); - } - this.paymentReceipt.add(paymentReceiptItem); - return this; - } - - /** - * Get paymentReceipt - * @return paymentReceipt - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_RECEIPT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPaymentReceipt() { - return paymentReceipt; - } - - - /** - * paymentReceipt - * - * @param paymentReceipt - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_RECEIPT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentReceipt(List paymentReceipt) { - this.paymentReceipt = paymentReceipt; - } - - - public PaymentResponse customerOrder(List customerOrder) { - this.customerOrder = customerOrder; - return this; - } - - public PaymentResponse addCustomerOrderItem(CustomerOrder customerOrderItem) { - if (this.customerOrder == null) { - this.customerOrder = new ArrayList<>(); - } - this.customerOrder.add(customerOrderItem); - return this; - } - - /** - * Get customerOrder - * @return customerOrder - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getCustomerOrder() { - return customerOrder; - } - - - /** - * customerOrder - * - * @param customerOrder - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerOrder(List customerOrder) { - this.customerOrder = customerOrder; - } - - - /** - * Return true if this PaymentResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentResponse paymentResponse = (PaymentResponse) o; - return Objects.equals(this.response, paymentResponse.response) && - Objects.equals(this.saleData, paymentResponse.saleData) && - Objects.equals(this.poIData, paymentResponse.poIData) && - Objects.equals(this.paymentResult, paymentResponse.paymentResult) && - Objects.equals(this.loyaltyResult, paymentResponse.loyaltyResult) && - Objects.equals(this.paymentReceipt, paymentResponse.paymentReceipt) && - Objects.equals(this.customerOrder, paymentResponse.customerOrder); - } - - @Override - public int hashCode() { - return Objects.hash(response, saleData, poIData, paymentResult, loyaltyResult, paymentReceipt, customerOrder); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentResponse {\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append(" saleData: ").append(toIndentedString(saleData)).append("\n"); - sb.append(" poIData: ").append(toIndentedString(poIData)).append("\n"); - sb.append(" paymentResult: ").append(toIndentedString(paymentResult)).append("\n"); - sb.append(" loyaltyResult: ").append(toIndentedString(loyaltyResult)).append("\n"); - sb.append(" paymentReceipt: ").append(toIndentedString(paymentReceipt)).append("\n"); - sb.append(" customerOrder: ").append(toIndentedString(customerOrder)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PaymentResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentResponse - */ - public static PaymentResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PaymentResponse.class); - } -/** - * Convert an instance of PaymentResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PaymentResult.java b/src/main/java/com/adyen/model/terminal/PaymentResult.java deleted file mode 100644 index 68963954c..000000000 --- a/src/main/java/com/adyen/model/terminal/PaymentResult.java +++ /dev/null @@ -1,644 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.AmountsResp; -import com.adyen.model.terminal.CapturedSignature; -import com.adyen.model.terminal.CurrencyConversion; -import com.adyen.model.terminal.Instalment; -import com.adyen.model.terminal.PaymentAcquirerData; -import com.adyen.model.terminal.PaymentInstrumentData; -import com.adyen.model.terminal.PaymentType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * PaymentResult - */ -@JsonPropertyOrder({ - PaymentResult.JSON_PROPERTY_PAYMENT_TYPE, - PaymentResult.JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA, - PaymentResult.JSON_PROPERTY_AMOUNTS_RESP, - PaymentResult.JSON_PROPERTY_INSTALMENT, - PaymentResult.JSON_PROPERTY_CURRENCY_CONVERSION, - PaymentResult.JSON_PROPERTY_MERCHANT_OVERRIDE_FLAG, - PaymentResult.JSON_PROPERTY_CAPTURED_SIGNATURE, - PaymentResult.JSON_PROPERTY_PROTECTED_SIGNATURE, - PaymentResult.JSON_PROPERTY_CUSTOMER_LANGUAGE, - PaymentResult.JSON_PROPERTY_ONLINE_FLAG, - PaymentResult.JSON_PROPERTY_AUTHENTICATION_METHOD, - PaymentResult.JSON_PROPERTY_VALIDITY_DATE, - PaymentResult.JSON_PROPERTY_PAYMENT_ACQUIRER_DATA -}) - -public class PaymentResult { - public static final String JSON_PROPERTY_PAYMENT_TYPE = "PaymentType"; - private PaymentType paymentType; - - public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA = "PaymentInstrumentData"; - private PaymentInstrumentData paymentInstrumentData; - - public static final String JSON_PROPERTY_AMOUNTS_RESP = "AmountsResp"; - private AmountsResp amountsResp; - - public static final String JSON_PROPERTY_INSTALMENT = "Instalment"; - private Instalment instalment; - - public static final String JSON_PROPERTY_CURRENCY_CONVERSION = "CurrencyConversion"; - private List currencyConversion = null; - - public static final String JSON_PROPERTY_MERCHANT_OVERRIDE_FLAG = "MerchantOverrideFlag"; - private Boolean merchantOverrideFlag = false; - - public static final String JSON_PROPERTY_CAPTURED_SIGNATURE = "CapturedSignature"; - private CapturedSignature capturedSignature; - - public static final String JSON_PROPERTY_PROTECTED_SIGNATURE = "ProtectedSignature"; - private String protectedSignature; - - public static final String JSON_PROPERTY_CUSTOMER_LANGUAGE = "CustomerLanguage"; - private String customerLanguage; - - public static final String JSON_PROPERTY_ONLINE_FLAG = "OnlineFlag"; - private Boolean onlineFlag = true; - - /** - * Gets or Sets authenticationMethod - */ - public enum AuthenticationMethodEnum { - BYPASS("Bypass"), - - MANUALVERIFICATION("ManualVerification"), - - MERCHANTAUTHENTICATION("MerchantAuthentication"), - - OFFLINEPIN("OfflinePIN"), - - ONLINEPIN("OnlinePIN"), - - PAPERSIGNATURE("PaperSignature"), - - SECURECERTIFICATE("SecureCertificate"), - - SECURENOCERTIFICATE("SecureNoCertificate"), - - SECUREDCHANNEL("SecuredChannel"), - - SIGNATURECAPTURE("SignatureCapture"), - - UNKNOWNMETHOD("UnknownMethod"); - - private String value; - - AuthenticationMethodEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static AuthenticationMethodEnum fromValue(String value) { - for (AuthenticationMethodEnum b : AuthenticationMethodEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_AUTHENTICATION_METHOD = "AuthenticationMethod"; - private List authenticationMethod = null; - - public static final String JSON_PROPERTY_VALIDITY_DATE = "ValidityDate"; - private LocalDate validityDate; - - public static final String JSON_PROPERTY_PAYMENT_ACQUIRER_DATA = "PaymentAcquirerData"; - private PaymentAcquirerData paymentAcquirerData; - - public PaymentResult() { - } - - public PaymentResult paymentType(PaymentType paymentType) { - this.paymentType = paymentType; - return this; - } - - /** - * Get paymentType - * @return paymentType - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentType getPaymentType() { - return paymentType; - } - - - /** - * paymentType - * - * @param paymentType - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentType(PaymentType paymentType) { - this.paymentType = paymentType; - } - - - public PaymentResult paymentInstrumentData(PaymentInstrumentData paymentInstrumentData) { - this.paymentInstrumentData = paymentInstrumentData; - return this; - } - - /** - * Get paymentInstrumentData - * @return paymentInstrumentData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentInstrumentData getPaymentInstrumentData() { - return paymentInstrumentData; - } - - - /** - * paymentInstrumentData - * - * @param paymentInstrumentData - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentInstrumentData(PaymentInstrumentData paymentInstrumentData) { - this.paymentInstrumentData = paymentInstrumentData; - } - - - public PaymentResult amountsResp(AmountsResp amountsResp) { - this.amountsResp = amountsResp; - return this; - } - - /** - * Get amountsResp - * @return amountsResp - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_AMOUNTS_RESP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public AmountsResp getAmountsResp() { - return amountsResp; - } - - - /** - * amountsResp - * - * @param amountsResp - */ - @JsonProperty(JSON_PROPERTY_AMOUNTS_RESP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAmountsResp(AmountsResp amountsResp) { - this.amountsResp = amountsResp; - } - - - public PaymentResult instalment(Instalment instalment) { - this.instalment = instalment; - return this; - } - - /** - * Get instalment - * @return instalment - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_INSTALMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Instalment getInstalment() { - return instalment; - } - - - /** - * instalment - * - * @param instalment - */ - @JsonProperty(JSON_PROPERTY_INSTALMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstalment(Instalment instalment) { - this.instalment = instalment; - } - - - public PaymentResult currencyConversion(List currencyConversion) { - this.currencyConversion = currencyConversion; - return this; - } - - public PaymentResult addCurrencyConversionItem(CurrencyConversion currencyConversionItem) { - if (this.currencyConversion == null) { - this.currencyConversion = new ArrayList<>(); - } - this.currencyConversion.add(currencyConversionItem); - return this; - } - - /** - * Get currencyConversion - * @return currencyConversion - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CURRENCY_CONVERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getCurrencyConversion() { - return currencyConversion; - } - - - /** - * currencyConversion - * - * @param currencyConversion - */ - @JsonProperty(JSON_PROPERTY_CURRENCY_CONVERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrencyConversion(List currencyConversion) { - this.currencyConversion = currencyConversion; - } - - - public PaymentResult merchantOverrideFlag(Boolean merchantOverrideFlag) { - this.merchantOverrideFlag = merchantOverrideFlag; - return this; - } - - /** - * Get merchantOverrideFlag - * @return merchantOverrideFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MERCHANT_OVERRIDE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getMerchantOverrideFlag() { - return merchantOverrideFlag; - } - - - /** - * merchantOverrideFlag - * - * @param merchantOverrideFlag - */ - @JsonProperty(JSON_PROPERTY_MERCHANT_OVERRIDE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMerchantOverrideFlag(Boolean merchantOverrideFlag) { - this.merchantOverrideFlag = merchantOverrideFlag; - } - - - public PaymentResult capturedSignature(CapturedSignature capturedSignature) { - this.capturedSignature = capturedSignature; - return this; - } - - /** - * Get capturedSignature - * @return capturedSignature - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CAPTURED_SIGNATURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public CapturedSignature getCapturedSignature() { - return capturedSignature; - } - - - /** - * capturedSignature - * - * @param capturedSignature - */ - @JsonProperty(JSON_PROPERTY_CAPTURED_SIGNATURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCapturedSignature(CapturedSignature capturedSignature) { - this.capturedSignature = capturedSignature; - } - - - public PaymentResult protectedSignature(String protectedSignature) { - this.protectedSignature = protectedSignature; - return this; - } - - /** - * Get protectedSignature - * @return protectedSignature - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PROTECTED_SIGNATURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getProtectedSignature() { - return protectedSignature; - } - - - /** - * protectedSignature - * - * @param protectedSignature - */ - @JsonProperty(JSON_PROPERTY_PROTECTED_SIGNATURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProtectedSignature(String protectedSignature) { - this.protectedSignature = protectedSignature; - } - - - public PaymentResult customerLanguage(String customerLanguage) { - this.customerLanguage = customerLanguage; - return this; - } - - /** - * Get customerLanguage - * @return customerLanguage - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CUSTOMER_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCustomerLanguage() { - return customerLanguage; - } - - - /** - * customerLanguage - * - * @param customerLanguage - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerLanguage(String customerLanguage) { - this.customerLanguage = customerLanguage; - } - - - public PaymentResult onlineFlag(Boolean onlineFlag) { - this.onlineFlag = onlineFlag; - return this; - } - - /** - * Get onlineFlag - * @return onlineFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ONLINE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getOnlineFlag() { - return onlineFlag; - } - - - /** - * onlineFlag - * - * @param onlineFlag - */ - @JsonProperty(JSON_PROPERTY_ONLINE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOnlineFlag(Boolean onlineFlag) { - this.onlineFlag = onlineFlag; - } - - - public PaymentResult authenticationMethod(List authenticationMethod) { - this.authenticationMethod = authenticationMethod; - return this; - } - - public PaymentResult addAuthenticationMethodItem(AuthenticationMethodEnum authenticationMethodItem) { - if (this.authenticationMethod == null) { - this.authenticationMethod = new ArrayList<>(); - } - this.authenticationMethod.add(authenticationMethodItem); - return this; - } - - /** - * Get authenticationMethod - * @return authenticationMethod - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_AUTHENTICATION_METHOD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getAuthenticationMethod() { - return authenticationMethod; - } - - - /** - * authenticationMethod - * - * @param authenticationMethod - */ - @JsonProperty(JSON_PROPERTY_AUTHENTICATION_METHOD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAuthenticationMethod(List authenticationMethod) { - this.authenticationMethod = authenticationMethod; - } - - - public PaymentResult validityDate(LocalDate validityDate) { - this.validityDate = validityDate; - return this; - } - - /** - * Get validityDate - * @return validityDate - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_VALIDITY_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LocalDate getValidityDate() { - return validityDate; - } - - - /** - * validityDate - * - * @param validityDate - */ - @JsonProperty(JSON_PROPERTY_VALIDITY_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidityDate(LocalDate validityDate) { - this.validityDate = validityDate; - } - - - public PaymentResult paymentAcquirerData(PaymentAcquirerData paymentAcquirerData) { - this.paymentAcquirerData = paymentAcquirerData; - return this; - } - - /** - * Get paymentAcquirerData - * @return paymentAcquirerData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_ACQUIRER_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentAcquirerData getPaymentAcquirerData() { - return paymentAcquirerData; - } - - - /** - * paymentAcquirerData - * - * @param paymentAcquirerData - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_ACQUIRER_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentAcquirerData(PaymentAcquirerData paymentAcquirerData) { - this.paymentAcquirerData = paymentAcquirerData; - } - - - /** - * Return true if this PaymentResult object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentResult paymentResult = (PaymentResult) o; - return Objects.equals(this.paymentType, paymentResult.paymentType) && - Objects.equals(this.paymentInstrumentData, paymentResult.paymentInstrumentData) && - Objects.equals(this.amountsResp, paymentResult.amountsResp) && - Objects.equals(this.instalment, paymentResult.instalment) && - Objects.equals(this.currencyConversion, paymentResult.currencyConversion) && - Objects.equals(this.merchantOverrideFlag, paymentResult.merchantOverrideFlag) && - Objects.equals(this.capturedSignature, paymentResult.capturedSignature) && - Objects.equals(this.protectedSignature, paymentResult.protectedSignature) && - Objects.equals(this.customerLanguage, paymentResult.customerLanguage) && - Objects.equals(this.onlineFlag, paymentResult.onlineFlag) && - Objects.equals(this.authenticationMethod, paymentResult.authenticationMethod) && - Objects.equals(this.validityDate, paymentResult.validityDate) && - Objects.equals(this.paymentAcquirerData, paymentResult.paymentAcquirerData); - } - - @Override - public int hashCode() { - return Objects.hash(paymentType, paymentInstrumentData, amountsResp, instalment, currencyConversion, merchantOverrideFlag, capturedSignature, protectedSignature, customerLanguage, onlineFlag, authenticationMethod, validityDate, paymentAcquirerData); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentResult {\n"); - sb.append(" paymentType: ").append(toIndentedString(paymentType)).append("\n"); - sb.append(" paymentInstrumentData: ").append(toIndentedString(paymentInstrumentData)).append("\n"); - sb.append(" amountsResp: ").append(toIndentedString(amountsResp)).append("\n"); - sb.append(" instalment: ").append(toIndentedString(instalment)).append("\n"); - sb.append(" currencyConversion: ").append(toIndentedString(currencyConversion)).append("\n"); - sb.append(" merchantOverrideFlag: ").append(toIndentedString(merchantOverrideFlag)).append("\n"); - sb.append(" capturedSignature: ").append(toIndentedString(capturedSignature)).append("\n"); - sb.append(" protectedSignature: ").append(toIndentedString(protectedSignature)).append("\n"); - sb.append(" customerLanguage: ").append(toIndentedString(customerLanguage)).append("\n"); - sb.append(" onlineFlag: ").append(toIndentedString(onlineFlag)).append("\n"); - sb.append(" authenticationMethod: ").append(toIndentedString(authenticationMethod)).append("\n"); - sb.append(" validityDate: ").append(toIndentedString(validityDate)).append("\n"); - sb.append(" paymentAcquirerData: ").append(toIndentedString(paymentAcquirerData)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PaymentResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentResult - * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentResult - */ - public static PaymentResult fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PaymentResult.class); - } -/** - * Convert an instance of PaymentResult to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PaymentToken.java b/src/main/java/com/adyen/model/terminal/PaymentToken.java deleted file mode 100644 index 8101efc80..000000000 --- a/src/main/java/com/adyen/model/terminal/PaymentToken.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.TokenRequestedType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.time.OffsetDateTime; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Surrogate of the PAN (Primary Account Number) of the payment card to identify the payment mean of the customer. It allows, for a merchant, to identify the customer. - */ -@ApiModel(description = "Surrogate of the PAN (Primary Account Number) of the payment card to identify the payment mean of the customer. It allows, for a merchant, to identify the customer.") -@JsonPropertyOrder({ - PaymentToken.JSON_PROPERTY_TOKEN_REQUESTED_TYPE, - PaymentToken.JSON_PROPERTY_TOKEN_VALUE, - PaymentToken.JSON_PROPERTY_EXPIRY_DATE_TIME -}) - -public class PaymentToken { - public static final String JSON_PROPERTY_TOKEN_REQUESTED_TYPE = "TokenRequestedType"; - private TokenRequestedType tokenRequestedType; - - public static final String JSON_PROPERTY_TOKEN_VALUE = "TokenValue"; - private String tokenValue; - - public static final String JSON_PROPERTY_EXPIRY_DATE_TIME = "ExpiryDateTime"; - private OffsetDateTime expiryDateTime; - - public PaymentToken() { - } - - public PaymentToken tokenRequestedType(TokenRequestedType tokenRequestedType) { - this.tokenRequestedType = tokenRequestedType; - return this; - } - - /** - * Get tokenRequestedType - * @return tokenRequestedType - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_TOKEN_REQUESTED_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TokenRequestedType getTokenRequestedType() { - return tokenRequestedType; - } - - - /** - * tokenRequestedType - * - * @param tokenRequestedType - */ - @JsonProperty(JSON_PROPERTY_TOKEN_REQUESTED_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTokenRequestedType(TokenRequestedType tokenRequestedType) { - this.tokenRequestedType = tokenRequestedType; - } - - - public PaymentToken tokenValue(String tokenValue) { - this.tokenValue = tokenValue; - return this; - } - - /** - * Get tokenValue - * @return tokenValue - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_TOKEN_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getTokenValue() { - return tokenValue; - } - - - /** - * tokenValue - * - * @param tokenValue - */ - @JsonProperty(JSON_PROPERTY_TOKEN_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTokenValue(String tokenValue) { - this.tokenValue = tokenValue; - } - - - public PaymentToken expiryDateTime(OffsetDateTime expiryDateTime) { - this.expiryDateTime = expiryDateTime; - return this; - } - - /** - * Expiry date and time. Limits the validity of a payment token. - * @return expiryDateTime - **/ - @ApiModelProperty(value = "Expiry date and time. Limits the validity of a payment token.") - @JsonProperty(JSON_PROPERTY_EXPIRY_DATE_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OffsetDateTime getExpiryDateTime() { - return expiryDateTime; - } - - - /** - * Expiry date and time. Limits the validity of a payment token. - * - * @param expiryDateTime - */ - @JsonProperty(JSON_PROPERTY_EXPIRY_DATE_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiryDateTime(OffsetDateTime expiryDateTime) { - this.expiryDateTime = expiryDateTime; - } - - - /** - * Return true if this PaymentToken object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentToken paymentToken = (PaymentToken) o; - return Objects.equals(this.tokenRequestedType, paymentToken.tokenRequestedType) && - Objects.equals(this.tokenValue, paymentToken.tokenValue) && - Objects.equals(this.expiryDateTime, paymentToken.expiryDateTime); - } - - @Override - public int hashCode() { - return Objects.hash(tokenRequestedType, tokenValue, expiryDateTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentToken {\n"); - sb.append(" tokenRequestedType: ").append(toIndentedString(tokenRequestedType)).append("\n"); - sb.append(" tokenValue: ").append(toIndentedString(tokenValue)).append("\n"); - sb.append(" expiryDateTime: ").append(toIndentedString(expiryDateTime)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PaymentToken given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentToken - * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentToken - */ - public static PaymentToken fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PaymentToken.class); - } -/** - * Convert an instance of PaymentToken to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PaymentTotals.java b/src/main/java/com/adyen/model/terminal/PaymentTotals.java deleted file mode 100644 index dab081be8..000000000 --- a/src/main/java/com/adyen/model/terminal/PaymentTotals.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.TransactionType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Totals of the payment transaction during the reconciliation period. - */ -@ApiModel(description = "Totals of the payment transaction during the reconciliation period.") -@JsonPropertyOrder({ - PaymentTotals.JSON_PROPERTY_TRANSACTION_TYPE, - PaymentTotals.JSON_PROPERTY_TRANSACTION_COUNT, - PaymentTotals.JSON_PROPERTY_TRANSACTION_AMOUNT -}) - -public class PaymentTotals { - public static final String JSON_PROPERTY_TRANSACTION_TYPE = "TransactionType"; - private TransactionType transactionType; - - public static final String JSON_PROPERTY_TRANSACTION_COUNT = "TransactionCount"; - private Integer transactionCount; - - public static final String JSON_PROPERTY_TRANSACTION_AMOUNT = "TransactionAmount"; - private BigDecimal transactionAmount; - - public PaymentTotals() { - } - - public PaymentTotals transactionType(TransactionType transactionType) { - this.transactionType = transactionType; - return this; - } - - /** - * Get transactionType - * @return transactionType - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_TRANSACTION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransactionType getTransactionType() { - return transactionType; - } - - - /** - * transactionType - * - * @param transactionType - */ - @JsonProperty(JSON_PROPERTY_TRANSACTION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransactionType(TransactionType transactionType) { - this.transactionType = transactionType; - } - - - public PaymentTotals transactionCount(Integer transactionCount) { - this.transactionCount = transactionCount; - return this; - } - - /** - * Number of processed transaction during the period. - * @return transactionCount - **/ - @ApiModelProperty(required = true, value = "Number of processed transaction during the period.") - @JsonProperty(JSON_PROPERTY_TRANSACTION_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getTransactionCount() { - return transactionCount; - } - - - /** - * Number of processed transaction during the period. - * - * @param transactionCount - */ - @JsonProperty(JSON_PROPERTY_TRANSACTION_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransactionCount(Integer transactionCount) { - this.transactionCount = transactionCount; - } - - - public PaymentTotals transactionAmount(BigDecimal transactionAmount) { - this.transactionAmount = transactionAmount; - return this; - } - - /** - * Sum of amount of processed transaction during the period. - * minimum: 0.0 - * maximum: 99999999.999999 - * @return transactionAmount - **/ - @ApiModelProperty(required = true, value = "Sum of amount of processed transaction during the period.") - @JsonProperty(JSON_PROPERTY_TRANSACTION_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getTransactionAmount() { - return transactionAmount; - } - - - /** - * Sum of amount of processed transaction during the period. - * - * @param transactionAmount - */ - @JsonProperty(JSON_PROPERTY_TRANSACTION_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransactionAmount(BigDecimal transactionAmount) { - this.transactionAmount = transactionAmount; - } - - - /** - * Return true if this PaymentTotals object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentTotals paymentTotals = (PaymentTotals) o; - return Objects.equals(this.transactionType, paymentTotals.transactionType) && - Objects.equals(this.transactionCount, paymentTotals.transactionCount) && - Objects.equals(this.transactionAmount, paymentTotals.transactionAmount); - } - - @Override - public int hashCode() { - return Objects.hash(transactionType, transactionCount, transactionAmount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentTotals {\n"); - sb.append(" transactionType: ").append(toIndentedString(transactionType)).append("\n"); - sb.append(" transactionCount: ").append(toIndentedString(transactionCount)).append("\n"); - sb.append(" transactionAmount: ").append(toIndentedString(transactionAmount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PaymentTotals given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentTotals - * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentTotals - */ - public static PaymentTotals fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PaymentTotals.class); - } -/** - * Convert an instance of PaymentTotals to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PaymentTransaction.java b/src/main/java/com/adyen/model/terminal/PaymentTransaction.java deleted file mode 100644 index cd4443017..000000000 --- a/src/main/java/com/adyen/model/terminal/PaymentTransaction.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.AmountsReq; -import com.adyen.model.terminal.OriginalPOITransaction; -import com.adyen.model.terminal.SaleItem; -import com.adyen.model.terminal.TransactionConditions; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * PaymentTransaction - */ -@JsonPropertyOrder({ - PaymentTransaction.JSON_PROPERTY_AMOUNTS_REQ, - PaymentTransaction.JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION, - PaymentTransaction.JSON_PROPERTY_TRANSACTION_CONDITIONS, - PaymentTransaction.JSON_PROPERTY_SALE_ITEM -}) - -public class PaymentTransaction { - public static final String JSON_PROPERTY_AMOUNTS_REQ = "AmountsReq"; - private AmountsReq amountsReq; - - public static final String JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION = "OriginalPOITransaction"; - private OriginalPOITransaction originalPOITransaction; - - public static final String JSON_PROPERTY_TRANSACTION_CONDITIONS = "TransactionConditions"; - private TransactionConditions transactionConditions; - - public static final String JSON_PROPERTY_SALE_ITEM = "SaleItem"; - private List saleItem = null; - - public PaymentTransaction() { - } - - public PaymentTransaction amountsReq(AmountsReq amountsReq) { - this.amountsReq = amountsReq; - return this; - } - - /** - * Get amountsReq - * @return amountsReq - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_AMOUNTS_REQ) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public AmountsReq getAmountsReq() { - return amountsReq; - } - - - /** - * amountsReq - * - * @param amountsReq - */ - @JsonProperty(JSON_PROPERTY_AMOUNTS_REQ) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAmountsReq(AmountsReq amountsReq) { - this.amountsReq = amountsReq; - } - - - public PaymentTransaction originalPOITransaction(OriginalPOITransaction originalPOITransaction) { - this.originalPOITransaction = originalPOITransaction; - return this; - } - - /** - * Get originalPOITransaction - * @return originalPOITransaction - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OriginalPOITransaction getOriginalPOITransaction() { - return originalPOITransaction; - } - - - /** - * originalPOITransaction - * - * @param originalPOITransaction - */ - @JsonProperty(JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalPOITransaction(OriginalPOITransaction originalPOITransaction) { - this.originalPOITransaction = originalPOITransaction; - } - - - public PaymentTransaction transactionConditions(TransactionConditions transactionConditions) { - this.transactionConditions = transactionConditions; - return this; - } - - /** - * Get transactionConditions - * @return transactionConditions - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TRANSACTION_CONDITIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransactionConditions getTransactionConditions() { - return transactionConditions; - } - - - /** - * transactionConditions - * - * @param transactionConditions - */ - @JsonProperty(JSON_PROPERTY_TRANSACTION_CONDITIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransactionConditions(TransactionConditions transactionConditions) { - this.transactionConditions = transactionConditions; - } - - - public PaymentTransaction saleItem(List saleItem) { - this.saleItem = saleItem; - return this; - } - - public PaymentTransaction addSaleItemItem(SaleItem saleItemItem) { - if (this.saleItem == null) { - this.saleItem = new ArrayList<>(); - } - this.saleItem.add(saleItemItem); - return this; - } - - /** - * Get saleItem - * @return saleItem - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SALE_ITEM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getSaleItem() { - return saleItem; - } - - - /** - * saleItem - * - * @param saleItem - */ - @JsonProperty(JSON_PROPERTY_SALE_ITEM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleItem(List saleItem) { - this.saleItem = saleItem; - } - - - /** - * Return true if this PaymentTransaction object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentTransaction paymentTransaction = (PaymentTransaction) o; - return Objects.equals(this.amountsReq, paymentTransaction.amountsReq) && - Objects.equals(this.originalPOITransaction, paymentTransaction.originalPOITransaction) && - Objects.equals(this.transactionConditions, paymentTransaction.transactionConditions) && - Objects.equals(this.saleItem, paymentTransaction.saleItem); - } - - @Override - public int hashCode() { - return Objects.hash(amountsReq, originalPOITransaction, transactionConditions, saleItem); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentTransaction {\n"); - sb.append(" amountsReq: ").append(toIndentedString(amountsReq)).append("\n"); - sb.append(" originalPOITransaction: ").append(toIndentedString(originalPOITransaction)).append("\n"); - sb.append(" transactionConditions: ").append(toIndentedString(transactionConditions)).append("\n"); - sb.append(" saleItem: ").append(toIndentedString(saleItem)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PaymentTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentTransaction - * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentTransaction - */ - public static PaymentTransaction fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PaymentTransaction.class); - } -/** - * Convert an instance of PaymentTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PaymentType.java b/src/main/java/com/adyen/model/terminal/PaymentType.java deleted file mode 100644 index 124658f01..000000000 --- a/src/main/java/com/adyen/model/terminal/PaymentType.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets PaymentType - */ -public enum PaymentType { - - CASHADVANCE("CashAdvance"), - - CASHDEPOSIT("CashDeposit"), - - COMPLETION("Completion"), - - FIRSTRESERVATION("FirstReservation"), - - INSTALMENT("Instalment"), - - ISSUERINSTALMENT("IssuerInstalment"), - - NORMAL("Normal"), - - ONETIMERESERVATION("OneTimeReservation"), - - PAIDOUT("PaidOut"), - - RECURRING("Recurring"), - - REFUND("Refund"), - - UPDATERESERVATION("UpdateReservation"); - - private String value; - - PaymentType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static PaymentType fromValue(String value) { - for (PaymentType b : PaymentType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PerformedTransaction.java b/src/main/java/com/adyen/model/terminal/PerformedTransaction.java deleted file mode 100644 index caf7dea28..000000000 --- a/src/main/java/com/adyen/model/terminal/PerformedTransaction.java +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyResult; -import com.adyen.model.terminal.POIData; -import com.adyen.model.terminal.PaymentResult; -import com.adyen.model.terminal.Response; -import com.adyen.model.terminal.SaleData; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * PerformedTransaction - */ -@JsonPropertyOrder({ - PerformedTransaction.JSON_PROPERTY_RESPONSE, - PerformedTransaction.JSON_PROPERTY_SALE_DATA, - PerformedTransaction.JSON_PROPERTY_PO_I_DATA, - PerformedTransaction.JSON_PROPERTY_PAYMENT_RESULT, - PerformedTransaction.JSON_PROPERTY_LOYALTY_RESULT, - PerformedTransaction.JSON_PROPERTY_REVERSED_AMOUNT -}) - -public class PerformedTransaction { - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public static final String JSON_PROPERTY_SALE_DATA = "SaleData"; - private SaleData saleData; - - public static final String JSON_PROPERTY_PO_I_DATA = "POIData"; - private POIData poIData; - - public static final String JSON_PROPERTY_PAYMENT_RESULT = "PaymentResult"; - private PaymentResult paymentResult; - - public static final String JSON_PROPERTY_LOYALTY_RESULT = "LoyaltyResult"; - private List loyaltyResult = null; - - public static final String JSON_PROPERTY_REVERSED_AMOUNT = "ReversedAmount"; - private BigDecimal reversedAmount; - - public PerformedTransaction() { - } - - public PerformedTransaction response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - public PerformedTransaction saleData(SaleData saleData) { - this.saleData = saleData; - return this; - } - - /** - * Get saleData - * @return saleData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SaleData getSaleData() { - return saleData; - } - - - /** - * saleData - * - * @param saleData - */ - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleData(SaleData saleData) { - this.saleData = saleData; - } - - - public PerformedTransaction poIData(POIData poIData) { - this.poIData = poIData; - return this; - } - - /** - * Get poIData - * @return poIData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PO_I_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public POIData getPoIData() { - return poIData; - } - - - /** - * poIData - * - * @param poIData - */ - @JsonProperty(JSON_PROPERTY_PO_I_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoIData(POIData poIData) { - this.poIData = poIData; - } - - - public PerformedTransaction paymentResult(PaymentResult paymentResult) { - this.paymentResult = paymentResult; - return this; - } - - /** - * Get paymentResult - * @return paymentResult - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentResult getPaymentResult() { - return paymentResult; - } - - - /** - * paymentResult - * - * @param paymentResult - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentResult(PaymentResult paymentResult) { - this.paymentResult = paymentResult; - } - - - public PerformedTransaction loyaltyResult(List loyaltyResult) { - this.loyaltyResult = loyaltyResult; - return this; - } - - public PerformedTransaction addLoyaltyResultItem(LoyaltyResult loyaltyResultItem) { - if (this.loyaltyResult == null) { - this.loyaltyResult = new ArrayList<>(); - } - this.loyaltyResult.add(loyaltyResultItem); - return this; - } - - /** - * Get loyaltyResult - * @return loyaltyResult - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getLoyaltyResult() { - return loyaltyResult; - } - - - /** - * loyaltyResult - * - * @param loyaltyResult - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyResult(List loyaltyResult) { - this.loyaltyResult = loyaltyResult; - } - - - public PerformedTransaction reversedAmount(BigDecimal reversedAmount) { - this.reversedAmount = reversedAmount; - return this; - } - - /** - * Get reversedAmount - * minimum: 0.0 - * maximum: 99999999.999999 - * @return reversedAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_REVERSED_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getReversedAmount() { - return reversedAmount; - } - - - /** - * reversedAmount - * - * @param reversedAmount - */ - @JsonProperty(JSON_PROPERTY_REVERSED_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReversedAmount(BigDecimal reversedAmount) { - this.reversedAmount = reversedAmount; - } - - - /** - * Return true if this PerformedTransaction object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformedTransaction performedTransaction = (PerformedTransaction) o; - return Objects.equals(this.response, performedTransaction.response) && - Objects.equals(this.saleData, performedTransaction.saleData) && - Objects.equals(this.poIData, performedTransaction.poIData) && - Objects.equals(this.paymentResult, performedTransaction.paymentResult) && - Objects.equals(this.loyaltyResult, performedTransaction.loyaltyResult) && - Objects.equals(this.reversedAmount, performedTransaction.reversedAmount); - } - - @Override - public int hashCode() { - return Objects.hash(response, saleData, poIData, paymentResult, loyaltyResult, reversedAmount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PerformedTransaction {\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append(" saleData: ").append(toIndentedString(saleData)).append("\n"); - sb.append(" poIData: ").append(toIndentedString(poIData)).append("\n"); - sb.append(" paymentResult: ").append(toIndentedString(paymentResult)).append("\n"); - sb.append(" loyaltyResult: ").append(toIndentedString(loyaltyResult)).append("\n"); - sb.append(" reversedAmount: ").append(toIndentedString(reversedAmount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PerformedTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of PerformedTransaction - * @throws JsonProcessingException if the JSON string is invalid with respect to PerformedTransaction - */ - public static PerformedTransaction fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PerformedTransaction.class); - } -/** - * Convert an instance of PerformedTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PeriodUnit.java b/src/main/java/com/adyen/model/terminal/PeriodUnit.java deleted file mode 100644 index 7e47d4aa6..000000000 --- a/src/main/java/com/adyen/model/terminal/PeriodUnit.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets PeriodUnit - */ -public enum PeriodUnit { - - ANNUAL("Annual"), - - DAILY("Daily"), - - MONTHLY("Monthly"), - - WEEKLY("Weekly"); - - private String value; - - PeriodUnit(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static PeriodUnit fromValue(String value) { - for (PeriodUnit b : PeriodUnit.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/Point.java b/src/main/java/com/adyen/model/terminal/Point.java deleted file mode 100644 index af235e3e6..000000000 --- a/src/main/java/com/adyen/model/terminal/Point.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Point - */ -@JsonPropertyOrder({ - Point.JSON_PROPERTY_X, - Point.JSON_PROPERTY_Y -}) - -public class Point { - public static final String JSON_PROPERTY_X = "X"; - private String X; - - public static final String JSON_PROPERTY_Y = "Y"; - private String Y; - - public Point() { - } - - public Point X(String X) { - this.X = X; - return this; - } - - /** - * Get X - * @return X - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_X) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getX() { - return X; - } - - - /** - * X - * - * @param X - */ - @JsonProperty(JSON_PROPERTY_X) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setX(String X) { - this.X = X; - } - - - public Point Y(String Y) { - this.Y = Y; - return this; - } - - /** - * Get Y - * @return Y - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_Y) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getY() { - return Y; - } - - - /** - * Y - * - * @param Y - */ - @JsonProperty(JSON_PROPERTY_Y) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setY(String Y) { - this.Y = Y; - } - - - /** - * Return true if this Point object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Point point = (Point) o; - return Objects.equals(this.X, point.X) && - Objects.equals(this.Y, point.Y); - } - - @Override - public int hashCode() { - return Objects.hash(X, Y); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Point {\n"); - sb.append(" X: ").append(toIndentedString(X)).append("\n"); - sb.append(" Y: ").append(toIndentedString(Y)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of Point given an JSON string - * - * @param jsonString JSON string - * @return An instance of Point - * @throws JsonProcessingException if the JSON string is invalid with respect to Point - */ - public static Point fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, Point.class); - } -/** - * Convert an instance of Point to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PredefinedContent.java b/src/main/java/com/adyen/model/terminal/PredefinedContent.java deleted file mode 100644 index eac5e7a53..000000000 --- a/src/main/java/com/adyen/model/terminal/PredefinedContent.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the predefined message. Reference of a predefined message to display or print. - */ -@ApiModel(description = "It conveys Information related to the predefined message. Reference of a predefined message to display or print.") -@JsonPropertyOrder({ - PredefinedContent.JSON_PROPERTY_REFERENCE_I_D, - PredefinedContent.JSON_PROPERTY_LANGUAGE -}) - -public class PredefinedContent { - public static final String JSON_PROPERTY_REFERENCE_I_D = "ReferenceID"; - private String referenceID; - - public static final String JSON_PROPERTY_LANGUAGE = "Language"; - private String language; - - public PredefinedContent() { - } - - public PredefinedContent referenceID(String referenceID) { - this.referenceID = referenceID; - return this; - } - - /** - * Identification of a predefined message to display or print. - * @return referenceID - **/ - @ApiModelProperty(required = true, value = "Identification of a predefined message to display or print.") - @JsonProperty(JSON_PROPERTY_REFERENCE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getReferenceID() { - return referenceID; - } - - - /** - * Identification of a predefined message to display or print. - * - * @param referenceID - */ - @JsonProperty(JSON_PROPERTY_REFERENCE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReferenceID(String referenceID) { - this.referenceID = referenceID; - } - - - public PredefinedContent language(String language) { - this.language = language; - return this; - } - - /** - * Identification of a language. - * @return language - **/ - @ApiModelProperty(value = "Identification of a language.") - @JsonProperty(JSON_PROPERTY_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getLanguage() { - return language; - } - - - /** - * Identification of a language. - * - * @param language - */ - @JsonProperty(JSON_PROPERTY_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLanguage(String language) { - this.language = language; - } - - - /** - * Return true if this PredefinedContent object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PredefinedContent predefinedContent = (PredefinedContent) o; - return Objects.equals(this.referenceID, predefinedContent.referenceID) && - Objects.equals(this.language, predefinedContent.language); - } - - @Override - public int hashCode() { - return Objects.hash(referenceID, language); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PredefinedContent {\n"); - sb.append(" referenceID: ").append(toIndentedString(referenceID)).append("\n"); - sb.append(" language: ").append(toIndentedString(language)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PredefinedContent given an JSON string - * - * @param jsonString JSON string - * @return An instance of PredefinedContent - * @throws JsonProcessingException if the JSON string is invalid with respect to PredefinedContent - */ - public static PredefinedContent fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PredefinedContent.class); - } -/** - * Convert an instance of PredefinedContent to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PrintOutput.java b/src/main/java/com/adyen/model/terminal/PrintOutput.java deleted file mode 100644 index cf393f91c..000000000 --- a/src/main/java/com/adyen/model/terminal/PrintOutput.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.DocumentQualifier; -import com.adyen.model.terminal.OutputContent; -import com.adyen.model.terminal.ResponseMode; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * PrintOutput - */ -@JsonPropertyOrder({ - PrintOutput.JSON_PROPERTY_DOCUMENT_QUALIFIER, - PrintOutput.JSON_PROPERTY_RESPONSE_MODE, - PrintOutput.JSON_PROPERTY_INTEGRATED_PRINT_FLAG, - PrintOutput.JSON_PROPERTY_REQUIRED_SIGNATURE_FLAG, - PrintOutput.JSON_PROPERTY_OUTPUT_CONTENT -}) - -public class PrintOutput { - public static final String JSON_PROPERTY_DOCUMENT_QUALIFIER = "DocumentQualifier"; - private DocumentQualifier documentQualifier; - - public static final String JSON_PROPERTY_RESPONSE_MODE = "ResponseMode"; - private ResponseMode responseMode; - - public static final String JSON_PROPERTY_INTEGRATED_PRINT_FLAG = "IntegratedPrintFlag"; - private Boolean integratedPrintFlag = false; - - public static final String JSON_PROPERTY_REQUIRED_SIGNATURE_FLAG = "RequiredSignatureFlag"; - private Boolean requiredSignatureFlag = false; - - public static final String JSON_PROPERTY_OUTPUT_CONTENT = "OutputContent"; - private OutputContent outputContent; - - public PrintOutput() { - } - - public PrintOutput documentQualifier(DocumentQualifier documentQualifier) { - this.documentQualifier = documentQualifier; - return this; - } - - /** - * Get documentQualifier - * @return documentQualifier - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_DOCUMENT_QUALIFIER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public DocumentQualifier getDocumentQualifier() { - return documentQualifier; - } - - - /** - * documentQualifier - * - * @param documentQualifier - */ - @JsonProperty(JSON_PROPERTY_DOCUMENT_QUALIFIER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDocumentQualifier(DocumentQualifier documentQualifier) { - this.documentQualifier = documentQualifier; - } - - - public PrintOutput responseMode(ResponseMode responseMode) { - this.responseMode = responseMode; - return this; - } - - /** - * Get responseMode - * @return responseMode - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public ResponseMode getResponseMode() { - return responseMode; - } - - - /** - * responseMode - * - * @param responseMode - */ - @JsonProperty(JSON_PROPERTY_RESPONSE_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponseMode(ResponseMode responseMode) { - this.responseMode = responseMode; - } - - - public PrintOutput integratedPrintFlag(Boolean integratedPrintFlag) { - this.integratedPrintFlag = integratedPrintFlag; - return this; - } - - /** - * Get integratedPrintFlag - * @return integratedPrintFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_INTEGRATED_PRINT_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getIntegratedPrintFlag() { - return integratedPrintFlag; - } - - - /** - * integratedPrintFlag - * - * @param integratedPrintFlag - */ - @JsonProperty(JSON_PROPERTY_INTEGRATED_PRINT_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIntegratedPrintFlag(Boolean integratedPrintFlag) { - this.integratedPrintFlag = integratedPrintFlag; - } - - - public PrintOutput requiredSignatureFlag(Boolean requiredSignatureFlag) { - this.requiredSignatureFlag = requiredSignatureFlag; - return this; - } - - /** - * Get requiredSignatureFlag - * @return requiredSignatureFlag - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getRequiredSignatureFlag() { - return requiredSignatureFlag; - } - - - /** - * requiredSignatureFlag - * - * @param requiredSignatureFlag - */ - @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequiredSignatureFlag(Boolean requiredSignatureFlag) { - this.requiredSignatureFlag = requiredSignatureFlag; - } - - - public PrintOutput outputContent(OutputContent outputContent) { - this.outputContent = outputContent; - return this; - } - - /** - * Get outputContent - * @return outputContent - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_OUTPUT_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OutputContent getOutputContent() { - return outputContent; - } - - - /** - * outputContent - * - * @param outputContent - */ - @JsonProperty(JSON_PROPERTY_OUTPUT_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutputContent(OutputContent outputContent) { - this.outputContent = outputContent; - } - - - /** - * Return true if this PrintOutput object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PrintOutput printOutput = (PrintOutput) o; - return Objects.equals(this.documentQualifier, printOutput.documentQualifier) && - Objects.equals(this.responseMode, printOutput.responseMode) && - Objects.equals(this.integratedPrintFlag, printOutput.integratedPrintFlag) && - Objects.equals(this.requiredSignatureFlag, printOutput.requiredSignatureFlag) && - Objects.equals(this.outputContent, printOutput.outputContent); - } - - @Override - public int hashCode() { - return Objects.hash(documentQualifier, responseMode, integratedPrintFlag, requiredSignatureFlag, outputContent); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PrintOutput {\n"); - sb.append(" documentQualifier: ").append(toIndentedString(documentQualifier)).append("\n"); - sb.append(" responseMode: ").append(toIndentedString(responseMode)).append("\n"); - sb.append(" integratedPrintFlag: ").append(toIndentedString(integratedPrintFlag)).append("\n"); - sb.append(" requiredSignatureFlag: ").append(toIndentedString(requiredSignatureFlag)).append("\n"); - sb.append(" outputContent: ").append(toIndentedString(outputContent)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PrintOutput given an JSON string - * - * @param jsonString JSON string - * @return An instance of PrintOutput - * @throws JsonProcessingException if the JSON string is invalid with respect to PrintOutput - */ - public static PrintOutput fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PrintOutput.class); - } -/** - * Convert an instance of PrintOutput to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PrintRequest.java b/src/main/java/com/adyen/model/terminal/PrintRequest.java deleted file mode 100644 index 27c68bedd..000000000 --- a/src/main/java/com/adyen/model/terminal/PrintRequest.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.PrintOutput; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys the data to print and the way to process the print. It contains the complete content to print. Content of the Print Request message. - */ -@ApiModel(description = "It conveys the data to print and the way to process the print. It contains the complete content to print. Content of the Print Request message.") -@JsonPropertyOrder({ - PrintRequest.JSON_PROPERTY_PRINT_OUTPUT -}) - -public class PrintRequest { - public static final String JSON_PROPERTY_PRINT_OUTPUT = "PrintOutput"; - private PrintOutput printOutput; - - public PrintRequest() { - } - - public PrintRequest printOutput(PrintOutput printOutput) { - this.printOutput = printOutput; - return this; - } - - /** - * Get printOutput - * @return printOutput - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PRINT_OUTPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PrintOutput getPrintOutput() { - return printOutput; - } - - - /** - * printOutput - * - * @param printOutput - */ - @JsonProperty(JSON_PROPERTY_PRINT_OUTPUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrintOutput(PrintOutput printOutput) { - this.printOutput = printOutput; - } - - - /** - * Return true if this PrintRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PrintRequest printRequest = (PrintRequest) o; - return Objects.equals(this.printOutput, printRequest.printOutput); - } - - @Override - public int hashCode() { - return Objects.hash(printOutput); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PrintRequest {\n"); - sb.append(" printOutput: ").append(toIndentedString(printOutput)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PrintRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of PrintRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to PrintRequest - */ - public static PrintRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PrintRequest.class); - } -/** - * Convert an instance of PrintRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PrintResponse.java b/src/main/java/com/adyen/model/terminal/PrintResponse.java deleted file mode 100644 index 103c95083..000000000 --- a/src/main/java/com/adyen/model/terminal/PrintResponse.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.DocumentQualifier; -import com.adyen.model.terminal.Response; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys the result of the print, parallel to the message request, except if response not required and absent. Content of the Print Response message. - */ -@ApiModel(description = "It conveys the result of the print, parallel to the message request, except if response not required and absent. Content of the Print Response message.") -@JsonPropertyOrder({ - PrintResponse.JSON_PROPERTY_DOCUMENT_QUALIFIER, - PrintResponse.JSON_PROPERTY_RESPONSE -}) - -public class PrintResponse { - public static final String JSON_PROPERTY_DOCUMENT_QUALIFIER = "DocumentQualifier"; - private DocumentQualifier documentQualifier; - - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public PrintResponse() { - } - - public PrintResponse documentQualifier(DocumentQualifier documentQualifier) { - this.documentQualifier = documentQualifier; - return this; - } - - /** - * Get documentQualifier - * @return documentQualifier - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_DOCUMENT_QUALIFIER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public DocumentQualifier getDocumentQualifier() { - return documentQualifier; - } - - - /** - * documentQualifier - * - * @param documentQualifier - */ - @JsonProperty(JSON_PROPERTY_DOCUMENT_QUALIFIER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDocumentQualifier(DocumentQualifier documentQualifier) { - this.documentQualifier = documentQualifier; - } - - - public PrintResponse response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - /** - * Return true if this PrintResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PrintResponse printResponse = (PrintResponse) o; - return Objects.equals(this.documentQualifier, printResponse.documentQualifier) && - Objects.equals(this.response, printResponse.response); - } - - @Override - public int hashCode() { - return Objects.hash(documentQualifier, response); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PrintResponse {\n"); - sb.append(" documentQualifier: ").append(toIndentedString(documentQualifier)).append("\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of PrintResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of PrintResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to PrintResponse - */ - public static PrintResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PrintResponse.class); - } -/** - * Convert an instance of PrintResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/PrinterStatus.java b/src/main/java/com/adyen/model/terminal/PrinterStatus.java deleted file mode 100644 index d0235d993..000000000 --- a/src/main/java/com/adyen/model/terminal/PrinterStatus.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets PrinterStatus - */ -public enum PrinterStatus { - - NOPAPER("NoPaper"), - - OK("OK"), - - OUTOFORDER("OutOfOrder"), - - PAPERJAM("PaperJam"), - - PAPERLOW("PaperLow"); - - private String value; - - PrinterStatus(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static PrinterStatus fromValue(String value) { - for (PrinterStatus b : PrinterStatus.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/Rebates.java b/src/main/java/com/adyen/model/terminal/Rebates.java deleted file mode 100644 index 7ed1cdfff..000000000 --- a/src/main/java/com/adyen/model/terminal/Rebates.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.SaleItemRebate; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Rebates - */ -@JsonPropertyOrder({ - Rebates.JSON_PROPERTY_TOTAL_REBATE, - Rebates.JSON_PROPERTY_REBATE_LABEL, - Rebates.JSON_PROPERTY_SALE_ITEM_REBATE -}) - -public class Rebates { - public static final String JSON_PROPERTY_TOTAL_REBATE = "TotalRebate"; - private BigDecimal totalRebate; - - public static final String JSON_PROPERTY_REBATE_LABEL = "RebateLabel"; - private String rebateLabel; - - public static final String JSON_PROPERTY_SALE_ITEM_REBATE = "SaleItemRebate"; - private List saleItemRebate = null; - - public Rebates() { - } - - public Rebates totalRebate(BigDecimal totalRebate) { - this.totalRebate = totalRebate; - return this; - } - - /** - * Get totalRebate - * minimum: 0.0 - * maximum: 99999999.999999 - * @return totalRebate - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TOTAL_REBATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getTotalRebate() { - return totalRebate; - } - - - /** - * totalRebate - * - * @param totalRebate - */ - @JsonProperty(JSON_PROPERTY_TOTAL_REBATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotalRebate(BigDecimal totalRebate) { - this.totalRebate = totalRebate; - } - - - public Rebates rebateLabel(String rebateLabel) { - this.rebateLabel = rebateLabel; - return this; - } - - /** - * Get rebateLabel - * @return rebateLabel - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_REBATE_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getRebateLabel() { - return rebateLabel; - } - - - /** - * rebateLabel - * - * @param rebateLabel - */ - @JsonProperty(JSON_PROPERTY_REBATE_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRebateLabel(String rebateLabel) { - this.rebateLabel = rebateLabel; - } - - - public Rebates saleItemRebate(List saleItemRebate) { - this.saleItemRebate = saleItemRebate; - return this; - } - - public Rebates addSaleItemRebateItem(SaleItemRebate saleItemRebateItem) { - if (this.saleItemRebate == null) { - this.saleItemRebate = new ArrayList<>(); - } - this.saleItemRebate.add(saleItemRebateItem); - return this; - } - - /** - * Get saleItemRebate - * @return saleItemRebate - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SALE_ITEM_REBATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getSaleItemRebate() { - return saleItemRebate; - } - - - /** - * saleItemRebate - * - * @param saleItemRebate - */ - @JsonProperty(JSON_PROPERTY_SALE_ITEM_REBATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleItemRebate(List saleItemRebate) { - this.saleItemRebate = saleItemRebate; - } - - - /** - * Return true if this Rebates object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Rebates rebates = (Rebates) o; - return Objects.equals(this.totalRebate, rebates.totalRebate) && - Objects.equals(this.rebateLabel, rebates.rebateLabel) && - Objects.equals(this.saleItemRebate, rebates.saleItemRebate); - } - - @Override - public int hashCode() { - return Objects.hash(totalRebate, rebateLabel, saleItemRebate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Rebates {\n"); - sb.append(" totalRebate: ").append(toIndentedString(totalRebate)).append("\n"); - sb.append(" rebateLabel: ").append(toIndentedString(rebateLabel)).append("\n"); - sb.append(" saleItemRebate: ").append(toIndentedString(saleItemRebate)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of Rebates given an JSON string - * - * @param jsonString JSON string - * @return An instance of Rebates - * @throws JsonProcessingException if the JSON string is invalid with respect to Rebates - */ - public static Rebates fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, Rebates.class); - } -/** - * Convert an instance of Rebates to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/ReconciliationRequest.java b/src/main/java/com/adyen/model/terminal/ReconciliationRequest.java deleted file mode 100644 index 398cbecd6..000000000 --- a/src/main/java/com/adyen/model/terminal/ReconciliationRequest.java +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.ReconciliationType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the Reconciliation requested by the Sale System. Content of the Reconciliation Request message. - */ -@ApiModel(description = "It conveys Information related to the Reconciliation requested by the Sale System. Content of the Reconciliation Request message.") -@JsonPropertyOrder({ - ReconciliationRequest.JSON_PROPERTY_RECONCILIATION_TYPE, - ReconciliationRequest.JSON_PROPERTY_ACQUIRER_I_D, - ReconciliationRequest.JSON_PROPERTY_PO_I_RECONCILIATION_I_D -}) - -public class ReconciliationRequest { - public static final String JSON_PROPERTY_RECONCILIATION_TYPE = "ReconciliationType"; - private ReconciliationType reconciliationType; - - public static final String JSON_PROPERTY_ACQUIRER_I_D = "AcquirerID"; - private List acquirerID = null; - - public static final String JSON_PROPERTY_PO_I_RECONCILIATION_I_D = "POIReconciliationID"; - private Integer poIReconciliationID; - - public ReconciliationRequest() { - } - - public ReconciliationRequest reconciliationType(ReconciliationType reconciliationType) { - this.reconciliationType = reconciliationType; - return this; - } - - /** - * Get reconciliationType - * @return reconciliationType - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RECONCILIATION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public ReconciliationType getReconciliationType() { - return reconciliationType; - } - - - /** - * reconciliationType - * - * @param reconciliationType - */ - @JsonProperty(JSON_PROPERTY_RECONCILIATION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReconciliationType(ReconciliationType reconciliationType) { - this.reconciliationType = reconciliationType; - } - - - public ReconciliationRequest acquirerID(List acquirerID) { - this.acquirerID = acquirerID; - return this; - } - - public ReconciliationRequest addAcquirerIDItem(Integer acquirerIDItem) { - if (this.acquirerID == null) { - this.acquirerID = new ArrayList<>(); - } - this.acquirerID.add(acquirerIDItem); - return this; - } - - /** - * Get acquirerID - * @return acquirerID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ACQUIRER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getAcquirerID() { - return acquirerID; - } - - - /** - * acquirerID - * - * @param acquirerID - */ - @JsonProperty(JSON_PROPERTY_ACQUIRER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAcquirerID(List acquirerID) { - this.acquirerID = acquirerID; - } - - - public ReconciliationRequest poIReconciliationID(Integer poIReconciliationID) { - this.poIReconciliationID = poIReconciliationID; - return this; - } - - /** - * Absent if ReconciliationType is not PreviousReconciliation. - * @return poIReconciliationID - **/ - @ApiModelProperty(value = "Absent if ReconciliationType is not PreviousReconciliation.") - @JsonProperty(JSON_PROPERTY_PO_I_RECONCILIATION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getPoIReconciliationID() { - return poIReconciliationID; - } - - - /** - * Absent if ReconciliationType is not PreviousReconciliation. - * - * @param poIReconciliationID - */ - @JsonProperty(JSON_PROPERTY_PO_I_RECONCILIATION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoIReconciliationID(Integer poIReconciliationID) { - this.poIReconciliationID = poIReconciliationID; - } - - - /** - * Return true if this ReconciliationRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReconciliationRequest reconciliationRequest = (ReconciliationRequest) o; - return Objects.equals(this.reconciliationType, reconciliationRequest.reconciliationType) && - Objects.equals(this.acquirerID, reconciliationRequest.acquirerID) && - Objects.equals(this.poIReconciliationID, reconciliationRequest.poIReconciliationID); - } - - @Override - public int hashCode() { - return Objects.hash(reconciliationType, acquirerID, poIReconciliationID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReconciliationRequest {\n"); - sb.append(" reconciliationType: ").append(toIndentedString(reconciliationType)).append("\n"); - sb.append(" acquirerID: ").append(toIndentedString(acquirerID)).append("\n"); - sb.append(" poIReconciliationID: ").append(toIndentedString(poIReconciliationID)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of ReconciliationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReconciliationRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to ReconciliationRequest - */ - public static ReconciliationRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, ReconciliationRequest.class); - } -/** - * Convert an instance of ReconciliationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/ReconciliationResponse.java b/src/main/java/com/adyen/model/terminal/ReconciliationResponse.java deleted file mode 100644 index ed1002403..000000000 --- a/src/main/java/com/adyen/model/terminal/ReconciliationResponse.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.ReconciliationType; -import com.adyen.model.terminal.Response; -import com.adyen.model.terminal.TransactionTotals; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the Reconciliation transaction processed by the POI System. Content of the Reconciliation Response message. - */ -@ApiModel(description = "It conveys Information related to the Reconciliation transaction processed by the POI System. Content of the Reconciliation Response message.") -@JsonPropertyOrder({ - ReconciliationResponse.JSON_PROPERTY_RESPONSE, - ReconciliationResponse.JSON_PROPERTY_RECONCILIATION_TYPE, - ReconciliationResponse.JSON_PROPERTY_PO_I_RECONCILIATION_I_D, - ReconciliationResponse.JSON_PROPERTY_TRANSACTION_TOTALS -}) - -public class ReconciliationResponse { - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public static final String JSON_PROPERTY_RECONCILIATION_TYPE = "ReconciliationType"; - private ReconciliationType reconciliationType; - - public static final String JSON_PROPERTY_PO_I_RECONCILIATION_I_D = "POIReconciliationID"; - private Integer poIReconciliationID; - - public static final String JSON_PROPERTY_TRANSACTION_TOTALS = "TransactionTotals"; - private List transactionTotals = null; - - public ReconciliationResponse() { - } - - public ReconciliationResponse response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - public ReconciliationResponse reconciliationType(ReconciliationType reconciliationType) { - this.reconciliationType = reconciliationType; - return this; - } - - /** - * Get reconciliationType - * @return reconciliationType - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RECONCILIATION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public ReconciliationType getReconciliationType() { - return reconciliationType; - } - - - /** - * reconciliationType - * - * @param reconciliationType - */ - @JsonProperty(JSON_PROPERTY_RECONCILIATION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReconciliationType(ReconciliationType reconciliationType) { - this.reconciliationType = reconciliationType; - } - - - public ReconciliationResponse poIReconciliationID(Integer poIReconciliationID) { - this.poIReconciliationID = poIReconciliationID; - return this; - } - - /** - * Absent if ReconciliationType is AcquirerReconciliation. - * @return poIReconciliationID - **/ - @ApiModelProperty(value = "Absent if ReconciliationType is AcquirerReconciliation.") - @JsonProperty(JSON_PROPERTY_PO_I_RECONCILIATION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getPoIReconciliationID() { - return poIReconciliationID; - } - - - /** - * Absent if ReconciliationType is AcquirerReconciliation. - * - * @param poIReconciliationID - */ - @JsonProperty(JSON_PROPERTY_PO_I_RECONCILIATION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoIReconciliationID(Integer poIReconciliationID) { - this.poIReconciliationID = poIReconciliationID; - } - - - public ReconciliationResponse transactionTotals(List transactionTotals) { - this.transactionTotals = transactionTotals; - return this; - } - - public ReconciliationResponse addTransactionTotalsItem(TransactionTotals transactionTotalsItem) { - if (this.transactionTotals == null) { - this.transactionTotals = new ArrayList<>(); - } - this.transactionTotals.add(transactionTotalsItem); - return this; - } - - /** - * Get transactionTotals - * @return transactionTotals - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TRANSACTION_TOTALS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getTransactionTotals() { - return transactionTotals; - } - - - /** - * transactionTotals - * - * @param transactionTotals - */ - @JsonProperty(JSON_PROPERTY_TRANSACTION_TOTALS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransactionTotals(List transactionTotals) { - this.transactionTotals = transactionTotals; - } - - - /** - * Return true if this ReconciliationResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReconciliationResponse reconciliationResponse = (ReconciliationResponse) o; - return Objects.equals(this.response, reconciliationResponse.response) && - Objects.equals(this.reconciliationType, reconciliationResponse.reconciliationType) && - Objects.equals(this.poIReconciliationID, reconciliationResponse.poIReconciliationID) && - Objects.equals(this.transactionTotals, reconciliationResponse.transactionTotals); - } - - @Override - public int hashCode() { - return Objects.hash(response, reconciliationType, poIReconciliationID, transactionTotals); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReconciliationResponse {\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append(" reconciliationType: ").append(toIndentedString(reconciliationType)).append("\n"); - sb.append(" poIReconciliationID: ").append(toIndentedString(poIReconciliationID)).append("\n"); - sb.append(" transactionTotals: ").append(toIndentedString(transactionTotals)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of ReconciliationResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReconciliationResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to ReconciliationResponse - */ - public static ReconciliationResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, ReconciliationResponse.class); - } -/** - * Convert an instance of ReconciliationResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/ReconciliationType.java b/src/main/java/com/adyen/model/terminal/ReconciliationType.java deleted file mode 100644 index 58ad2d521..000000000 --- a/src/main/java/com/adyen/model/terminal/ReconciliationType.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets ReconciliationType - */ -public enum ReconciliationType { - - ACQUIRERRECONCILIATION("AcquirerReconciliation"), - - ACQUIRERSYNCHRONISATION("AcquirerSynchronisation"), - - PREVIOUSRECONCILIATION("PreviousReconciliation"), - - SALERECONCILIATION("SaleReconciliation"); - - private String value; - - ReconciliationType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ReconciliationType fromValue(String value) { - for (ReconciliationType b : ReconciliationType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/RepeatedMessageResponse.java b/src/main/java/com/adyen/model/terminal/RepeatedMessageResponse.java deleted file mode 100644 index 0f1d15ebe..000000000 --- a/src/main/java/com/adyen/model/terminal/RepeatedMessageResponse.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.MessageHeader; -import com.adyen.model.terminal.RepeatedResponseMessageBody; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * RepeatedMessageResponse - */ -@JsonPropertyOrder({ - RepeatedMessageResponse.JSON_PROPERTY_MESSAGE_HEADER, - RepeatedMessageResponse.JSON_PROPERTY_REPEATED_RESPONSE_MESSAGE_BODY -}) - -public class RepeatedMessageResponse { - public static final String JSON_PROPERTY_MESSAGE_HEADER = "MessageHeader"; - private MessageHeader messageHeader; - - public static final String JSON_PROPERTY_REPEATED_RESPONSE_MESSAGE_BODY = "RepeatedResponseMessageBody"; - private RepeatedResponseMessageBody repeatedResponseMessageBody; - - public RepeatedMessageResponse() { - } - - public RepeatedMessageResponse messageHeader(MessageHeader messageHeader) { - this.messageHeader = messageHeader; - return this; - } - - /** - * Get messageHeader - * @return messageHeader - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_MESSAGE_HEADER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public MessageHeader getMessageHeader() { - return messageHeader; - } - - - /** - * messageHeader - * - * @param messageHeader - */ - @JsonProperty(JSON_PROPERTY_MESSAGE_HEADER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessageHeader(MessageHeader messageHeader) { - this.messageHeader = messageHeader; - } - - - public RepeatedMessageResponse repeatedResponseMessageBody(RepeatedResponseMessageBody repeatedResponseMessageBody) { - this.repeatedResponseMessageBody = repeatedResponseMessageBody; - return this; - } - - /** - * Get repeatedResponseMessageBody - * @return repeatedResponseMessageBody - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_REPEATED_RESPONSE_MESSAGE_BODY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public RepeatedResponseMessageBody getRepeatedResponseMessageBody() { - return repeatedResponseMessageBody; - } - - - /** - * repeatedResponseMessageBody - * - * @param repeatedResponseMessageBody - */ - @JsonProperty(JSON_PROPERTY_REPEATED_RESPONSE_MESSAGE_BODY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRepeatedResponseMessageBody(RepeatedResponseMessageBody repeatedResponseMessageBody) { - this.repeatedResponseMessageBody = repeatedResponseMessageBody; - } - - - /** - * Return true if this RepeatedMessageResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RepeatedMessageResponse repeatedMessageResponse = (RepeatedMessageResponse) o; - return Objects.equals(this.messageHeader, repeatedMessageResponse.messageHeader) && - Objects.equals(this.repeatedResponseMessageBody, repeatedMessageResponse.repeatedResponseMessageBody); - } - - @Override - public int hashCode() { - return Objects.hash(messageHeader, repeatedResponseMessageBody); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RepeatedMessageResponse {\n"); - sb.append(" messageHeader: ").append(toIndentedString(messageHeader)).append("\n"); - sb.append(" repeatedResponseMessageBody: ").append(toIndentedString(repeatedResponseMessageBody)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of RepeatedMessageResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of RepeatedMessageResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to RepeatedMessageResponse - */ - public static RepeatedMessageResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, RepeatedMessageResponse.class); - } -/** - * Convert an instance of RepeatedMessageResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/RepeatedResponseMessageBody.java b/src/main/java/com/adyen/model/terminal/RepeatedResponseMessageBody.java deleted file mode 100644 index ed2b1e9b5..000000000 --- a/src/main/java/com/adyen/model/terminal/RepeatedResponseMessageBody.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.CardAcquisitionResponse; -import com.adyen.model.terminal.CardReaderAPDUResponse; -import com.adyen.model.terminal.LoyaltyResponse; -import com.adyen.model.terminal.PaymentResponse; -import com.adyen.model.terminal.ReversalResponse; -import com.adyen.model.terminal.StoredValueResponse; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * RepeatedResponseMessageBody - */ -@JsonPropertyOrder({ - RepeatedResponseMessageBody.JSON_PROPERTY_LOYALTY_RESPONSE, - RepeatedResponseMessageBody.JSON_PROPERTY_PAYMENT_RESPONSE, - RepeatedResponseMessageBody.JSON_PROPERTY_REVERSAL_RESPONSE, - RepeatedResponseMessageBody.JSON_PROPERTY_STORED_VALUE_RESPONSE, - RepeatedResponseMessageBody.JSON_PROPERTY_CARD_ACQUISITION_RESPONSE, - RepeatedResponseMessageBody.JSON_PROPERTY_CARD_READER_A_P_D_U_RESPONSE -}) - -public class RepeatedResponseMessageBody { - public static final String JSON_PROPERTY_LOYALTY_RESPONSE = "LoyaltyResponse"; - private LoyaltyResponse loyaltyResponse; - - public static final String JSON_PROPERTY_PAYMENT_RESPONSE = "PaymentResponse"; - private PaymentResponse paymentResponse; - - public static final String JSON_PROPERTY_REVERSAL_RESPONSE = "ReversalResponse"; - private ReversalResponse reversalResponse; - - public static final String JSON_PROPERTY_STORED_VALUE_RESPONSE = "StoredValueResponse"; - private StoredValueResponse storedValueResponse; - - public static final String JSON_PROPERTY_CARD_ACQUISITION_RESPONSE = "CardAcquisitionResponse"; - private CardAcquisitionResponse cardAcquisitionResponse; - - public static final String JSON_PROPERTY_CARD_READER_A_P_D_U_RESPONSE = "CardReaderAPDUResponse"; - private CardReaderAPDUResponse cardReaderAPDUResponse; - - public RepeatedResponseMessageBody() { - } - - public RepeatedResponseMessageBody loyaltyResponse(LoyaltyResponse loyaltyResponse) { - this.loyaltyResponse = loyaltyResponse; - return this; - } - - /** - * Get loyaltyResponse - * @return loyaltyResponse - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyResponse getLoyaltyResponse() { - return loyaltyResponse; - } - - - /** - * loyaltyResponse - * - * @param loyaltyResponse - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyResponse(LoyaltyResponse loyaltyResponse) { - this.loyaltyResponse = loyaltyResponse; - } - - - public RepeatedResponseMessageBody paymentResponse(PaymentResponse paymentResponse) { - this.paymentResponse = paymentResponse; - return this; - } - - /** - * Get paymentResponse - * @return paymentResponse - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentResponse getPaymentResponse() { - return paymentResponse; - } - - - /** - * paymentResponse - * - * @param paymentResponse - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentResponse(PaymentResponse paymentResponse) { - this.paymentResponse = paymentResponse; - } - - - public RepeatedResponseMessageBody reversalResponse(ReversalResponse reversalResponse) { - this.reversalResponse = reversalResponse; - return this; - } - - /** - * Get reversalResponse - * @return reversalResponse - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_REVERSAL_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public ReversalResponse getReversalResponse() { - return reversalResponse; - } - - - /** - * reversalResponse - * - * @param reversalResponse - */ - @JsonProperty(JSON_PROPERTY_REVERSAL_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReversalResponse(ReversalResponse reversalResponse) { - this.reversalResponse = reversalResponse; - } - - - public RepeatedResponseMessageBody storedValueResponse(StoredValueResponse storedValueResponse) { - this.storedValueResponse = storedValueResponse; - return this; - } - - /** - * Get storedValueResponse - * @return storedValueResponse - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_STORED_VALUE_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public StoredValueResponse getStoredValueResponse() { - return storedValueResponse; - } - - - /** - * storedValueResponse - * - * @param storedValueResponse - */ - @JsonProperty(JSON_PROPERTY_STORED_VALUE_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoredValueResponse(StoredValueResponse storedValueResponse) { - this.storedValueResponse = storedValueResponse; - } - - - public RepeatedResponseMessageBody cardAcquisitionResponse(CardAcquisitionResponse cardAcquisitionResponse) { - this.cardAcquisitionResponse = cardAcquisitionResponse; - return this; - } - - /** - * Get cardAcquisitionResponse - * @return cardAcquisitionResponse - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CARD_ACQUISITION_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public CardAcquisitionResponse getCardAcquisitionResponse() { - return cardAcquisitionResponse; - } - - - /** - * cardAcquisitionResponse - * - * @param cardAcquisitionResponse - */ - @JsonProperty(JSON_PROPERTY_CARD_ACQUISITION_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCardAcquisitionResponse(CardAcquisitionResponse cardAcquisitionResponse) { - this.cardAcquisitionResponse = cardAcquisitionResponse; - } - - - public RepeatedResponseMessageBody cardReaderAPDUResponse(CardReaderAPDUResponse cardReaderAPDUResponse) { - this.cardReaderAPDUResponse = cardReaderAPDUResponse; - return this; - } - - /** - * Get cardReaderAPDUResponse - * @return cardReaderAPDUResponse - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CARD_READER_A_P_D_U_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public CardReaderAPDUResponse getCardReaderAPDUResponse() { - return cardReaderAPDUResponse; - } - - - /** - * cardReaderAPDUResponse - * - * @param cardReaderAPDUResponse - */ - @JsonProperty(JSON_PROPERTY_CARD_READER_A_P_D_U_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCardReaderAPDUResponse(CardReaderAPDUResponse cardReaderAPDUResponse) { - this.cardReaderAPDUResponse = cardReaderAPDUResponse; - } - - - /** - * Return true if this RepeatedResponseMessageBody object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RepeatedResponseMessageBody repeatedResponseMessageBody = (RepeatedResponseMessageBody) o; - return Objects.equals(this.loyaltyResponse, repeatedResponseMessageBody.loyaltyResponse) && - Objects.equals(this.paymentResponse, repeatedResponseMessageBody.paymentResponse) && - Objects.equals(this.reversalResponse, repeatedResponseMessageBody.reversalResponse) && - Objects.equals(this.storedValueResponse, repeatedResponseMessageBody.storedValueResponse) && - Objects.equals(this.cardAcquisitionResponse, repeatedResponseMessageBody.cardAcquisitionResponse) && - Objects.equals(this.cardReaderAPDUResponse, repeatedResponseMessageBody.cardReaderAPDUResponse); - } - - @Override - public int hashCode() { - return Objects.hash(loyaltyResponse, paymentResponse, reversalResponse, storedValueResponse, cardAcquisitionResponse, cardReaderAPDUResponse); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RepeatedResponseMessageBody {\n"); - sb.append(" loyaltyResponse: ").append(toIndentedString(loyaltyResponse)).append("\n"); - sb.append(" paymentResponse: ").append(toIndentedString(paymentResponse)).append("\n"); - sb.append(" reversalResponse: ").append(toIndentedString(reversalResponse)).append("\n"); - sb.append(" storedValueResponse: ").append(toIndentedString(storedValueResponse)).append("\n"); - sb.append(" cardAcquisitionResponse: ").append(toIndentedString(cardAcquisitionResponse)).append("\n"); - sb.append(" cardReaderAPDUResponse: ").append(toIndentedString(cardReaderAPDUResponse)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of RepeatedResponseMessageBody given an JSON string - * - * @param jsonString JSON string - * @return An instance of RepeatedResponseMessageBody - * @throws JsonProcessingException if the JSON string is invalid with respect to RepeatedResponseMessageBody - */ - public static RepeatedResponseMessageBody fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, RepeatedResponseMessageBody.class); - } -/** - * Convert an instance of RepeatedResponseMessageBody to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/Response.java b/src/main/java/com/adyen/model/terminal/Response.java deleted file mode 100644 index 715a9a2aa..000000000 --- a/src/main/java/com/adyen/model/terminal/Response.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.ErrorCondition; -import com.adyen.model.terminal.Result; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * If Result is Success, ErrorCondition is absent or not used in the processing of the message. In the other cases, the ErrorCondition has to be present and can refine the processing of the message response. AdditionalResponse gives more information about the success or the failure of the message request processing, for logging without real time involvements. Result of a message request processing. - */ -@ApiModel(description = "If Result is Success, ErrorCondition is absent or not used in the processing of the message. In the other cases, the ErrorCondition has to be present and can refine the processing of the message response. AdditionalResponse gives more information about the success or the failure of the message request processing, for logging without real time involvements. Result of a message request processing.") -@JsonPropertyOrder({ - Response.JSON_PROPERTY_RESULT, - Response.JSON_PROPERTY_ERROR_CONDITION, - Response.JSON_PROPERTY_ADDITIONAL_RESPONSE -}) - -public class Response { - public static final String JSON_PROPERTY_RESULT = "Result"; - private Result result; - - public static final String JSON_PROPERTY_ERROR_CONDITION = "ErrorCondition"; - private ErrorCondition errorCondition; - - public static final String JSON_PROPERTY_ADDITIONAL_RESPONSE = "AdditionalResponse"; - private String additionalResponse; - - public Response() { - } - - public Response result(Result result) { - this.result = result; - return this; - } - - /** - * Get result - * @return result - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Result getResult() { - return result; - } - - - /** - * result - * - * @param result - */ - @JsonProperty(JSON_PROPERTY_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResult(Result result) { - this.result = result; - } - - - public Response errorCondition(ErrorCondition errorCondition) { - this.errorCondition = errorCondition; - return this; - } - - /** - * Get errorCondition - * @return errorCondition - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ERROR_CONDITION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public ErrorCondition getErrorCondition() { - return errorCondition; - } - - - /** - * errorCondition - * - * @param errorCondition - */ - @JsonProperty(JSON_PROPERTY_ERROR_CONDITION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setErrorCondition(ErrorCondition errorCondition) { - this.errorCondition = errorCondition; - } - - - public Response additionalResponse(String additionalResponse) { - this.additionalResponse = additionalResponse; - return this; - } - - /** - * If present, the POI logs it for further examination. - * @return additionalResponse - **/ - @ApiModelProperty(value = "If present, the POI logs it for further examination.") - @JsonProperty(JSON_PROPERTY_ADDITIONAL_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getAdditionalResponse() { - return additionalResponse; - } - - - /** - * If present, the POI logs it for further examination. - * - * @param additionalResponse - */ - @JsonProperty(JSON_PROPERTY_ADDITIONAL_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAdditionalResponse(String additionalResponse) { - this.additionalResponse = additionalResponse; - } - - - /** - * Return true if this Response object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Response response = (Response) o; - return Objects.equals(this.result, response.result) && - Objects.equals(this.errorCondition, response.errorCondition) && - Objects.equals(this.additionalResponse, response.additionalResponse); - } - - @Override - public int hashCode() { - return Objects.hash(result, errorCondition, additionalResponse); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Response {\n"); - sb.append(" result: ").append(toIndentedString(result)).append("\n"); - sb.append(" errorCondition: ").append(toIndentedString(errorCondition)).append("\n"); - sb.append(" additionalResponse: ").append(toIndentedString(additionalResponse)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of Response - * @throws JsonProcessingException if the JSON string is invalid with respect to Response - */ - public static Response fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, Response.class); - } -/** - * Convert an instance of Response to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/ResponseMode.java b/src/main/java/com/adyen/model/terminal/ResponseMode.java deleted file mode 100644 index 81edecd38..000000000 --- a/src/main/java/com/adyen/model/terminal/ResponseMode.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets ResponseMode - */ -public enum ResponseMode { - - IMMEDIATE("Immediate"), - - NOTREQUIRED("NotRequired"), - - PRINTEND("PrintEnd"), - - SOUNDEND("SoundEnd"); - - private String value; - - ResponseMode(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ResponseMode fromValue(String value) { - for (ResponseMode b : ResponseMode.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/Result.java b/src/main/java/com/adyen/model/terminal/Result.java deleted file mode 100644 index 892aadea0..000000000 --- a/src/main/java/com/adyen/model/terminal/Result.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets Result - */ -public enum Result { - - FAILURE("Failure"), - - PARTIAL("Partial"), - - SUCCESS("Success"); - - private String value; - - Result(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Result fromValue(String value) { - for (Result b : Result.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/ReversalReason.java b/src/main/java/com/adyen/model/terminal/ReversalReason.java deleted file mode 100644 index 8f74dff61..000000000 --- a/src/main/java/com/adyen/model/terminal/ReversalReason.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import io.swagger.annotations.ApiModel; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Reason of the payment or loyalty reversal.. - */ -public enum ReversalReason { - - CUSTCANCEL("CustCancel"), - - MALFUNCTION("Malfunction"), - - MERCHANTCANCEL("MerchantCancel"), - - UNABLE2COMPL("Unable2Compl"); - - private String value; - - ReversalReason(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ReversalReason fromValue(String value) { - for (ReversalReason b : ReversalReason.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/ReversalRequest.java b/src/main/java/com/adyen/model/terminal/ReversalRequest.java deleted file mode 100644 index 6e7f44fb1..000000000 --- a/src/main/java/com/adyen/model/terminal/ReversalRequest.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.CustomerOrder; -import com.adyen.model.terminal.OriginalPOITransaction; -import com.adyen.model.terminal.ReversalReason; -import com.adyen.model.terminal.SaleData; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the reversal of a previous payment or a loyalty transaction. Content of the Reversal Request message. - */ -@ApiModel(description = "It conveys Information related to the reversal of a previous payment or a loyalty transaction. Content of the Reversal Request message.") -@JsonPropertyOrder({ - ReversalRequest.JSON_PROPERTY_SALE_DATA, - ReversalRequest.JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION, - ReversalRequest.JSON_PROPERTY_REVERSED_AMOUNT, - ReversalRequest.JSON_PROPERTY_REVERSAL_REASON, - ReversalRequest.JSON_PROPERTY_CUSTOMER_ORDER -}) - -public class ReversalRequest { - public static final String JSON_PROPERTY_SALE_DATA = "SaleData"; - private SaleData saleData; - - public static final String JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION = "OriginalPOITransaction"; - private OriginalPOITransaction originalPOITransaction; - - public static final String JSON_PROPERTY_REVERSED_AMOUNT = "ReversedAmount"; - private BigDecimal reversedAmount; - - public static final String JSON_PROPERTY_REVERSAL_REASON = "ReversalReason"; - private ReversalReason reversalReason; - - public static final String JSON_PROPERTY_CUSTOMER_ORDER = "CustomerOrder"; - private CustomerOrder customerOrder; - - public ReversalRequest() { - } - - public ReversalRequest saleData(SaleData saleData) { - this.saleData = saleData; - return this; - } - - /** - * Get saleData - * @return saleData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SaleData getSaleData() { - return saleData; - } - - - /** - * saleData - * - * @param saleData - */ - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleData(SaleData saleData) { - this.saleData = saleData; - } - - - public ReversalRequest originalPOITransaction(OriginalPOITransaction originalPOITransaction) { - this.originalPOITransaction = originalPOITransaction; - return this; - } - - /** - * Get originalPOITransaction - * @return originalPOITransaction - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OriginalPOITransaction getOriginalPOITransaction() { - return originalPOITransaction; - } - - - /** - * originalPOITransaction - * - * @param originalPOITransaction - */ - @JsonProperty(JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalPOITransaction(OriginalPOITransaction originalPOITransaction) { - this.originalPOITransaction = originalPOITransaction; - } - - - public ReversalRequest reversedAmount(BigDecimal reversedAmount) { - this.reversedAmount = reversedAmount; - return this; - } - - /** - * ReversedAmount is implicitely the AuthorizedAmount if absent. - * minimum: 0.0 - * maximum: 99999999.999999 - * @return reversedAmount - **/ - @ApiModelProperty(value = "ReversedAmount is implicitely the AuthorizedAmount if absent.") - @JsonProperty(JSON_PROPERTY_REVERSED_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getReversedAmount() { - return reversedAmount; - } - - - /** - * ReversedAmount is implicitely the AuthorizedAmount if absent. - * - * @param reversedAmount - */ - @JsonProperty(JSON_PROPERTY_REVERSED_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReversedAmount(BigDecimal reversedAmount) { - this.reversedAmount = reversedAmount; - } - - - public ReversalRequest reversalReason(ReversalReason reversalReason) { - this.reversalReason = reversalReason; - return this; - } - - /** - * Get reversalReason - * @return reversalReason - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_REVERSAL_REASON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public ReversalReason getReversalReason() { - return reversalReason; - } - - - /** - * reversalReason - * - * @param reversalReason - */ - @JsonProperty(JSON_PROPERTY_REVERSAL_REASON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReversalReason(ReversalReason reversalReason) { - this.reversalReason = reversalReason; - } - - - public ReversalRequest customerOrder(CustomerOrder customerOrder) { - this.customerOrder = customerOrder; - return this; - } - - /** - * Get customerOrder - * @return customerOrder - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public CustomerOrder getCustomerOrder() { - return customerOrder; - } - - - /** - * customerOrder - * - * @param customerOrder - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerOrder(CustomerOrder customerOrder) { - this.customerOrder = customerOrder; - } - - - /** - * Return true if this ReversalRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReversalRequest reversalRequest = (ReversalRequest) o; - return Objects.equals(this.saleData, reversalRequest.saleData) && - Objects.equals(this.originalPOITransaction, reversalRequest.originalPOITransaction) && - Objects.equals(this.reversedAmount, reversalRequest.reversedAmount) && - Objects.equals(this.reversalReason, reversalRequest.reversalReason) && - Objects.equals(this.customerOrder, reversalRequest.customerOrder); - } - - @Override - public int hashCode() { - return Objects.hash(saleData, originalPOITransaction, reversedAmount, reversalReason, customerOrder); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReversalRequest {\n"); - sb.append(" saleData: ").append(toIndentedString(saleData)).append("\n"); - sb.append(" originalPOITransaction: ").append(toIndentedString(originalPOITransaction)).append("\n"); - sb.append(" reversedAmount: ").append(toIndentedString(reversedAmount)).append("\n"); - sb.append(" reversalReason: ").append(toIndentedString(reversalReason)).append("\n"); - sb.append(" customerOrder: ").append(toIndentedString(customerOrder)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of ReversalRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReversalRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to ReversalRequest - */ - public static ReversalRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, ReversalRequest.class); - } -/** - * Convert an instance of ReversalRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/ReversalResponse.java b/src/main/java/com/adyen/model/terminal/ReversalResponse.java deleted file mode 100644 index 320ae2c28..000000000 --- a/src/main/java/com/adyen/model/terminal/ReversalResponse.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.CustomerOrder; -import com.adyen.model.terminal.OriginalPOITransaction; -import com.adyen.model.terminal.POIData; -import com.adyen.model.terminal.PaymentReceipt; -import com.adyen.model.terminal.Response; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the reversal processed by the POI System. Content of the Reversal Response message. - */ -@ApiModel(description = "It conveys Information related to the reversal processed by the POI System. Content of the Reversal Response message.") -@JsonPropertyOrder({ - ReversalResponse.JSON_PROPERTY_RESPONSE, - ReversalResponse.JSON_PROPERTY_PO_I_DATA, - ReversalResponse.JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION, - ReversalResponse.JSON_PROPERTY_REVERSED_AMOUNT, - ReversalResponse.JSON_PROPERTY_CUSTOMER_ORDER, - ReversalResponse.JSON_PROPERTY_PAYMENT_RECEIPT -}) - -public class ReversalResponse { - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public static final String JSON_PROPERTY_PO_I_DATA = "POIData"; - private POIData poIData; - - public static final String JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION = "OriginalPOITransaction"; - private OriginalPOITransaction originalPOITransaction; - - public static final String JSON_PROPERTY_REVERSED_AMOUNT = "ReversedAmount"; - private BigDecimal reversedAmount; - - public static final String JSON_PROPERTY_CUSTOMER_ORDER = "CustomerOrder"; - private List customerOrder = null; - - public static final String JSON_PROPERTY_PAYMENT_RECEIPT = "PaymentReceipt"; - private List paymentReceipt = null; - - public ReversalResponse() { - } - - public ReversalResponse response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - public ReversalResponse poIData(POIData poIData) { - this.poIData = poIData; - return this; - } - - /** - * Get poIData - * @return poIData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PO_I_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public POIData getPoIData() { - return poIData; - } - - - /** - * poIData - * - * @param poIData - */ - @JsonProperty(JSON_PROPERTY_PO_I_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoIData(POIData poIData) { - this.poIData = poIData; - } - - - public ReversalResponse originalPOITransaction(OriginalPOITransaction originalPOITransaction) { - this.originalPOITransaction = originalPOITransaction; - return this; - } - - /** - * Get originalPOITransaction - * @return originalPOITransaction - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OriginalPOITransaction getOriginalPOITransaction() { - return originalPOITransaction; - } - - - /** - * originalPOITransaction - * - * @param originalPOITransaction - */ - @JsonProperty(JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalPOITransaction(OriginalPOITransaction originalPOITransaction) { - this.originalPOITransaction = originalPOITransaction; - } - - - public ReversalResponse reversedAmount(BigDecimal reversedAmount) { - this.reversedAmount = reversedAmount; - return this; - } - - /** - * Copy. - * minimum: 0.0 - * maximum: 99999999.999999 - * @return reversedAmount - **/ - @ApiModelProperty(value = "Copy.") - @JsonProperty(JSON_PROPERTY_REVERSED_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getReversedAmount() { - return reversedAmount; - } - - - /** - * Copy. - * - * @param reversedAmount - */ - @JsonProperty(JSON_PROPERTY_REVERSED_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReversedAmount(BigDecimal reversedAmount) { - this.reversedAmount = reversedAmount; - } - - - public ReversalResponse customerOrder(List customerOrder) { - this.customerOrder = customerOrder; - return this; - } - - public ReversalResponse addCustomerOrderItem(CustomerOrder customerOrderItem) { - if (this.customerOrder == null) { - this.customerOrder = new ArrayList<>(); - } - this.customerOrder.add(customerOrderItem); - return this; - } - - /** - * Get customerOrder - * @return customerOrder - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getCustomerOrder() { - return customerOrder; - } - - - /** - * customerOrder - * - * @param customerOrder - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerOrder(List customerOrder) { - this.customerOrder = customerOrder; - } - - - public ReversalResponse paymentReceipt(List paymentReceipt) { - this.paymentReceipt = paymentReceipt; - return this; - } - - public ReversalResponse addPaymentReceiptItem(PaymentReceipt paymentReceiptItem) { - if (this.paymentReceipt == null) { - this.paymentReceipt = new ArrayList<>(); - } - this.paymentReceipt.add(paymentReceiptItem); - return this; - } - - /** - * Get paymentReceipt - * @return paymentReceipt - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_RECEIPT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPaymentReceipt() { - return paymentReceipt; - } - - - /** - * paymentReceipt - * - * @param paymentReceipt - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_RECEIPT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentReceipt(List paymentReceipt) { - this.paymentReceipt = paymentReceipt; - } - - - /** - * Return true if this ReversalResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReversalResponse reversalResponse = (ReversalResponse) o; - return Objects.equals(this.response, reversalResponse.response) && - Objects.equals(this.poIData, reversalResponse.poIData) && - Objects.equals(this.originalPOITransaction, reversalResponse.originalPOITransaction) && - Objects.equals(this.reversedAmount, reversalResponse.reversedAmount) && - Objects.equals(this.customerOrder, reversalResponse.customerOrder) && - Objects.equals(this.paymentReceipt, reversalResponse.paymentReceipt); - } - - @Override - public int hashCode() { - return Objects.hash(response, poIData, originalPOITransaction, reversedAmount, customerOrder, paymentReceipt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReversalResponse {\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append(" poIData: ").append(toIndentedString(poIData)).append("\n"); - sb.append(" originalPOITransaction: ").append(toIndentedString(originalPOITransaction)).append("\n"); - sb.append(" reversedAmount: ").append(toIndentedString(reversedAmount)).append("\n"); - sb.append(" customerOrder: ").append(toIndentedString(customerOrder)).append("\n"); - sb.append(" paymentReceipt: ").append(toIndentedString(paymentReceipt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of ReversalResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReversalResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to ReversalResponse - */ - public static ReversalResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, ReversalResponse.class); - } -/** - * Convert an instance of ReversalResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/SaleData.java b/src/main/java/com/adyen/model/terminal/SaleData.java deleted file mode 100644 index c5758e1c8..000000000 --- a/src/main/java/com/adyen/model/terminal/SaleData.java +++ /dev/null @@ -1,581 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.SaleTerminalData; -import com.adyen.model.terminal.SaleToIssuerData; -import com.adyen.model.terminal.TokenRequestedType; -import com.adyen.model.terminal.TransactionIDType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Data associated to the Sale System, with a particular value during the processing of the payment by the POI, including the cards acquisition. Data related to the Sale System. - */ -@ApiModel(description = "Data associated to the Sale System, with a particular value during the processing of the payment by the POI, including the cards acquisition. Data related to the Sale System.") -@JsonPropertyOrder({ - SaleData.JSON_PROPERTY_OPERATOR_I_D, - SaleData.JSON_PROPERTY_OPERATOR_LANGUAGE, - SaleData.JSON_PROPERTY_SHIFT_NUMBER, - SaleData.JSON_PROPERTY_SALE_TRANSACTION_I_D, - SaleData.JSON_PROPERTY_SALE_REFERENCE_I_D, - SaleData.JSON_PROPERTY_SALE_TERMINAL_DATA, - SaleData.JSON_PROPERTY_TOKEN_REQUESTED_TYPE, - SaleData.JSON_PROPERTY_CUSTOMER_ORDER_I_D, - SaleData.JSON_PROPERTY_CUSTOMER_ORDER_REQ, - SaleData.JSON_PROPERTY_SALE_TO_P_O_I_DATA, - SaleData.JSON_PROPERTY_SALE_TO_ACQUIRER_DATA, - SaleData.JSON_PROPERTY_SALE_TO_ISSUER_DATA -}) - -public class SaleData { - public static final String JSON_PROPERTY_OPERATOR_I_D = "OperatorID"; - private String operatorID; - - public static final String JSON_PROPERTY_OPERATOR_LANGUAGE = "OperatorLanguage"; - private String operatorLanguage; - - public static final String JSON_PROPERTY_SHIFT_NUMBER = "ShiftNumber"; - private String shiftNumber; - - public static final String JSON_PROPERTY_SALE_TRANSACTION_I_D = "SaleTransactionID"; - private TransactionIDType saleTransactionID; - - public static final String JSON_PROPERTY_SALE_REFERENCE_I_D = "SaleReferenceID"; - private String saleReferenceID; - - public static final String JSON_PROPERTY_SALE_TERMINAL_DATA = "SaleTerminalData"; - private SaleTerminalData saleTerminalData; - - public static final String JSON_PROPERTY_TOKEN_REQUESTED_TYPE = "TokenRequestedType"; - private TokenRequestedType tokenRequestedType; - - public static final String JSON_PROPERTY_CUSTOMER_ORDER_I_D = "CustomerOrderID"; - private String customerOrderID; - - /** - * Gets or Sets customerOrderReq - */ - public enum CustomerOrderReqEnum { - BOTH("Both"), - - CLOSED("Closed"), - - OPEN("Open"); - - private String value; - - CustomerOrderReqEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static CustomerOrderReqEnum fromValue(String value) { - for (CustomerOrderReqEnum b : CustomerOrderReqEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_CUSTOMER_ORDER_REQ = "CustomerOrderReq"; - private List customerOrderReq = null; - - public static final String JSON_PROPERTY_SALE_TO_P_O_I_DATA = "SaleToPOIData"; - private String saleToPOIData; - - public static final String JSON_PROPERTY_SALE_TO_ACQUIRER_DATA = "SaleToAcquirerData"; - private String saleToAcquirerData; - - public static final String JSON_PROPERTY_SALE_TO_ISSUER_DATA = "SaleToIssuerData"; - private SaleToIssuerData saleToIssuerData; - - public SaleData() { - } - - public SaleData operatorID(String operatorID) { - this.operatorID = operatorID; - return this; - } - - /** - * Get operatorID - * @return operatorID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_OPERATOR_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getOperatorID() { - return operatorID; - } - - - /** - * operatorID - * - * @param operatorID - */ - @JsonProperty(JSON_PROPERTY_OPERATOR_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOperatorID(String operatorID) { - this.operatorID = operatorID; - } - - - public SaleData operatorLanguage(String operatorLanguage) { - this.operatorLanguage = operatorLanguage; - return this; - } - - /** - * if different from the Login. - * @return operatorLanguage - **/ - @ApiModelProperty(value = "if different from the Login.") - @JsonProperty(JSON_PROPERTY_OPERATOR_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getOperatorLanguage() { - return operatorLanguage; - } - - - /** - * if different from the Login. - * - * @param operatorLanguage - */ - @JsonProperty(JSON_PROPERTY_OPERATOR_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOperatorLanguage(String operatorLanguage) { - this.operatorLanguage = operatorLanguage; - } - - - public SaleData shiftNumber(String shiftNumber) { - this.shiftNumber = shiftNumber; - return this; - } - - /** - * if different from the Login and see Login .SaleData. - * @return shiftNumber - **/ - @ApiModelProperty(value = "if different from the Login and see Login .SaleData.") - @JsonProperty(JSON_PROPERTY_SHIFT_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getShiftNumber() { - return shiftNumber; - } - - - /** - * if different from the Login and see Login .SaleData. - * - * @param shiftNumber - */ - @JsonProperty(JSON_PROPERTY_SHIFT_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShiftNumber(String shiftNumber) { - this.shiftNumber = shiftNumber; - } - - - public SaleData saleTransactionID(TransactionIDType saleTransactionID) { - this.saleTransactionID = saleTransactionID; - return this; - } - - /** - * Get saleTransactionID - * @return saleTransactionID - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_SALE_TRANSACTION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransactionIDType getSaleTransactionID() { - return saleTransactionID; - } - - - /** - * saleTransactionID - * - * @param saleTransactionID - */ - @JsonProperty(JSON_PROPERTY_SALE_TRANSACTION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleTransactionID(TransactionIDType saleTransactionID) { - this.saleTransactionID = saleTransactionID; - } - - - public SaleData saleReferenceID(String saleReferenceID) { - this.saleReferenceID = saleReferenceID; - return this; - } - - /** - * If payment reservation. - * @return saleReferenceID - **/ - @ApiModelProperty(value = "If payment reservation.") - @JsonProperty(JSON_PROPERTY_SALE_REFERENCE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSaleReferenceID() { - return saleReferenceID; - } - - - /** - * If payment reservation. - * - * @param saleReferenceID - */ - @JsonProperty(JSON_PROPERTY_SALE_REFERENCE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleReferenceID(String saleReferenceID) { - this.saleReferenceID = saleReferenceID; - } - - - public SaleData saleTerminalData(SaleTerminalData saleTerminalData) { - this.saleTerminalData = saleTerminalData; - return this; - } - - /** - * Get saleTerminalData - * @return saleTerminalData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SALE_TERMINAL_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SaleTerminalData getSaleTerminalData() { - return saleTerminalData; - } - - - /** - * saleTerminalData - * - * @param saleTerminalData - */ - @JsonProperty(JSON_PROPERTY_SALE_TERMINAL_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleTerminalData(SaleTerminalData saleTerminalData) { - this.saleTerminalData = saleTerminalData; - } - - - public SaleData tokenRequestedType(TokenRequestedType tokenRequestedType) { - this.tokenRequestedType = tokenRequestedType; - return this; - } - - /** - * Get tokenRequestedType - * @return tokenRequestedType - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TOKEN_REQUESTED_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TokenRequestedType getTokenRequestedType() { - return tokenRequestedType; - } - - - /** - * tokenRequestedType - * - * @param tokenRequestedType - */ - @JsonProperty(JSON_PROPERTY_TOKEN_REQUESTED_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTokenRequestedType(TokenRequestedType tokenRequestedType) { - this.tokenRequestedType = tokenRequestedType; - } - - - public SaleData customerOrderID(String customerOrderID) { - this.customerOrderID = customerOrderID; - return this; - } - - /** - * Additional and optional identification of a customer order. - * @return customerOrderID - **/ - @ApiModelProperty(value = "Additional and optional identification of a customer order.") - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCustomerOrderID() { - return customerOrderID; - } - - - /** - * Additional and optional identification of a customer order. - * - * @param customerOrderID - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerOrderID(String customerOrderID) { - this.customerOrderID = customerOrderID; - } - - - public SaleData customerOrderReq(List customerOrderReq) { - this.customerOrderReq = customerOrderReq; - return this; - } - - public SaleData addCustomerOrderReqItem(CustomerOrderReqEnum customerOrderReqItem) { - if (this.customerOrderReq == null) { - this.customerOrderReq = new ArrayList<>(); - } - this.customerOrderReq.add(customerOrderReqItem); - return this; - } - - /** - * Get customerOrderReq - * @return customerOrderReq - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER_REQ) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getCustomerOrderReq() { - return customerOrderReq; - } - - - /** - * customerOrderReq - * - * @param customerOrderReq - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_ORDER_REQ) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerOrderReq(List customerOrderReq) { - this.customerOrderReq = customerOrderReq; - } - - - public SaleData saleToPOIData(String saleToPOIData) { - this.saleToPOIData = saleToPOIData; - return this; - } - - /** - * Stored with the transaction. - * @return saleToPOIData - **/ - @ApiModelProperty(value = "Stored with the transaction.") - @JsonProperty(JSON_PROPERTY_SALE_TO_P_O_I_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSaleToPOIData() { - return saleToPOIData; - } - - - /** - * Stored with the transaction. - * - * @param saleToPOIData - */ - @JsonProperty(JSON_PROPERTY_SALE_TO_P_O_I_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleToPOIData(String saleToPOIData) { - this.saleToPOIData = saleToPOIData; - } - - - public SaleData saleToAcquirerData(String saleToAcquirerData) { - this.saleToAcquirerData = saleToAcquirerData; - return this; - } - - /** - * Send to the Acquirer if present. - * @return saleToAcquirerData - **/ - @ApiModelProperty(value = "Send to the Acquirer if present.") - @JsonProperty(JSON_PROPERTY_SALE_TO_ACQUIRER_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSaleToAcquirerData() { - return saleToAcquirerData; - } - - - /** - * Send to the Acquirer if present. - * - * @param saleToAcquirerData - */ - @JsonProperty(JSON_PROPERTY_SALE_TO_ACQUIRER_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleToAcquirerData(String saleToAcquirerData) { - this.saleToAcquirerData = saleToAcquirerData; - } - - - public SaleData saleToIssuerData(SaleToIssuerData saleToIssuerData) { - this.saleToIssuerData = saleToIssuerData; - return this; - } - - /** - * Get saleToIssuerData - * @return saleToIssuerData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SALE_TO_ISSUER_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SaleToIssuerData getSaleToIssuerData() { - return saleToIssuerData; - } - - - /** - * saleToIssuerData - * - * @param saleToIssuerData - */ - @JsonProperty(JSON_PROPERTY_SALE_TO_ISSUER_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleToIssuerData(SaleToIssuerData saleToIssuerData) { - this.saleToIssuerData = saleToIssuerData; - } - - - /** - * Return true if this SaleData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SaleData saleData = (SaleData) o; - return Objects.equals(this.operatorID, saleData.operatorID) && - Objects.equals(this.operatorLanguage, saleData.operatorLanguage) && - Objects.equals(this.shiftNumber, saleData.shiftNumber) && - Objects.equals(this.saleTransactionID, saleData.saleTransactionID) && - Objects.equals(this.saleReferenceID, saleData.saleReferenceID) && - Objects.equals(this.saleTerminalData, saleData.saleTerminalData) && - Objects.equals(this.tokenRequestedType, saleData.tokenRequestedType) && - Objects.equals(this.customerOrderID, saleData.customerOrderID) && - Objects.equals(this.customerOrderReq, saleData.customerOrderReq) && - Objects.equals(this.saleToPOIData, saleData.saleToPOIData) && - Objects.equals(this.saleToAcquirerData, saleData.saleToAcquirerData) && - Objects.equals(this.saleToIssuerData, saleData.saleToIssuerData); - } - - @Override - public int hashCode() { - return Objects.hash(operatorID, operatorLanguage, shiftNumber, saleTransactionID, saleReferenceID, saleTerminalData, tokenRequestedType, customerOrderID, customerOrderReq, saleToPOIData, saleToAcquirerData, saleToIssuerData); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SaleData {\n"); - sb.append(" operatorID: ").append(toIndentedString(operatorID)).append("\n"); - sb.append(" operatorLanguage: ").append(toIndentedString(operatorLanguage)).append("\n"); - sb.append(" shiftNumber: ").append(toIndentedString(shiftNumber)).append("\n"); - sb.append(" saleTransactionID: ").append(toIndentedString(saleTransactionID)).append("\n"); - sb.append(" saleReferenceID: ").append(toIndentedString(saleReferenceID)).append("\n"); - sb.append(" saleTerminalData: ").append(toIndentedString(saleTerminalData)).append("\n"); - sb.append(" tokenRequestedType: ").append(toIndentedString(tokenRequestedType)).append("\n"); - sb.append(" customerOrderID: ").append(toIndentedString(customerOrderID)).append("\n"); - sb.append(" customerOrderReq: ").append(toIndentedString(customerOrderReq)).append("\n"); - sb.append(" saleToPOIData: ").append(toIndentedString(saleToPOIData)).append("\n"); - sb.append(" saleToAcquirerData: ").append(toIndentedString(saleToAcquirerData)).append("\n"); - sb.append(" saleToIssuerData: ").append(toIndentedString(saleToIssuerData)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of SaleData given an JSON string - * - * @param jsonString JSON string - * @return An instance of SaleData - * @throws JsonProcessingException if the JSON string is invalid with respect to SaleData - */ - public static SaleData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, SaleData.class); - } -/** - * Convert an instance of SaleData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/SaleItem.java b/src/main/java/com/adyen/model/terminal/SaleItem.java deleted file mode 100644 index b18123eb2..000000000 --- a/src/main/java/com/adyen/model/terminal/SaleItem.java +++ /dev/null @@ -1,502 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.UnitOfMeasure; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * In loyalty or value added payment card transaction, the items of the sale are entering in the processing of the transaction. Sale items of a transaction. - */ -@ApiModel(description = "In loyalty or value added payment card transaction, the items of the sale are entering in the processing of the transaction. Sale items of a transaction.") -@JsonPropertyOrder({ - SaleItem.JSON_PROPERTY_ITEM_I_D, - SaleItem.JSON_PROPERTY_PRODUCT_CODE, - SaleItem.JSON_PROPERTY_EAN_UPC, - SaleItem.JSON_PROPERTY_UNIT_OF_MEASURE, - SaleItem.JSON_PROPERTY_QUANTITY, - SaleItem.JSON_PROPERTY_UNIT_PRICE, - SaleItem.JSON_PROPERTY_ITEM_AMOUNT, - SaleItem.JSON_PROPERTY_TAX_CODE, - SaleItem.JSON_PROPERTY_SALE_CHANNEL, - SaleItem.JSON_PROPERTY_PRODUCT_LABEL, - SaleItem.JSON_PROPERTY_ADDITIONAL_PRODUCT_INFO -}) - -public class SaleItem { - public static final String JSON_PROPERTY_ITEM_I_D = "ItemID"; - private Integer itemID; - - public static final String JSON_PROPERTY_PRODUCT_CODE = "ProductCode"; - private Integer productCode; - - public static final String JSON_PROPERTY_EAN_UPC = "EanUpc"; - private Integer eanUpc; - - public static final String JSON_PROPERTY_UNIT_OF_MEASURE = "UnitOfMeasure"; - private UnitOfMeasure unitOfMeasure; - - public static final String JSON_PROPERTY_QUANTITY = "Quantity"; - private String quantity; - - public static final String JSON_PROPERTY_UNIT_PRICE = "UnitPrice"; - private BigDecimal unitPrice; - - public static final String JSON_PROPERTY_ITEM_AMOUNT = "ItemAmount"; - private BigDecimal itemAmount; - - public static final String JSON_PROPERTY_TAX_CODE = "TaxCode"; - private Integer taxCode; - - public static final String JSON_PROPERTY_SALE_CHANNEL = "SaleChannel"; - private Integer saleChannel; - - public static final String JSON_PROPERTY_PRODUCT_LABEL = "ProductLabel"; - private String productLabel; - - public static final String JSON_PROPERTY_ADDITIONAL_PRODUCT_INFO = "AdditionalProductInfo"; - private String additionalProductInfo; - - public SaleItem() { - } - - public SaleItem itemID(Integer itemID) { - this.itemID = itemID; - return this; - } - - /** - * Item identification inside a transaction (0 to n). - * @return itemID - **/ - @ApiModelProperty(required = true, value = "Item identification inside a transaction (0 to n).") - @JsonProperty(JSON_PROPERTY_ITEM_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getItemID() { - return itemID; - } - - - /** - * Item identification inside a transaction (0 to n). - * - * @param itemID - */ - @JsonProperty(JSON_PROPERTY_ITEM_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setItemID(Integer itemID) { - this.itemID = itemID; - } - - - public SaleItem productCode(Integer productCode) { - this.productCode = productCode; - return this; - } - - /** - * Product code of item purchased with the transaction. - * minimum: 1 - * maximum: 20 - * @return productCode - **/ - @ApiModelProperty(required = true, value = "Product code of item purchased with the transaction.") - @JsonProperty(JSON_PROPERTY_PRODUCT_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getProductCode() { - return productCode; - } - - - /** - * Product code of item purchased with the transaction. - * - * @param productCode - */ - @JsonProperty(JSON_PROPERTY_PRODUCT_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProductCode(Integer productCode) { - this.productCode = productCode; - } - - - public SaleItem eanUpc(Integer eanUpc) { - this.eanUpc = eanUpc; - return this; - } - - /** - * If data sent, POI has to store it and send it if the host protocol allows it. - * @return eanUpc - **/ - @ApiModelProperty(value = "If data sent, POI has to store it and send it if the host protocol allows it.") - @JsonProperty(JSON_PROPERTY_EAN_UPC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getEanUpc() { - return eanUpc; - } - - - /** - * If data sent, POI has to store it and send it if the host protocol allows it. - * - * @param eanUpc - */ - @JsonProperty(JSON_PROPERTY_EAN_UPC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEanUpc(Integer eanUpc) { - this.eanUpc = eanUpc; - } - - - public SaleItem unitOfMeasure(UnitOfMeasure unitOfMeasure) { - this.unitOfMeasure = unitOfMeasure; - return this; - } - - /** - * Get unitOfMeasure - * @return unitOfMeasure - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_UNIT_OF_MEASURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public UnitOfMeasure getUnitOfMeasure() { - return unitOfMeasure; - } - - - /** - * unitOfMeasure - * - * @param unitOfMeasure - */ - @JsonProperty(JSON_PROPERTY_UNIT_OF_MEASURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUnitOfMeasure(UnitOfMeasure unitOfMeasure) { - this.unitOfMeasure = unitOfMeasure; - } - - - public SaleItem quantity(String quantity) { - this.quantity = quantity; - return this; - } - - /** - * If data sent, POI has to store it and send it if the host protocol allows it. - * @return quantity - **/ - @ApiModelProperty(value = "If data sent, POI has to store it and send it if the host protocol allows it.") - @JsonProperty(JSON_PROPERTY_QUANTITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getQuantity() { - return quantity; - } - - - /** - * If data sent, POI has to store it and send it if the host protocol allows it. - * - * @param quantity - */ - @JsonProperty(JSON_PROPERTY_QUANTITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setQuantity(String quantity) { - this.quantity = quantity; - } - - - public SaleItem unitPrice(BigDecimal unitPrice) { - this.unitPrice = unitPrice; - return this; - } - - /** - * if Quantity present. - * minimum: 0.0 - * maximum: 99999999.999999 - * @return unitPrice - **/ - @ApiModelProperty(value = "if Quantity present.") - @JsonProperty(JSON_PROPERTY_UNIT_PRICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getUnitPrice() { - return unitPrice; - } - - - /** - * if Quantity present. - * - * @param unitPrice - */ - @JsonProperty(JSON_PROPERTY_UNIT_PRICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUnitPrice(BigDecimal unitPrice) { - this.unitPrice = unitPrice; - } - - - public SaleItem itemAmount(BigDecimal itemAmount) { - this.itemAmount = itemAmount; - return this; - } - - /** - * Total amount of the item line. - * minimum: 0.0 - * maximum: 99999999.999999 - * @return itemAmount - **/ - @ApiModelProperty(required = true, value = "Total amount of the item line.") - @JsonProperty(JSON_PROPERTY_ITEM_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getItemAmount() { - return itemAmount; - } - - - /** - * Total amount of the item line. - * - * @param itemAmount - */ - @JsonProperty(JSON_PROPERTY_ITEM_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setItemAmount(BigDecimal itemAmount) { - this.itemAmount = itemAmount; - } - - - public SaleItem taxCode(Integer taxCode) { - this.taxCode = taxCode; - return this; - } - - /** - * If data sent, POI has to store it and send it if the host protocol allows it. - * @return taxCode - **/ - @ApiModelProperty(value = "If data sent, POI has to store it and send it if the host protocol allows it.") - @JsonProperty(JSON_PROPERTY_TAX_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getTaxCode() { - return taxCode; - } - - - /** - * If data sent, POI has to store it and send it if the host protocol allows it. - * - * @param taxCode - */ - @JsonProperty(JSON_PROPERTY_TAX_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTaxCode(Integer taxCode) { - this.taxCode = taxCode; - } - - - public SaleItem saleChannel(Integer saleChannel) { - this.saleChannel = saleChannel; - return this; - } - - /** - * If data sent, POI has to store it and send it if the host protocol allows it. - * @return saleChannel - **/ - @ApiModelProperty(value = "If data sent, POI has to store it and send it if the host protocol allows it.") - @JsonProperty(JSON_PROPERTY_SALE_CHANNEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getSaleChannel() { - return saleChannel; - } - - - /** - * If data sent, POI has to store it and send it if the host protocol allows it. - * - * @param saleChannel - */ - @JsonProperty(JSON_PROPERTY_SALE_CHANNEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleChannel(Integer saleChannel) { - this.saleChannel = saleChannel; - } - - - public SaleItem productLabel(String productLabel) { - this.productLabel = productLabel; - return this; - } - - /** - * Get productLabel - * @return productLabel - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PRODUCT_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getProductLabel() { - return productLabel; - } - - - /** - * productLabel - * - * @param productLabel - */ - @JsonProperty(JSON_PROPERTY_PRODUCT_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProductLabel(String productLabel) { - this.productLabel = productLabel; - } - - - public SaleItem additionalProductInfo(String additionalProductInfo) { - this.additionalProductInfo = additionalProductInfo; - return this; - } - - /** - * If data sent, POI has to store it and send it if the host protocol allows it. - * @return additionalProductInfo - **/ - @ApiModelProperty(value = "If data sent, POI has to store it and send it if the host protocol allows it.") - @JsonProperty(JSON_PROPERTY_ADDITIONAL_PRODUCT_INFO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getAdditionalProductInfo() { - return additionalProductInfo; - } - - - /** - * If data sent, POI has to store it and send it if the host protocol allows it. - * - * @param additionalProductInfo - */ - @JsonProperty(JSON_PROPERTY_ADDITIONAL_PRODUCT_INFO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAdditionalProductInfo(String additionalProductInfo) { - this.additionalProductInfo = additionalProductInfo; - } - - - /** - * Return true if this SaleItem object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SaleItem saleItem = (SaleItem) o; - return Objects.equals(this.itemID, saleItem.itemID) && - Objects.equals(this.productCode, saleItem.productCode) && - Objects.equals(this.eanUpc, saleItem.eanUpc) && - Objects.equals(this.unitOfMeasure, saleItem.unitOfMeasure) && - Objects.equals(this.quantity, saleItem.quantity) && - Objects.equals(this.unitPrice, saleItem.unitPrice) && - Objects.equals(this.itemAmount, saleItem.itemAmount) && - Objects.equals(this.taxCode, saleItem.taxCode) && - Objects.equals(this.saleChannel, saleItem.saleChannel) && - Objects.equals(this.productLabel, saleItem.productLabel) && - Objects.equals(this.additionalProductInfo, saleItem.additionalProductInfo); - } - - @Override - public int hashCode() { - return Objects.hash(itemID, productCode, eanUpc, unitOfMeasure, quantity, unitPrice, itemAmount, taxCode, saleChannel, productLabel, additionalProductInfo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SaleItem {\n"); - sb.append(" itemID: ").append(toIndentedString(itemID)).append("\n"); - sb.append(" productCode: ").append(toIndentedString(productCode)).append("\n"); - sb.append(" eanUpc: ").append(toIndentedString(eanUpc)).append("\n"); - sb.append(" unitOfMeasure: ").append(toIndentedString(unitOfMeasure)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n"); - sb.append(" itemAmount: ").append(toIndentedString(itemAmount)).append("\n"); - sb.append(" taxCode: ").append(toIndentedString(taxCode)).append("\n"); - sb.append(" saleChannel: ").append(toIndentedString(saleChannel)).append("\n"); - sb.append(" productLabel: ").append(toIndentedString(productLabel)).append("\n"); - sb.append(" additionalProductInfo: ").append(toIndentedString(additionalProductInfo)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of SaleItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of SaleItem - * @throws JsonProcessingException if the JSON string is invalid with respect to SaleItem - */ - public static SaleItem fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, SaleItem.class); - } -/** - * Convert an instance of SaleItem to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/SaleItemRebate.java b/src/main/java/com/adyen/model/terminal/SaleItemRebate.java deleted file mode 100644 index 758120dbb..000000000 --- a/src/main/java/com/adyen/model/terminal/SaleItemRebate.java +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.UnitOfMeasure; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * To be differentiated from the award which is the amount or quantity earned on the loyalty account. The awarded amount that is attached to an item as a rebate. - */ -@ApiModel(description = "To be differentiated from the award which is the amount or quantity earned on the loyalty account. The awarded amount that is attached to an item as a rebate.") -@JsonPropertyOrder({ - SaleItemRebate.JSON_PROPERTY_ITEM_I_D, - SaleItemRebate.JSON_PROPERTY_PRODUCT_CODE, - SaleItemRebate.JSON_PROPERTY_EAN_UPC, - SaleItemRebate.JSON_PROPERTY_UNIT_OF_MEASURE, - SaleItemRebate.JSON_PROPERTY_QUANTITY, - SaleItemRebate.JSON_PROPERTY_ITEM_AMOUNT, - SaleItemRebate.JSON_PROPERTY_REBATE_LABEL -}) - -public class SaleItemRebate { - public static final String JSON_PROPERTY_ITEM_I_D = "ItemID"; - private Integer itemID; - - public static final String JSON_PROPERTY_PRODUCT_CODE = "ProductCode"; - private Integer productCode; - - public static final String JSON_PROPERTY_EAN_UPC = "EanUpc"; - private Integer eanUpc; - - public static final String JSON_PROPERTY_UNIT_OF_MEASURE = "UnitOfMeasure"; - private UnitOfMeasure unitOfMeasure; - - public static final String JSON_PROPERTY_QUANTITY = "Quantity"; - private String quantity; - - public static final String JSON_PROPERTY_ITEM_AMOUNT = "ItemAmount"; - private BigDecimal itemAmount; - - public static final String JSON_PROPERTY_REBATE_LABEL = "RebateLabel"; - private String rebateLabel; - - public SaleItemRebate() { - } - - public SaleItemRebate itemID(Integer itemID) { - this.itemID = itemID; - return this; - } - - /** - * Item identification inside a transaction (0 to n). - * @return itemID - **/ - @ApiModelProperty(required = true, value = "Item identification inside a transaction (0 to n).") - @JsonProperty(JSON_PROPERTY_ITEM_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getItemID() { - return itemID; - } - - - /** - * Item identification inside a transaction (0 to n). - * - * @param itemID - */ - @JsonProperty(JSON_PROPERTY_ITEM_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setItemID(Integer itemID) { - this.itemID = itemID; - } - - - public SaleItemRebate productCode(Integer productCode) { - this.productCode = productCode; - return this; - } - - /** - * Product code of item purchased with the transaction. - * minimum: 1 - * maximum: 20 - * @return productCode - **/ - @ApiModelProperty(required = true, value = "Product code of item purchased with the transaction.") - @JsonProperty(JSON_PROPERTY_PRODUCT_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getProductCode() { - return productCode; - } - - - /** - * Product code of item purchased with the transaction. - * - * @param productCode - */ - @JsonProperty(JSON_PROPERTY_PRODUCT_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProductCode(Integer productCode) { - this.productCode = productCode; - } - - - public SaleItemRebate eanUpc(Integer eanUpc) { - this.eanUpc = eanUpc; - return this; - } - - /** - * Get eanUpc - * @return eanUpc - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_EAN_UPC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getEanUpc() { - return eanUpc; - } - - - /** - * eanUpc - * - * @param eanUpc - */ - @JsonProperty(JSON_PROPERTY_EAN_UPC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEanUpc(Integer eanUpc) { - this.eanUpc = eanUpc; - } - - - public SaleItemRebate unitOfMeasure(UnitOfMeasure unitOfMeasure) { - this.unitOfMeasure = unitOfMeasure; - return this; - } - - /** - * Get unitOfMeasure - * @return unitOfMeasure - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_UNIT_OF_MEASURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public UnitOfMeasure getUnitOfMeasure() { - return unitOfMeasure; - } - - - /** - * unitOfMeasure - * - * @param unitOfMeasure - */ - @JsonProperty(JSON_PROPERTY_UNIT_OF_MEASURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUnitOfMeasure(UnitOfMeasure unitOfMeasure) { - this.unitOfMeasure = unitOfMeasure; - } - - - public SaleItemRebate quantity(String quantity) { - this.quantity = quantity; - return this; - } - - /** - * if rebate is additional units. - * @return quantity - **/ - @ApiModelProperty(value = "if rebate is additional units.") - @JsonProperty(JSON_PROPERTY_QUANTITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getQuantity() { - return quantity; - } - - - /** - * if rebate is additional units. - * - * @param quantity - */ - @JsonProperty(JSON_PROPERTY_QUANTITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setQuantity(String quantity) { - this.quantity = quantity; - } - - - public SaleItemRebate itemAmount(BigDecimal itemAmount) { - this.itemAmount = itemAmount; - return this; - } - - /** - * if rebate on the line item amount. - * minimum: 0.0 - * maximum: 99999999.999999 - * @return itemAmount - **/ - @ApiModelProperty(value = "if rebate on the line item amount.") - @JsonProperty(JSON_PROPERTY_ITEM_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getItemAmount() { - return itemAmount; - } - - - /** - * if rebate on the line item amount. - * - * @param itemAmount - */ - @JsonProperty(JSON_PROPERTY_ITEM_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setItemAmount(BigDecimal itemAmount) { - this.itemAmount = itemAmount; - } - - - public SaleItemRebate rebateLabel(String rebateLabel) { - this.rebateLabel = rebateLabel; - return this; - } - - /** - * If provided by the Acquirer. - * @return rebateLabel - **/ - @ApiModelProperty(value = "If provided by the Acquirer.") - @JsonProperty(JSON_PROPERTY_REBATE_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getRebateLabel() { - return rebateLabel; - } - - - /** - * If provided by the Acquirer. - * - * @param rebateLabel - */ - @JsonProperty(JSON_PROPERTY_REBATE_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRebateLabel(String rebateLabel) { - this.rebateLabel = rebateLabel; - } - - - /** - * Return true if this SaleItemRebate object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SaleItemRebate saleItemRebate = (SaleItemRebate) o; - return Objects.equals(this.itemID, saleItemRebate.itemID) && - Objects.equals(this.productCode, saleItemRebate.productCode) && - Objects.equals(this.eanUpc, saleItemRebate.eanUpc) && - Objects.equals(this.unitOfMeasure, saleItemRebate.unitOfMeasure) && - Objects.equals(this.quantity, saleItemRebate.quantity) && - Objects.equals(this.itemAmount, saleItemRebate.itemAmount) && - Objects.equals(this.rebateLabel, saleItemRebate.rebateLabel); - } - - @Override - public int hashCode() { - return Objects.hash(itemID, productCode, eanUpc, unitOfMeasure, quantity, itemAmount, rebateLabel); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SaleItemRebate {\n"); - sb.append(" itemID: ").append(toIndentedString(itemID)).append("\n"); - sb.append(" productCode: ").append(toIndentedString(productCode)).append("\n"); - sb.append(" eanUpc: ").append(toIndentedString(eanUpc)).append("\n"); - sb.append(" unitOfMeasure: ").append(toIndentedString(unitOfMeasure)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" itemAmount: ").append(toIndentedString(itemAmount)).append("\n"); - sb.append(" rebateLabel: ").append(toIndentedString(rebateLabel)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of SaleItemRebate given an JSON string - * - * @param jsonString JSON string - * @return An instance of SaleItemRebate - * @throws JsonProcessingException if the JSON string is invalid with respect to SaleItemRebate - */ - public static SaleItemRebate fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, SaleItemRebate.class); - } -/** - * Convert an instance of SaleItemRebate to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/SaleSoftware.java b/src/main/java/com/adyen/model/terminal/SaleSoftware.java deleted file mode 100644 index d000beca5..000000000 --- a/src/main/java/com/adyen/model/terminal/SaleSoftware.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Information related to the software of the Sale System which manages the NEXO Sale to POI protocol. - */ -@ApiModel(description = "Information related to the software of the Sale System which manages the NEXO Sale to POI protocol.") -@JsonPropertyOrder({ - SaleSoftware.JSON_PROPERTY_MANUFACTURER_I_D, - SaleSoftware.JSON_PROPERTY_APPLICATION_NAME, - SaleSoftware.JSON_PROPERTY_SOFTWARE_VERSION, - SaleSoftware.JSON_PROPERTY_CERTIFICATION_CODE -}) - -public class SaleSoftware { - public static final String JSON_PROPERTY_MANUFACTURER_I_D = "ManufacturerID"; - private String manufacturerID; - - public static final String JSON_PROPERTY_APPLICATION_NAME = "ApplicationName"; - private String applicationName; - - public static final String JSON_PROPERTY_SOFTWARE_VERSION = "SoftwareVersion"; - private String softwareVersion; - - public static final String JSON_PROPERTY_CERTIFICATION_CODE = "CertificationCode"; - private String certificationCode; - - public SaleSoftware() { - } - - public SaleSoftware manufacturerID(String manufacturerID) { - this.manufacturerID = manufacturerID; - return this; - } - - /** - * Get manufacturerID - * @return manufacturerID - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_MANUFACTURER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getManufacturerID() { - return manufacturerID; - } - - - /** - * manufacturerID - * - * @param manufacturerID - */ - @JsonProperty(JSON_PROPERTY_MANUFACTURER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setManufacturerID(String manufacturerID) { - this.manufacturerID = manufacturerID; - } - - - public SaleSoftware applicationName(String applicationName) { - this.applicationName = applicationName; - return this; - } - - /** - * Get applicationName - * @return applicationName - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_APPLICATION_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getApplicationName() { - return applicationName; - } - - - /** - * applicationName - * - * @param applicationName - */ - @JsonProperty(JSON_PROPERTY_APPLICATION_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApplicationName(String applicationName) { - this.applicationName = applicationName; - } - - - public SaleSoftware softwareVersion(String softwareVersion) { - this.softwareVersion = softwareVersion; - return this; - } - - /** - * Get softwareVersion - * @return softwareVersion - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_SOFTWARE_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSoftwareVersion() { - return softwareVersion; - } - - - /** - * softwareVersion - * - * @param softwareVersion - */ - @JsonProperty(JSON_PROPERTY_SOFTWARE_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSoftwareVersion(String softwareVersion) { - this.softwareVersion = softwareVersion; - } - - - public SaleSoftware certificationCode(String certificationCode) { - this.certificationCode = certificationCode; - return this; - } - - /** - * Get certificationCode - * @return certificationCode - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_CERTIFICATION_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCertificationCode() { - return certificationCode; - } - - - /** - * certificationCode - * - * @param certificationCode - */ - @JsonProperty(JSON_PROPERTY_CERTIFICATION_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCertificationCode(String certificationCode) { - this.certificationCode = certificationCode; - } - - - /** - * Return true if this SaleSoftware object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SaleSoftware saleSoftware = (SaleSoftware) o; - return Objects.equals(this.manufacturerID, saleSoftware.manufacturerID) && - Objects.equals(this.applicationName, saleSoftware.applicationName) && - Objects.equals(this.softwareVersion, saleSoftware.softwareVersion) && - Objects.equals(this.certificationCode, saleSoftware.certificationCode); - } - - @Override - public int hashCode() { - return Objects.hash(manufacturerID, applicationName, softwareVersion, certificationCode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SaleSoftware {\n"); - sb.append(" manufacturerID: ").append(toIndentedString(manufacturerID)).append("\n"); - sb.append(" applicationName: ").append(toIndentedString(applicationName)).append("\n"); - sb.append(" softwareVersion: ").append(toIndentedString(softwareVersion)).append("\n"); - sb.append(" certificationCode: ").append(toIndentedString(certificationCode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of SaleSoftware given an JSON string - * - * @param jsonString JSON string - * @return An instance of SaleSoftware - * @throws JsonProcessingException if the JSON string is invalid with respect to SaleSoftware - */ - public static SaleSoftware fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, SaleSoftware.class); - } -/** - * Convert an instance of SaleSoftware to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/SaleTerminalData.java b/src/main/java/com/adyen/model/terminal/SaleTerminalData.java deleted file mode 100644 index 37bc4732b..000000000 --- a/src/main/java/com/adyen/model/terminal/SaleTerminalData.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * In the Login Request, if a Sale Terminal is involved in the login. In other messages, when a logical device is out of order (SaleCapabilites), or when the other data have changed since or were not in the Login. Information related to the software and hardware feature of the Sale Terminal. - */ -@ApiModel(description = "In the Login Request, if a Sale Terminal is involved in the login. In other messages, when a logical device is out of order (SaleCapabilites), or when the other data have changed since or were not in the Login. Information related to the software and hardware feature of the Sale Terminal.") -@JsonPropertyOrder({ - SaleTerminalData.JSON_PROPERTY_TOTALS_GROUP_I_D -}) - -public class SaleTerminalData { - public static final String JSON_PROPERTY_TOTALS_GROUP_I_D = "TotalsGroupID"; - private String totalsGroupID; - - public SaleTerminalData() { - } - - public SaleTerminalData totalsGroupID(String totalsGroupID) { - this.totalsGroupID = totalsGroupID; - return this; - } - - /** - * If present, default value for all transaction. - * @return totalsGroupID - **/ - @ApiModelProperty(value = "If present, default value for all transaction.") - @JsonProperty(JSON_PROPERTY_TOTALS_GROUP_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getTotalsGroupID() { - return totalsGroupID; - } - - - /** - * If present, default value for all transaction. - * - * @param totalsGroupID - */ - @JsonProperty(JSON_PROPERTY_TOTALS_GROUP_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotalsGroupID(String totalsGroupID) { - this.totalsGroupID = totalsGroupID; - } - - - /** - * Return true if this SaleTerminalData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SaleTerminalData saleTerminalData = (SaleTerminalData) o; - return Objects.equals(this.totalsGroupID, saleTerminalData.totalsGroupID); - } - - @Override - public int hashCode() { - return Objects.hash(totalsGroupID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SaleTerminalData {\n"); - sb.append(" totalsGroupID: ").append(toIndentedString(totalsGroupID)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of SaleTerminalData given an JSON string - * - * @param jsonString JSON string - * @return An instance of SaleTerminalData - * @throws JsonProcessingException if the JSON string is invalid with respect to SaleTerminalData - */ - public static SaleTerminalData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, SaleTerminalData.class); - } -/** - * Convert an instance of SaleTerminalData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/terminal/SaleToAcquirerData.java b/src/main/java/com/adyen/model/terminal/SaleToAcquirerData.java similarity index 89% rename from src/main/java/com/adyen/terminal/SaleToAcquirerData.java rename to src/main/java/com/adyen/model/terminal/SaleToAcquirerData.java index 9a9d40875..9d4c8c047 100644 --- a/src/main/java/com/adyen/terminal/SaleToAcquirerData.java +++ b/src/main/java/com/adyen/model/terminal/SaleToAcquirerData.java @@ -18,7 +18,7 @@ * This file is open source and available under the MIT license. * See the LICENSE file for more info. */ -package com.adyen.terminal; +package com.adyen.model.terminal; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -29,8 +29,8 @@ import java.util.Base64; import com.adyen.model.applicationinfo.ApplicationInfo; -import com.adyen.model.terminal.JSON; -import com.fasterxml.jackson.core.JsonProcessingException; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.annotations.SerializedName; public class SaleToAcquirerData { @@ -52,6 +52,7 @@ public class SaleToAcquirerData { private String ssc; private RecurringProcessingModelEnum recurringProcessingModel; private String redemptionType; + private static final Gson PRETTY_PRINT_GSON = new GsonBuilder().setPrettyPrinting().create(); public SaleToAcquirerData() { applicationInfo = new ApplicationInfo(); @@ -168,8 +169,10 @@ public String getAuthorisationType() { public void setAuthorisationType(String authorisationType) { this.authorisationType = authorisationType; } + + /** - * Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. + * Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. */ public enum RecurringProcessingModelEnum { @SerializedName("Subscription") SUBSCRIPTION("Subscription"), @@ -213,6 +216,10 @@ public void setRedemptionType(String redemptionType) { this.redemptionType = redemptionType; } + public static Gson getPrettyPrintGson() { + return PRETTY_PRINT_GSON; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -248,7 +255,7 @@ public int hashCode() { @Override public String toString() { - return "SaleToAcquirerDataModel {" + + return "SaleToAcquirerDataModel{" + "metadata=" + metadata + ", shopperEmail='" + shopperEmail + '\'' + ", shopperReference='" + shopperReference + '\'' + @@ -269,37 +276,18 @@ public String toString() { '}'; } - /** - * Create an instance of SaleToAcquirerData given an JSON string - * - * @param jsonString JSON string - * @return An instance of SaleToAcquirerData - * @throws JsonProcessingException if the JSON string is invalid with respect to SaleToAcquirerData - */ - public static SaleToAcquirerData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, SaleToAcquirerData.class); - } - - /** - * Convert an instance of SaleToAcquirerData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } - - public String toBase64() throws JsonProcessingException { - String json = this.toJson(); + public String toBase64() { + String json = PRETTY_PRINT_GSON.toJson(this); return new String(Base64.getEncoder().encode(json.getBytes())); } public static SaleToAcquirerData fromBase64(String base64) { byte[] decoded = Base64.getDecoder().decode(base64); try (Reader reader = new InputStreamReader(new ByteArrayInputStream(decoded))) { - return SaleToAcquirerData.fromJson(reader.toString()); - } catch (IOException e) { + return PRETTY_PRINT_GSON.fromJson(reader, SaleToAcquirerData.class); + } + catch (IOException e) { throw new IllegalStateException(e); } } -} \ No newline at end of file +} diff --git a/src/main/java/com/adyen/model/terminal/SaleToIssuerData.java b/src/main/java/com/adyen/model/terminal/SaleToIssuerData.java deleted file mode 100644 index cb56fc5fc..000000000 --- a/src/main/java/com/adyen/model/terminal/SaleToIssuerData.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * The POI System receives this information and sends it to the Acquirer for the Issuer without any change. Sale information intended for the Issuer. - */ -@ApiModel(description = "The POI System receives this information and sends it to the Acquirer for the Issuer without any change. Sale information intended for the Issuer.") -@JsonPropertyOrder({ - SaleToIssuerData.JSON_PROPERTY_STATEMENT_REFERENCE -}) - -public class SaleToIssuerData { - public static final String JSON_PROPERTY_STATEMENT_REFERENCE = "StatementReference"; - private String statementReference; - - public SaleToIssuerData() { - } - - public SaleToIssuerData statementReference(String statementReference) { - this.statementReference = statementReference; - return this; - } - - /** - * Information to print on the bank statement. - * @return statementReference - **/ - @ApiModelProperty(value = "Information to print on the bank statement.") - @JsonProperty(JSON_PROPERTY_STATEMENT_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getStatementReference() { - return statementReference; - } - - - /** - * Information to print on the bank statement. - * - * @param statementReference - */ - @JsonProperty(JSON_PROPERTY_STATEMENT_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatementReference(String statementReference) { - this.statementReference = statementReference; - } - - - /** - * Return true if this SaleToIssuerData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SaleToIssuerData saleToIssuerData = (SaleToIssuerData) o; - return Objects.equals(this.statementReference, saleToIssuerData.statementReference); - } - - @Override - public int hashCode() { - return Objects.hash(statementReference); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SaleToIssuerData {\n"); - sb.append(" statementReference: ").append(toIndentedString(statementReference)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of SaleToIssuerData given an JSON string - * - * @param jsonString JSON string - * @return An instance of SaleToIssuerData - * @throws JsonProcessingException if the JSON string is invalid with respect to SaleToIssuerData - */ - public static SaleToIssuerData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, SaleToIssuerData.class); - } -/** - * Convert an instance of SaleToIssuerData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/SecurityTrailer.java b/src/main/java/com/adyen/model/terminal/SecurityTrailer.java deleted file mode 100644 index 3818cfd90..000000000 --- a/src/main/java/com/adyen/model/terminal/SecurityTrailer.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It contains information related to the security of the message. SecurityTrailer as used by Adyen. - */ -@ApiModel(description = "It contains information related to the security of the message. SecurityTrailer as used by Adyen.") -@JsonPropertyOrder({ - SecurityTrailer.JSON_PROPERTY_ADYEN_CRYPTO_VERSION, - SecurityTrailer.JSON_PROPERTY_KEY_IDENTIFIER, - SecurityTrailer.JSON_PROPERTY_KEY_VERSION, - SecurityTrailer.JSON_PROPERTY_NONCE, - SecurityTrailer.JSON_PROPERTY_HMAC -}) - -public class SecurityTrailer { - public static final String JSON_PROPERTY_ADYEN_CRYPTO_VERSION = "AdyenCryptoVersion"; - private Integer adyenCryptoVersion; - - public static final String JSON_PROPERTY_KEY_IDENTIFIER = "KeyIdentifier"; - private String keyIdentifier; - - public static final String JSON_PROPERTY_KEY_VERSION = "KeyVersion"; - private Integer keyVersion; - - public static final String JSON_PROPERTY_NONCE = "Nonce"; - private byte[] nonce; - - public static final String JSON_PROPERTY_HMAC = "Hmac"; - private byte[] hmac; - - public SecurityTrailer() { - } - - public SecurityTrailer adyenCryptoVersion(Integer adyenCryptoVersion) { - this.adyenCryptoVersion = adyenCryptoVersion; - return this; - } - - /** - * Get adyenCryptoVersion - * @return adyenCryptoVersion - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_ADYEN_CRYPTO_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getAdyenCryptoVersion() { - return adyenCryptoVersion; - } - - - /** - * adyenCryptoVersion - * - * @param adyenCryptoVersion - */ - @JsonProperty(JSON_PROPERTY_ADYEN_CRYPTO_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAdyenCryptoVersion(Integer adyenCryptoVersion) { - this.adyenCryptoVersion = adyenCryptoVersion; - } - - - public SecurityTrailer keyIdentifier(String keyIdentifier) { - this.keyIdentifier = keyIdentifier; - return this; - } - - /** - * Get keyIdentifier - * @return keyIdentifier - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_KEY_IDENTIFIER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getKeyIdentifier() { - return keyIdentifier; - } - - - /** - * keyIdentifier - * - * @param keyIdentifier - */ - @JsonProperty(JSON_PROPERTY_KEY_IDENTIFIER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKeyIdentifier(String keyIdentifier) { - this.keyIdentifier = keyIdentifier; - } - - - public SecurityTrailer keyVersion(Integer keyVersion) { - this.keyVersion = keyVersion; - return this; - } - - /** - * Get keyVersion - * @return keyVersion - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_KEY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getKeyVersion() { - return keyVersion; - } - - - /** - * keyVersion - * - * @param keyVersion - */ - @JsonProperty(JSON_PROPERTY_KEY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKeyVersion(Integer keyVersion) { - this.keyVersion = keyVersion; - } - - - public SecurityTrailer nonce(byte[] nonce) { - this.nonce = nonce; - return this; - } - - /** - * Get nonce - * @return nonce - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_NONCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getNonce() { - return nonce; - } - - - /** - * nonce - * - * @param nonce - */ - @JsonProperty(JSON_PROPERTY_NONCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNonce(byte[] nonce) { - this.nonce = nonce; - } - - - public SecurityTrailer hmac(byte[] hmac) { - this.hmac = hmac; - return this; - } - - /** - * Get hmac - * @return hmac - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_HMAC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public byte[] getHmac() { - return hmac; - } - - - /** - * hmac - * - * @param hmac - */ - @JsonProperty(JSON_PROPERTY_HMAC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHmac(byte[] hmac) { - this.hmac = hmac; - } - - - /** - * Return true if this SecurityTrailer object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SecurityTrailer securityTrailer = (SecurityTrailer) o; - return Objects.equals(this.adyenCryptoVersion, securityTrailer.adyenCryptoVersion) && - Objects.equals(this.keyIdentifier, securityTrailer.keyIdentifier) && - Objects.equals(this.keyVersion, securityTrailer.keyVersion) && - Arrays.equals(this.nonce, securityTrailer.nonce) && - Arrays.equals(this.hmac, securityTrailer.hmac); - } - - @Override - public int hashCode() { - return Objects.hash(adyenCryptoVersion, keyIdentifier, keyVersion, Arrays.hashCode(nonce), Arrays.hashCode(hmac)); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SecurityTrailer {\n"); - sb.append(" adyenCryptoVersion: ").append(toIndentedString(adyenCryptoVersion)).append("\n"); - sb.append(" keyIdentifier: ").append(toIndentedString(keyIdentifier)).append("\n"); - sb.append(" keyVersion: ").append(toIndentedString(keyVersion)).append("\n"); - sb.append(" nonce: ").append(toIndentedString(nonce)).append("\n"); - sb.append(" hmac: ").append(toIndentedString(hmac)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of SecurityTrailer given an JSON string - * - * @param jsonString JSON string - * @return An instance of SecurityTrailer - * @throws JsonProcessingException if the JSON string is invalid with respect to SecurityTrailer - */ - public static SecurityTrailer fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, SecurityTrailer.class); - } -/** - * Convert an instance of SecurityTrailer to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/SensitiveCardData.java b/src/main/java/com/adyen/model/terminal/SensitiveCardData.java deleted file mode 100644 index 11834b06c..000000000 --- a/src/main/java/com/adyen/model/terminal/SensitiveCardData.java +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.TrackData; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * This data structure could be CMS protected (EnvelopedData). In this case the data structure SensitiveCardData is replaced by the data structure ProtectedCardData of type ContentInformationType. When this data is protected, the exact content is unknown by the Sale System, and might include all the information which are required by an external backup POI Server to make a batch payment transaction in case of problem with the POI System. Sensitive information related to the payment card, entered or read by the Sale System. - */ -@ApiModel(description = "This data structure could be CMS protected (EnvelopedData). In this case the data structure SensitiveCardData is replaced by the data structure ProtectedCardData of type ContentInformationType. When this data is protected, the exact content is unknown by the Sale System, and might include all the information which are required by an external backup POI Server to make a batch payment transaction in case of problem with the POI System. Sensitive information related to the payment card, entered or read by the Sale System.") -@JsonPropertyOrder({ - SensitiveCardData.JSON_PROPERTY_P_A_N, - SensitiveCardData.JSON_PROPERTY_CARD_SEQ_NUMB, - SensitiveCardData.JSON_PROPERTY_EXPIRY_DATE, - SensitiveCardData.JSON_PROPERTY_TRACK_DATA -}) - -public class SensitiveCardData { - public static final String JSON_PROPERTY_P_A_N = "PAN"; - private Integer PAN; - - public static final String JSON_PROPERTY_CARD_SEQ_NUMB = "CardSeqNumb"; - private Integer cardSeqNumb; - - public static final String JSON_PROPERTY_EXPIRY_DATE = "ExpiryDate"; - private Integer expiryDate; - - public static final String JSON_PROPERTY_TRACK_DATA = "TrackData"; - private List trackData = null; - - public SensitiveCardData() { - } - - public SensitiveCardData PAN(Integer PAN) { - this.PAN = PAN; - return this; - } - - /** - * Get PAN - * minimum: 8 - * maximum: 28 - * @return PAN - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_P_A_N) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getPAN() { - return PAN; - } - - - /** - * PAN - * - * @param PAN - */ - @JsonProperty(JSON_PROPERTY_P_A_N) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPAN(Integer PAN) { - this.PAN = PAN; - } - - - public SensitiveCardData cardSeqNumb(Integer cardSeqNumb) { - this.cardSeqNumb = cardSeqNumb; - return this; - } - - /** - * if EntryMode is File, Keyed or Manual. - * minimum: 2 - * maximum: 3 - * @return cardSeqNumb - **/ - @ApiModelProperty(value = "if EntryMode is File, Keyed or Manual.") - @JsonProperty(JSON_PROPERTY_CARD_SEQ_NUMB) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getCardSeqNumb() { - return cardSeqNumb; - } - - - /** - * if EntryMode is File, Keyed or Manual. - * - * @param cardSeqNumb - */ - @JsonProperty(JSON_PROPERTY_CARD_SEQ_NUMB) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCardSeqNumb(Integer cardSeqNumb) { - this.cardSeqNumb = cardSeqNumb; - } - - - public SensitiveCardData expiryDate(Integer expiryDate) { - this.expiryDate = expiryDate; - return this; - } - - /** - * if EntryMode is File. - * minimum: 4 - * maximum: 4 - * @return expiryDate - **/ - @ApiModelProperty(value = "if EntryMode is File.") - @JsonProperty(JSON_PROPERTY_EXPIRY_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getExpiryDate() { - return expiryDate; - } - - - /** - * if EntryMode is File. - * - * @param expiryDate - */ - @JsonProperty(JSON_PROPERTY_EXPIRY_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiryDate(Integer expiryDate) { - this.expiryDate = expiryDate; - } - - - public SensitiveCardData trackData(List trackData) { - this.trackData = trackData; - return this; - } - - public SensitiveCardData addTrackDataItem(TrackData trackDataItem) { - if (this.trackData == null) { - this.trackData = new ArrayList<>(); - } - this.trackData.add(trackDataItem); - return this; - } - - /** - * Get trackData - * @return trackData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TRACK_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getTrackData() { - return trackData; - } - - - /** - * trackData - * - * @param trackData - */ - @JsonProperty(JSON_PROPERTY_TRACK_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTrackData(List trackData) { - this.trackData = trackData; - } - - - /** - * Return true if this SensitiveCardData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SensitiveCardData sensitiveCardData = (SensitiveCardData) o; - return Objects.equals(this.PAN, sensitiveCardData.PAN) && - Objects.equals(this.cardSeqNumb, sensitiveCardData.cardSeqNumb) && - Objects.equals(this.expiryDate, sensitiveCardData.expiryDate) && - Objects.equals(this.trackData, sensitiveCardData.trackData); - } - - @Override - public int hashCode() { - return Objects.hash(PAN, cardSeqNumb, expiryDate, trackData); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SensitiveCardData {\n"); - sb.append(" PAN: ").append(toIndentedString(PAN)).append("\n"); - sb.append(" cardSeqNumb: ").append(toIndentedString(cardSeqNumb)).append("\n"); - sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).append("\n"); - sb.append(" trackData: ").append(toIndentedString(trackData)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of SensitiveCardData given an JSON string - * - * @param jsonString JSON string - * @return An instance of SensitiveCardData - * @throws JsonProcessingException if the JSON string is invalid with respect to SensitiveCardData - */ - public static SensitiveCardData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, SensitiveCardData.class); - } -/** - * Convert an instance of SensitiveCardData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/SensitiveMobileData.java b/src/main/java/com/adyen/model/terminal/SensitiveMobileData.java deleted file mode 100644 index f1b59fc64..000000000 --- a/src/main/java/com/adyen/model/terminal/SensitiveMobileData.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * SensitiveMobileData - */ -@JsonPropertyOrder({ - SensitiveMobileData.JSON_PROPERTY_M_S_I_S_D_N, - SensitiveMobileData.JSON_PROPERTY_I_S_M_I, - SensitiveMobileData.JSON_PROPERTY_I_M_E_I -}) - -public class SensitiveMobileData { - public static final String JSON_PROPERTY_M_S_I_S_D_N = "MSISDN"; - private Integer MSISDN; - - public static final String JSON_PROPERTY_I_S_M_I = "ISMI"; - private Integer ISMI; - - public static final String JSON_PROPERTY_I_M_E_I = "IMEI"; - private Integer IMEI; - - public SensitiveMobileData() { - } - - public SensitiveMobileData MSISDN(Integer MSISDN) { - this.MSISDN = MSISDN; - return this; - } - - /** - * Get MSISDN - * @return MSISDN - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_M_S_I_S_D_N) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getMSISDN() { - return MSISDN; - } - - - /** - * MSISDN - * - * @param MSISDN - */ - @JsonProperty(JSON_PROPERTY_M_S_I_S_D_N) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMSISDN(Integer MSISDN) { - this.MSISDN = MSISDN; - } - - - public SensitiveMobileData ISMI(Integer ISMI) { - this.ISMI = ISMI; - return this; - } - - /** - * Get ISMI - * @return ISMI - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_I_S_M_I) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getISMI() { - return ISMI; - } - - - /** - * ISMI - * - * @param ISMI - */ - @JsonProperty(JSON_PROPERTY_I_S_M_I) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setISMI(Integer ISMI) { - this.ISMI = ISMI; - } - - - public SensitiveMobileData IMEI(Integer IMEI) { - this.IMEI = IMEI; - return this; - } - - /** - * Get IMEI - * @return IMEI - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_I_M_E_I) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getIMEI() { - return IMEI; - } - - - /** - * IMEI - * - * @param IMEI - */ - @JsonProperty(JSON_PROPERTY_I_M_E_I) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIMEI(Integer IMEI) { - this.IMEI = IMEI; - } - - - /** - * Return true if this SensitiveMobileData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SensitiveMobileData sensitiveMobileData = (SensitiveMobileData) o; - return Objects.equals(this.MSISDN, sensitiveMobileData.MSISDN) && - Objects.equals(this.ISMI, sensitiveMobileData.ISMI) && - Objects.equals(this.IMEI, sensitiveMobileData.IMEI); - } - - @Override - public int hashCode() { - return Objects.hash(MSISDN, ISMI, IMEI); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SensitiveMobileData {\n"); - sb.append(" MSISDN: ").append(toIndentedString(MSISDN)).append("\n"); - sb.append(" ISMI: ").append(toIndentedString(ISMI)).append("\n"); - sb.append(" IMEI: ").append(toIndentedString(IMEI)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of SensitiveMobileData given an JSON string - * - * @param jsonString JSON string - * @return An instance of SensitiveMobileData - * @throws JsonProcessingException if the JSON string is invalid with respect to SensitiveMobileData - */ - public static SensitiveMobileData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, SensitiveMobileData.class); - } -/** - * Convert an instance of SensitiveMobileData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/SoundAction.java b/src/main/java/com/adyen/model/terminal/SoundAction.java deleted file mode 100644 index 3d8610e1a..000000000 --- a/src/main/java/com/adyen/model/terminal/SoundAction.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets SoundAction - */ -public enum SoundAction { - - SETDEFAULTVOLUME("SetDefaultVolume"), - - STARTSOUND("StartSound"), - - STOPSOUND("StopSound"); - - private String value; - - SoundAction(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SoundAction fromValue(String value) { - for (SoundAction b : SoundAction.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/SoundContent.java b/src/main/java/com/adyen/model/terminal/SoundContent.java deleted file mode 100644 index aada5ee9b..000000000 --- a/src/main/java/com/adyen/model/terminal/SoundContent.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.SoundFormat; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * SoundContent - */ -@JsonPropertyOrder({ - SoundContent.JSON_PROPERTY_SOUND_FORMAT, - SoundContent.JSON_PROPERTY_LANGUAGE, - SoundContent.JSON_PROPERTY_REFERENCE_I_D, - SoundContent.JSON_PROPERTY_TEXT -}) - -public class SoundContent { - public static final String JSON_PROPERTY_SOUND_FORMAT = "SoundFormat"; - private SoundFormat soundFormat; - - public static final String JSON_PROPERTY_LANGUAGE = "Language"; - private String language; - - public static final String JSON_PROPERTY_REFERENCE_I_D = "ReferenceID"; - private String referenceID; - - public static final String JSON_PROPERTY_TEXT = "Text"; - private String text; - - public SoundContent() { - } - - public SoundContent soundFormat(SoundFormat soundFormat) { - this.soundFormat = soundFormat; - return this; - } - - /** - * Get soundFormat - * @return soundFormat - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_SOUND_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SoundFormat getSoundFormat() { - return soundFormat; - } - - - /** - * soundFormat - * - * @param soundFormat - */ - @JsonProperty(JSON_PROPERTY_SOUND_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSoundFormat(SoundFormat soundFormat) { - this.soundFormat = soundFormat; - } - - - public SoundContent language(String language) { - this.language = language; - return this; - } - - /** - * Get language - * @return language - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getLanguage() { - return language; - } - - - /** - * language - * - * @param language - */ - @JsonProperty(JSON_PROPERTY_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLanguage(String language) { - this.language = language; - } - - - public SoundContent referenceID(String referenceID) { - this.referenceID = referenceID; - return this; - } - - /** - * Get referenceID - * @return referenceID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_REFERENCE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getReferenceID() { - return referenceID; - } - - - /** - * referenceID - * - * @param referenceID - */ - @JsonProperty(JSON_PROPERTY_REFERENCE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReferenceID(String referenceID) { - this.referenceID = referenceID; - } - - - public SoundContent text(String text) { - this.text = text; - return this; - } - - /** - * Get text - * @return text - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getText() { - return text; - } - - - /** - * text - * - * @param text - */ - @JsonProperty(JSON_PROPERTY_TEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setText(String text) { - this.text = text; - } - - - /** - * Return true if this SoundContent object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SoundContent soundContent = (SoundContent) o; - return Objects.equals(this.soundFormat, soundContent.soundFormat) && - Objects.equals(this.language, soundContent.language) && - Objects.equals(this.referenceID, soundContent.referenceID) && - Objects.equals(this.text, soundContent.text); - } - - @Override - public int hashCode() { - return Objects.hash(soundFormat, language, referenceID, text); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SoundContent {\n"); - sb.append(" soundFormat: ").append(toIndentedString(soundFormat)).append("\n"); - sb.append(" language: ").append(toIndentedString(language)).append("\n"); - sb.append(" referenceID: ").append(toIndentedString(referenceID)).append("\n"); - sb.append(" text: ").append(toIndentedString(text)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of SoundContent given an JSON string - * - * @param jsonString JSON string - * @return An instance of SoundContent - * @throws JsonProcessingException if the JSON string is invalid with respect to SoundContent - */ - public static SoundContent fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, SoundContent.class); - } -/** - * Convert an instance of SoundContent to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/SoundFormat.java b/src/main/java/com/adyen/model/terminal/SoundFormat.java deleted file mode 100644 index f7020bd81..000000000 --- a/src/main/java/com/adyen/model/terminal/SoundFormat.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets SoundFormat - */ -public enum SoundFormat { - - MESSAGEREF("MessageRef"), - - SOUNDREF("SoundRef"), - - TEXT("Text"); - - private String value; - - SoundFormat(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SoundFormat fromValue(String value) { - for (SoundFormat b : SoundFormat.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/StoredValueAccountID.java b/src/main/java/com/adyen/model/terminal/StoredValueAccountID.java deleted file mode 100644 index 1d178d441..000000000 --- a/src/main/java/com/adyen/model/terminal/StoredValueAccountID.java +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.IdentificationType; -import com.adyen.model.terminal.StoredValueAccountType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It contains the identifications of the stored value account or the stored value card, and the associated product sold by the Sale System for stored value requests. Identification of the stored value account or the stored value card. - */ -@ApiModel(description = "It contains the identifications of the stored value account or the stored value card, and the associated product sold by the Sale System for stored value requests. Identification of the stored value account or the stored value card.") -@JsonPropertyOrder({ - StoredValueAccountID.JSON_PROPERTY_STORED_VALUE_ACCOUNT_TYPE, - StoredValueAccountID.JSON_PROPERTY_STORED_VALUE_PROVIDER, - StoredValueAccountID.JSON_PROPERTY_OWNER_NAME, - StoredValueAccountID.JSON_PROPERTY_EXPIRY_DATE, - StoredValueAccountID.JSON_PROPERTY_ENTRY_MODE, - StoredValueAccountID.JSON_PROPERTY_IDENTIFICATION_TYPE, - StoredValueAccountID.JSON_PROPERTY_STORED_VALUE_I_D -}) - -public class StoredValueAccountID { - public static final String JSON_PROPERTY_STORED_VALUE_ACCOUNT_TYPE = "StoredValueAccountType"; - private StoredValueAccountType storedValueAccountType; - - public static final String JSON_PROPERTY_STORED_VALUE_PROVIDER = "StoredValueProvider"; - private String storedValueProvider; - - public static final String JSON_PROPERTY_OWNER_NAME = "OwnerName"; - private String ownerName; - - public static final String JSON_PROPERTY_EXPIRY_DATE = "ExpiryDate"; - private Integer expiryDate; - - /** - * Gets or Sets entryMode - */ - public enum EntryModeEnum { - CONTACTLESS("Contactless"), - - FILE("File"), - - ICC("ICC"), - - KEYED("Keyed"), - - MAGSTRIPE("MagStripe"), - - MANUAL("Manual"), - - MOBILE("Mobile"), - - RFID("RFID"), - - SCANNED("Scanned"), - - SYNCHRONOUSICC("SynchronousICC"), - - TAPPED("Tapped"); - - private String value; - - EntryModeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EntryModeEnum fromValue(String value) { - for (EntryModeEnum b : EntryModeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_ENTRY_MODE = "EntryMode"; - private List entryMode = new ArrayList<>(); - - public static final String JSON_PROPERTY_IDENTIFICATION_TYPE = "IdentificationType"; - private IdentificationType identificationType; - - public static final String JSON_PROPERTY_STORED_VALUE_I_D = "StoredValueID"; - private String storedValueID; - - public StoredValueAccountID() { - } - - public StoredValueAccountID storedValueAccountType(StoredValueAccountType storedValueAccountType) { - this.storedValueAccountType = storedValueAccountType; - return this; - } - - /** - * Get storedValueAccountType - * @return storedValueAccountType - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_STORED_VALUE_ACCOUNT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public StoredValueAccountType getStoredValueAccountType() { - return storedValueAccountType; - } - - - /** - * storedValueAccountType - * - * @param storedValueAccountType - */ - @JsonProperty(JSON_PROPERTY_STORED_VALUE_ACCOUNT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoredValueAccountType(StoredValueAccountType storedValueAccountType) { - this.storedValueAccountType = storedValueAccountType; - } - - - public StoredValueAccountID storedValueProvider(String storedValueProvider) { - this.storedValueProvider = storedValueProvider; - return this; - } - - /** - * Get storedValueProvider - * @return storedValueProvider - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_STORED_VALUE_PROVIDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getStoredValueProvider() { - return storedValueProvider; - } - - - /** - * storedValueProvider - * - * @param storedValueProvider - */ - @JsonProperty(JSON_PROPERTY_STORED_VALUE_PROVIDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoredValueProvider(String storedValueProvider) { - this.storedValueProvider = storedValueProvider; - } - - - public StoredValueAccountID ownerName(String ownerName) { - this.ownerName = ownerName; - return this; - } - - /** - * Get ownerName - * @return ownerName - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_OWNER_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getOwnerName() { - return ownerName; - } - - - /** - * ownerName - * - * @param ownerName - */ - @JsonProperty(JSON_PROPERTY_OWNER_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerName(String ownerName) { - this.ownerName = ownerName; - } - - - public StoredValueAccountID expiryDate(Integer expiryDate) { - this.expiryDate = expiryDate; - return this; - } - - /** - * Get expiryDate - * minimum: 4 - * maximum: 4 - * @return expiryDate - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_EXPIRY_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getExpiryDate() { - return expiryDate; - } - - - /** - * expiryDate - * - * @param expiryDate - */ - @JsonProperty(JSON_PROPERTY_EXPIRY_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiryDate(Integer expiryDate) { - this.expiryDate = expiryDate; - } - - - public StoredValueAccountID entryMode(List entryMode) { - this.entryMode = entryMode; - return this; - } - - public StoredValueAccountID addEntryModeItem(EntryModeEnum entryModeItem) { - this.entryMode.add(entryModeItem); - return this; - } - - /** - * Get entryMode - * @return entryMode - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_ENTRY_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getEntryMode() { - return entryMode; - } - - - /** - * entryMode - * - * @param entryMode - */ - @JsonProperty(JSON_PROPERTY_ENTRY_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEntryMode(List entryMode) { - this.entryMode = entryMode; - } - - - public StoredValueAccountID identificationType(IdentificationType identificationType) { - this.identificationType = identificationType; - return this; - } - - /** - * Get identificationType - * @return identificationType - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_IDENTIFICATION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public IdentificationType getIdentificationType() { - return identificationType; - } - - - /** - * identificationType - * - * @param identificationType - */ - @JsonProperty(JSON_PROPERTY_IDENTIFICATION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIdentificationType(IdentificationType identificationType) { - this.identificationType = identificationType; - } - - - public StoredValueAccountID storedValueID(String storedValueID) { - this.storedValueID = storedValueID; - return this; - } - - /** - * Get storedValueID - * @return storedValueID - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_STORED_VALUE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getStoredValueID() { - return storedValueID; - } - - - /** - * storedValueID - * - * @param storedValueID - */ - @JsonProperty(JSON_PROPERTY_STORED_VALUE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoredValueID(String storedValueID) { - this.storedValueID = storedValueID; - } - - - /** - * Return true if this StoredValueAccountID object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StoredValueAccountID storedValueAccountID = (StoredValueAccountID) o; - return Objects.equals(this.storedValueAccountType, storedValueAccountID.storedValueAccountType) && - Objects.equals(this.storedValueProvider, storedValueAccountID.storedValueProvider) && - Objects.equals(this.ownerName, storedValueAccountID.ownerName) && - Objects.equals(this.expiryDate, storedValueAccountID.expiryDate) && - Objects.equals(this.entryMode, storedValueAccountID.entryMode) && - Objects.equals(this.identificationType, storedValueAccountID.identificationType) && - Objects.equals(this.storedValueID, storedValueAccountID.storedValueID); - } - - @Override - public int hashCode() { - return Objects.hash(storedValueAccountType, storedValueProvider, ownerName, expiryDate, entryMode, identificationType, storedValueID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StoredValueAccountID {\n"); - sb.append(" storedValueAccountType: ").append(toIndentedString(storedValueAccountType)).append("\n"); - sb.append(" storedValueProvider: ").append(toIndentedString(storedValueProvider)).append("\n"); - sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n"); - sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).append("\n"); - sb.append(" entryMode: ").append(toIndentedString(entryMode)).append("\n"); - sb.append(" identificationType: ").append(toIndentedString(identificationType)).append("\n"); - sb.append(" storedValueID: ").append(toIndentedString(storedValueID)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of StoredValueAccountID given an JSON string - * - * @param jsonString JSON string - * @return An instance of StoredValueAccountID - * @throws JsonProcessingException if the JSON string is invalid with respect to StoredValueAccountID - */ - public static StoredValueAccountID fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, StoredValueAccountID.class); - } -/** - * Convert an instance of StoredValueAccountID to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/StoredValueAccountStatus.java b/src/main/java/com/adyen/model/terminal/StoredValueAccountStatus.java deleted file mode 100644 index 440f576b5..000000000 --- a/src/main/java/com/adyen/model/terminal/StoredValueAccountStatus.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.StoredValueAccountID; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * StoredValueAccountStatus - */ -@JsonPropertyOrder({ - StoredValueAccountStatus.JSON_PROPERTY_STORED_VALUE_ACCOUNT_I_D, - StoredValueAccountStatus.JSON_PROPERTY_CURRENT_BALANCE -}) - -public class StoredValueAccountStatus { - public static final String JSON_PROPERTY_STORED_VALUE_ACCOUNT_I_D = "StoredValueAccountID"; - private StoredValueAccountID storedValueAccountID; - - public static final String JSON_PROPERTY_CURRENT_BALANCE = "CurrentBalance"; - private BigDecimal currentBalance; - - public StoredValueAccountStatus() { - } - - public StoredValueAccountStatus storedValueAccountID(StoredValueAccountID storedValueAccountID) { - this.storedValueAccountID = storedValueAccountID; - return this; - } - - /** - * Get storedValueAccountID - * @return storedValueAccountID - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_STORED_VALUE_ACCOUNT_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public StoredValueAccountID getStoredValueAccountID() { - return storedValueAccountID; - } - - - /** - * storedValueAccountID - * - * @param storedValueAccountID - */ - @JsonProperty(JSON_PROPERTY_STORED_VALUE_ACCOUNT_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoredValueAccountID(StoredValueAccountID storedValueAccountID) { - this.storedValueAccountID = storedValueAccountID; - } - - - public StoredValueAccountStatus currentBalance(BigDecimal currentBalance) { - this.currentBalance = currentBalance; - return this; - } - - /** - * Get currentBalance - * minimum: 0.0 - * maximum: 99999999.999999 - * @return currentBalance - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CURRENT_BALANCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getCurrentBalance() { - return currentBalance; - } - - - /** - * currentBalance - * - * @param currentBalance - */ - @JsonProperty(JSON_PROPERTY_CURRENT_BALANCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrentBalance(BigDecimal currentBalance) { - this.currentBalance = currentBalance; - } - - - /** - * Return true if this StoredValueAccountStatus object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StoredValueAccountStatus storedValueAccountStatus = (StoredValueAccountStatus) o; - return Objects.equals(this.storedValueAccountID, storedValueAccountStatus.storedValueAccountID) && - Objects.equals(this.currentBalance, storedValueAccountStatus.currentBalance); - } - - @Override - public int hashCode() { - return Objects.hash(storedValueAccountID, currentBalance); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StoredValueAccountStatus {\n"); - sb.append(" storedValueAccountID: ").append(toIndentedString(storedValueAccountID)).append("\n"); - sb.append(" currentBalance: ").append(toIndentedString(currentBalance)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of StoredValueAccountStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of StoredValueAccountStatus - * @throws JsonProcessingException if the JSON string is invalid with respect to StoredValueAccountStatus - */ - public static StoredValueAccountStatus fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, StoredValueAccountStatus.class); - } -/** - * Convert an instance of StoredValueAccountStatus to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/StoredValueAccountType.java b/src/main/java/com/adyen/model/terminal/StoredValueAccountType.java deleted file mode 100644 index a6acd7caf..000000000 --- a/src/main/java/com/adyen/model/terminal/StoredValueAccountType.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets StoredValueAccountType - */ -public enum StoredValueAccountType { - - GIFTCARD("GiftCard"), - - OTHER("Other"), - - PHONECARD("PhoneCard"); - - private String value; - - StoredValueAccountType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StoredValueAccountType fromValue(String value) { - for (StoredValueAccountType b : StoredValueAccountType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/StoredValueData.java b/src/main/java/com/adyen/model/terminal/StoredValueData.java deleted file mode 100644 index 221648a77..000000000 --- a/src/main/java/com/adyen/model/terminal/StoredValueData.java +++ /dev/null @@ -1,394 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.OriginalPOITransaction; -import com.adyen.model.terminal.StoredValueAccountID; -import com.adyen.model.terminal.StoredValueTransactionType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It contains: - the identification of the stored value accounts or the stored value cards, if provided by the Sale System, and - the associated products sold by the Sale System.. Data related to the stored value card. - */ -@ApiModel(description = "It contains: - the identification of the stored value accounts or the stored value cards, if provided by the Sale System, and - the associated products sold by the Sale System.. Data related to the stored value card.") -@JsonPropertyOrder({ - StoredValueData.JSON_PROPERTY_STORED_VALUE_PROVIDER, - StoredValueData.JSON_PROPERTY_STORED_VALUE_TRANSACTION_TYPE, - StoredValueData.JSON_PROPERTY_STORED_VALUE_ACCOUNT_I_D, - StoredValueData.JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION, - StoredValueData.JSON_PROPERTY_PRODUCT_CODE, - StoredValueData.JSON_PROPERTY_EAN_UPC, - StoredValueData.JSON_PROPERTY_ITEM_AMOUNT, - StoredValueData.JSON_PROPERTY_CURRENCY -}) - -public class StoredValueData { - public static final String JSON_PROPERTY_STORED_VALUE_PROVIDER = "StoredValueProvider"; - private String storedValueProvider; - - public static final String JSON_PROPERTY_STORED_VALUE_TRANSACTION_TYPE = "StoredValueTransactionType"; - private StoredValueTransactionType storedValueTransactionType; - - public static final String JSON_PROPERTY_STORED_VALUE_ACCOUNT_I_D = "StoredValueAccountID"; - private StoredValueAccountID storedValueAccountID; - - public static final String JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION = "OriginalPOITransaction"; - private OriginalPOITransaction originalPOITransaction; - - public static final String JSON_PROPERTY_PRODUCT_CODE = "ProductCode"; - private Integer productCode; - - public static final String JSON_PROPERTY_EAN_UPC = "EanUpc"; - private Integer eanUpc; - - public static final String JSON_PROPERTY_ITEM_AMOUNT = "ItemAmount"; - private BigDecimal itemAmount; - - public static final String JSON_PROPERTY_CURRENCY = "Currency"; - private String currency; - - public StoredValueData() { - } - - public StoredValueData storedValueProvider(String storedValueProvider) { - this.storedValueProvider = storedValueProvider; - return this; - } - - /** - * If more than one provider to manage on the POI, and StoredValueAccountID absent. - * @return storedValueProvider - **/ - @ApiModelProperty(value = "If more than one provider to manage on the POI, and StoredValueAccountID absent.") - @JsonProperty(JSON_PROPERTY_STORED_VALUE_PROVIDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getStoredValueProvider() { - return storedValueProvider; - } - - - /** - * If more than one provider to manage on the POI, and StoredValueAccountID absent. - * - * @param storedValueProvider - */ - @JsonProperty(JSON_PROPERTY_STORED_VALUE_PROVIDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoredValueProvider(String storedValueProvider) { - this.storedValueProvider = storedValueProvider; - } - - - public StoredValueData storedValueTransactionType(StoredValueTransactionType storedValueTransactionType) { - this.storedValueTransactionType = storedValueTransactionType; - return this; - } - - /** - * Get storedValueTransactionType - * @return storedValueTransactionType - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_STORED_VALUE_TRANSACTION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public StoredValueTransactionType getStoredValueTransactionType() { - return storedValueTransactionType; - } - - - /** - * storedValueTransactionType - * - * @param storedValueTransactionType - */ - @JsonProperty(JSON_PROPERTY_STORED_VALUE_TRANSACTION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoredValueTransactionType(StoredValueTransactionType storedValueTransactionType) { - this.storedValueTransactionType = storedValueTransactionType; - } - - - public StoredValueData storedValueAccountID(StoredValueAccountID storedValueAccountID) { - this.storedValueAccountID = storedValueAccountID; - return this; - } - - /** - * Get storedValueAccountID - * @return storedValueAccountID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_STORED_VALUE_ACCOUNT_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public StoredValueAccountID getStoredValueAccountID() { - return storedValueAccountID; - } - - - /** - * storedValueAccountID - * - * @param storedValueAccountID - */ - @JsonProperty(JSON_PROPERTY_STORED_VALUE_ACCOUNT_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoredValueAccountID(StoredValueAccountID storedValueAccountID) { - this.storedValueAccountID = storedValueAccountID; - } - - - public StoredValueData originalPOITransaction(OriginalPOITransaction originalPOITransaction) { - this.originalPOITransaction = originalPOITransaction; - return this; - } - - /** - * Get originalPOITransaction - * @return originalPOITransaction - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OriginalPOITransaction getOriginalPOITransaction() { - return originalPOITransaction; - } - - - /** - * originalPOITransaction - * - * @param originalPOITransaction - */ - @JsonProperty(JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalPOITransaction(OriginalPOITransaction originalPOITransaction) { - this.originalPOITransaction = originalPOITransaction; - } - - - public StoredValueData productCode(Integer productCode) { - this.productCode = productCode; - return this; - } - - /** - * Product code of item purchased with the transaction. - * minimum: 1 - * maximum: 20 - * @return productCode - **/ - @ApiModelProperty(value = "Product code of item purchased with the transaction.") - @JsonProperty(JSON_PROPERTY_PRODUCT_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getProductCode() { - return productCode; - } - - - /** - * Product code of item purchased with the transaction. - * - * @param productCode - */ - @JsonProperty(JSON_PROPERTY_PRODUCT_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProductCode(Integer productCode) { - this.productCode = productCode; - } - - - public StoredValueData eanUpc(Integer eanUpc) { - this.eanUpc = eanUpc; - return this; - } - - /** - * Standard product code of item purchased with the transaction. - * @return eanUpc - **/ - @ApiModelProperty(value = "Standard product code of item purchased with the transaction.") - @JsonProperty(JSON_PROPERTY_EAN_UPC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getEanUpc() { - return eanUpc; - } - - - /** - * Standard product code of item purchased with the transaction. - * - * @param eanUpc - */ - @JsonProperty(JSON_PROPERTY_EAN_UPC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEanUpc(Integer eanUpc) { - this.eanUpc = eanUpc; - } - - - public StoredValueData itemAmount(BigDecimal itemAmount) { - this.itemAmount = itemAmount; - return this; - } - - /** - * Total amount of the item line. - * minimum: 0.0 - * maximum: 99999999.999999 - * @return itemAmount - **/ - @ApiModelProperty(value = "Total amount of the item line.") - @JsonProperty(JSON_PROPERTY_ITEM_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getItemAmount() { - return itemAmount; - } - - - /** - * Total amount of the item line. - * - * @param itemAmount - */ - @JsonProperty(JSON_PROPERTY_ITEM_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setItemAmount(BigDecimal itemAmount) { - this.itemAmount = itemAmount; - } - - - public StoredValueData currency(String currency) { - this.currency = currency; - return this; - } - - /** - * Currency of a monetary amount. - * @return currency - **/ - @ApiModelProperty(value = "Currency of a monetary amount.") - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCurrency() { - return currency; - } - - - /** - * Currency of a monetary amount. - * - * @param currency - */ - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrency(String currency) { - this.currency = currency; - } - - - /** - * Return true if this StoredValueData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StoredValueData storedValueData = (StoredValueData) o; - return Objects.equals(this.storedValueProvider, storedValueData.storedValueProvider) && - Objects.equals(this.storedValueTransactionType, storedValueData.storedValueTransactionType) && - Objects.equals(this.storedValueAccountID, storedValueData.storedValueAccountID) && - Objects.equals(this.originalPOITransaction, storedValueData.originalPOITransaction) && - Objects.equals(this.productCode, storedValueData.productCode) && - Objects.equals(this.eanUpc, storedValueData.eanUpc) && - Objects.equals(this.itemAmount, storedValueData.itemAmount) && - Objects.equals(this.currency, storedValueData.currency); - } - - @Override - public int hashCode() { - return Objects.hash(storedValueProvider, storedValueTransactionType, storedValueAccountID, originalPOITransaction, productCode, eanUpc, itemAmount, currency); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StoredValueData {\n"); - sb.append(" storedValueProvider: ").append(toIndentedString(storedValueProvider)).append("\n"); - sb.append(" storedValueTransactionType: ").append(toIndentedString(storedValueTransactionType)).append("\n"); - sb.append(" storedValueAccountID: ").append(toIndentedString(storedValueAccountID)).append("\n"); - sb.append(" originalPOITransaction: ").append(toIndentedString(originalPOITransaction)).append("\n"); - sb.append(" productCode: ").append(toIndentedString(productCode)).append("\n"); - sb.append(" eanUpc: ").append(toIndentedString(eanUpc)).append("\n"); - sb.append(" itemAmount: ").append(toIndentedString(itemAmount)).append("\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of StoredValueData given an JSON string - * - * @param jsonString JSON string - * @return An instance of StoredValueData - * @throws JsonProcessingException if the JSON string is invalid with respect to StoredValueData - */ - public static StoredValueData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, StoredValueData.class); - } -/** - * Convert an instance of StoredValueData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/StoredValueRequest.java b/src/main/java/com/adyen/model/terminal/StoredValueRequest.java deleted file mode 100644 index c0365f3c1..000000000 --- a/src/main/java/com/adyen/model/terminal/StoredValueRequest.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.SaleData; -import com.adyen.model.terminal.StoredValueData; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the Stored Value transaction to process. Content of the Stored Value Request message. - */ -@ApiModel(description = "It conveys Information related to the Stored Value transaction to process. Content of the Stored Value Request message.") -@JsonPropertyOrder({ - StoredValueRequest.JSON_PROPERTY_SALE_DATA, - StoredValueRequest.JSON_PROPERTY_CUSTOMER_LANGUAGE, - StoredValueRequest.JSON_PROPERTY_STORED_VALUE_DATA -}) - -public class StoredValueRequest { - public static final String JSON_PROPERTY_SALE_DATA = "SaleData"; - private SaleData saleData; - - public static final String JSON_PROPERTY_CUSTOMER_LANGUAGE = "CustomerLanguage"; - private String customerLanguage; - - public static final String JSON_PROPERTY_STORED_VALUE_DATA = "StoredValueData"; - private List storedValueData = new ArrayList<>(); - - public StoredValueRequest() { - } - - public StoredValueRequest saleData(SaleData saleData) { - this.saleData = saleData; - return this; - } - - /** - * Get saleData - * @return saleData - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SaleData getSaleData() { - return saleData; - } - - - /** - * saleData - * - * @param saleData - */ - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleData(SaleData saleData) { - this.saleData = saleData; - } - - - public StoredValueRequest customerLanguage(String customerLanguage) { - this.customerLanguage = customerLanguage; - return this; - } - - /** - * If the language is selected by the Sale System before the request to the POI. - * @return customerLanguage - **/ - @ApiModelProperty(value = "If the language is selected by the Sale System before the request to the POI.") - @JsonProperty(JSON_PROPERTY_CUSTOMER_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCustomerLanguage() { - return customerLanguage; - } - - - /** - * If the language is selected by the Sale System before the request to the POI. - * - * @param customerLanguage - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerLanguage(String customerLanguage) { - this.customerLanguage = customerLanguage; - } - - - public StoredValueRequest storedValueData(List storedValueData) { - this.storedValueData = storedValueData; - return this; - } - - public StoredValueRequest addStoredValueDataItem(StoredValueData storedValueDataItem) { - this.storedValueData.add(storedValueDataItem); - return this; - } - - /** - * Get storedValueData - * @return storedValueData - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_STORED_VALUE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getStoredValueData() { - return storedValueData; - } - - - /** - * storedValueData - * - * @param storedValueData - */ - @JsonProperty(JSON_PROPERTY_STORED_VALUE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoredValueData(List storedValueData) { - this.storedValueData = storedValueData; - } - - - /** - * Return true if this StoredValueRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StoredValueRequest storedValueRequest = (StoredValueRequest) o; - return Objects.equals(this.saleData, storedValueRequest.saleData) && - Objects.equals(this.customerLanguage, storedValueRequest.customerLanguage) && - Objects.equals(this.storedValueData, storedValueRequest.storedValueData); - } - - @Override - public int hashCode() { - return Objects.hash(saleData, customerLanguage, storedValueData); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StoredValueRequest {\n"); - sb.append(" saleData: ").append(toIndentedString(saleData)).append("\n"); - sb.append(" customerLanguage: ").append(toIndentedString(customerLanguage)).append("\n"); - sb.append(" storedValueData: ").append(toIndentedString(storedValueData)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of StoredValueRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of StoredValueRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to StoredValueRequest - */ - public static StoredValueRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, StoredValueRequest.class); - } -/** - * Convert an instance of StoredValueRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/StoredValueResponse.java b/src/main/java/com/adyen/model/terminal/StoredValueResponse.java deleted file mode 100644 index 4672ee308..000000000 --- a/src/main/java/com/adyen/model/terminal/StoredValueResponse.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.POIData; -import com.adyen.model.terminal.PaymentReceipt; -import com.adyen.model.terminal.Response; -import com.adyen.model.terminal.SaleData; -import com.adyen.model.terminal.StoredValueResult; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the Stored Value transaction processed by the POI System. Content of the Stored Value Response message. - */ -@ApiModel(description = "It conveys Information related to the Stored Value transaction processed by the POI System. Content of the Stored Value Response message.") -@JsonPropertyOrder({ - StoredValueResponse.JSON_PROPERTY_RESPONSE, - StoredValueResponse.JSON_PROPERTY_SALE_DATA, - StoredValueResponse.JSON_PROPERTY_PO_I_DATA, - StoredValueResponse.JSON_PROPERTY_STORED_VALUE_RESULT, - StoredValueResponse.JSON_PROPERTY_PAYMENT_RECEIPT -}) - -public class StoredValueResponse { - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public static final String JSON_PROPERTY_SALE_DATA = "SaleData"; - private SaleData saleData; - - public static final String JSON_PROPERTY_PO_I_DATA = "POIData"; - private POIData poIData; - - public static final String JSON_PROPERTY_STORED_VALUE_RESULT = "StoredValueResult"; - private List storedValueResult = null; - - public static final String JSON_PROPERTY_PAYMENT_RECEIPT = "PaymentReceipt"; - private List paymentReceipt = null; - - public StoredValueResponse() { - } - - public StoredValueResponse response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - public StoredValueResponse saleData(SaleData saleData) { - this.saleData = saleData; - return this; - } - - /** - * Get saleData - * @return saleData - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SaleData getSaleData() { - return saleData; - } - - - /** - * saleData - * - * @param saleData - */ - @JsonProperty(JSON_PROPERTY_SALE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleData(SaleData saleData) { - this.saleData = saleData; - } - - - public StoredValueResponse poIData(POIData poIData) { - this.poIData = poIData; - return this; - } - - /** - * Get poIData - * @return poIData - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PO_I_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public POIData getPoIData() { - return poIData; - } - - - /** - * poIData - * - * @param poIData - */ - @JsonProperty(JSON_PROPERTY_PO_I_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPoIData(POIData poIData) { - this.poIData = poIData; - } - - - public StoredValueResponse storedValueResult(List storedValueResult) { - this.storedValueResult = storedValueResult; - return this; - } - - public StoredValueResponse addStoredValueResultItem(StoredValueResult storedValueResultItem) { - if (this.storedValueResult == null) { - this.storedValueResult = new ArrayList<>(); - } - this.storedValueResult.add(storedValueResultItem); - return this; - } - - /** - * Get storedValueResult - * @return storedValueResult - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_STORED_VALUE_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getStoredValueResult() { - return storedValueResult; - } - - - /** - * storedValueResult - * - * @param storedValueResult - */ - @JsonProperty(JSON_PROPERTY_STORED_VALUE_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoredValueResult(List storedValueResult) { - this.storedValueResult = storedValueResult; - } - - - public StoredValueResponse paymentReceipt(List paymentReceipt) { - this.paymentReceipt = paymentReceipt; - return this; - } - - public StoredValueResponse addPaymentReceiptItem(PaymentReceipt paymentReceiptItem) { - if (this.paymentReceipt == null) { - this.paymentReceipt = new ArrayList<>(); - } - this.paymentReceipt.add(paymentReceiptItem); - return this; - } - - /** - * Get paymentReceipt - * @return paymentReceipt - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_RECEIPT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPaymentReceipt() { - return paymentReceipt; - } - - - /** - * paymentReceipt - * - * @param paymentReceipt - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_RECEIPT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentReceipt(List paymentReceipt) { - this.paymentReceipt = paymentReceipt; - } - - - /** - * Return true if this StoredValueResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StoredValueResponse storedValueResponse = (StoredValueResponse) o; - return Objects.equals(this.response, storedValueResponse.response) && - Objects.equals(this.saleData, storedValueResponse.saleData) && - Objects.equals(this.poIData, storedValueResponse.poIData) && - Objects.equals(this.storedValueResult, storedValueResponse.storedValueResult) && - Objects.equals(this.paymentReceipt, storedValueResponse.paymentReceipt); - } - - @Override - public int hashCode() { - return Objects.hash(response, saleData, poIData, storedValueResult, paymentReceipt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StoredValueResponse {\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append(" saleData: ").append(toIndentedString(saleData)).append("\n"); - sb.append(" poIData: ").append(toIndentedString(poIData)).append("\n"); - sb.append(" storedValueResult: ").append(toIndentedString(storedValueResult)).append("\n"); - sb.append(" paymentReceipt: ").append(toIndentedString(paymentReceipt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of StoredValueResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of StoredValueResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to StoredValueResponse - */ - public static StoredValueResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, StoredValueResponse.class); - } -/** - * Convert an instance of StoredValueResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/StoredValueResult.java b/src/main/java/com/adyen/model/terminal/StoredValueResult.java deleted file mode 100644 index 07c789812..000000000 --- a/src/main/java/com/adyen/model/terminal/StoredValueResult.java +++ /dev/null @@ -1,358 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.StoredValueAccountStatus; -import com.adyen.model.terminal.StoredValueTransactionType; -import com.adyen.model.terminal.TransactionIDType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * For each stored value card loaded or reloaded, in the StoredValue response message. Result of loading/reloading a stored value card.. - */ -@ApiModel(description = "For each stored value card loaded or reloaded, in the StoredValue response message. Result of loading/reloading a stored value card..") -@JsonPropertyOrder({ - StoredValueResult.JSON_PROPERTY_STORED_VALUE_TRANSACTION_TYPE, - StoredValueResult.JSON_PROPERTY_PRODUCT_CODE, - StoredValueResult.JSON_PROPERTY_EAN_UPC, - StoredValueResult.JSON_PROPERTY_ITEM_AMOUNT, - StoredValueResult.JSON_PROPERTY_CURRENCY, - StoredValueResult.JSON_PROPERTY_STORED_VALUE_ACCOUNT_STATUS, - StoredValueResult.JSON_PROPERTY_HOST_TRANSACTION_I_D -}) - -public class StoredValueResult { - public static final String JSON_PROPERTY_STORED_VALUE_TRANSACTION_TYPE = "StoredValueTransactionType"; - private StoredValueTransactionType storedValueTransactionType; - - public static final String JSON_PROPERTY_PRODUCT_CODE = "ProductCode"; - private Integer productCode; - - public static final String JSON_PROPERTY_EAN_UPC = "EanUpc"; - private Integer eanUpc; - - public static final String JSON_PROPERTY_ITEM_AMOUNT = "ItemAmount"; - private BigDecimal itemAmount; - - public static final String JSON_PROPERTY_CURRENCY = "Currency"; - private String currency; - - public static final String JSON_PROPERTY_STORED_VALUE_ACCOUNT_STATUS = "StoredValueAccountStatus"; - private StoredValueAccountStatus storedValueAccountStatus; - - public static final String JSON_PROPERTY_HOST_TRANSACTION_I_D = "HostTransactionID"; - private TransactionIDType hostTransactionID; - - public StoredValueResult() { - } - - public StoredValueResult storedValueTransactionType(StoredValueTransactionType storedValueTransactionType) { - this.storedValueTransactionType = storedValueTransactionType; - return this; - } - - /** - * Get storedValueTransactionType - * @return storedValueTransactionType - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_STORED_VALUE_TRANSACTION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public StoredValueTransactionType getStoredValueTransactionType() { - return storedValueTransactionType; - } - - - /** - * storedValueTransactionType - * - * @param storedValueTransactionType - */ - @JsonProperty(JSON_PROPERTY_STORED_VALUE_TRANSACTION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoredValueTransactionType(StoredValueTransactionType storedValueTransactionType) { - this.storedValueTransactionType = storedValueTransactionType; - } - - - public StoredValueResult productCode(Integer productCode) { - this.productCode = productCode; - return this; - } - - /** - * Copy. - * minimum: 1 - * maximum: 20 - * @return productCode - **/ - @ApiModelProperty(value = "Copy.") - @JsonProperty(JSON_PROPERTY_PRODUCT_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getProductCode() { - return productCode; - } - - - /** - * Copy. - * - * @param productCode - */ - @JsonProperty(JSON_PROPERTY_PRODUCT_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProductCode(Integer productCode) { - this.productCode = productCode; - } - - - public StoredValueResult eanUpc(Integer eanUpc) { - this.eanUpc = eanUpc; - return this; - } - - /** - * Copy. - * @return eanUpc - **/ - @ApiModelProperty(value = "Copy.") - @JsonProperty(JSON_PROPERTY_EAN_UPC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getEanUpc() { - return eanUpc; - } - - - /** - * Copy. - * - * @param eanUpc - */ - @JsonProperty(JSON_PROPERTY_EAN_UPC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEanUpc(Integer eanUpc) { - this.eanUpc = eanUpc; - } - - - public StoredValueResult itemAmount(BigDecimal itemAmount) { - this.itemAmount = itemAmount; - return this; - } - - /** - * Total amount of the item line. - * minimum: 0.0 - * maximum: 99999999.999999 - * @return itemAmount - **/ - @ApiModelProperty(value = "Total amount of the item line.") - @JsonProperty(JSON_PROPERTY_ITEM_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getItemAmount() { - return itemAmount; - } - - - /** - * Total amount of the item line. - * - * @param itemAmount - */ - @JsonProperty(JSON_PROPERTY_ITEM_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setItemAmount(BigDecimal itemAmount) { - this.itemAmount = itemAmount; - } - - - public StoredValueResult currency(String currency) { - this.currency = currency; - return this; - } - - /** - * Copy. - * @return currency - **/ - @ApiModelProperty(value = "Copy.") - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCurrency() { - return currency; - } - - - /** - * Copy. - * - * @param currency - */ - @JsonProperty(JSON_PROPERTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCurrency(String currency) { - this.currency = currency; - } - - - public StoredValueResult storedValueAccountStatus(StoredValueAccountStatus storedValueAccountStatus) { - this.storedValueAccountStatus = storedValueAccountStatus; - return this; - } - - /** - * Get storedValueAccountStatus - * @return storedValueAccountStatus - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_STORED_VALUE_ACCOUNT_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public StoredValueAccountStatus getStoredValueAccountStatus() { - return storedValueAccountStatus; - } - - - /** - * storedValueAccountStatus - * - * @param storedValueAccountStatus - */ - @JsonProperty(JSON_PROPERTY_STORED_VALUE_ACCOUNT_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoredValueAccountStatus(StoredValueAccountStatus storedValueAccountStatus) { - this.storedValueAccountStatus = storedValueAccountStatus; - } - - - public StoredValueResult hostTransactionID(TransactionIDType hostTransactionID) { - this.hostTransactionID = hostTransactionID; - return this; - } - - /** - * Get hostTransactionID - * @return hostTransactionID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_HOST_TRANSACTION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransactionIDType getHostTransactionID() { - return hostTransactionID; - } - - - /** - * hostTransactionID - * - * @param hostTransactionID - */ - @JsonProperty(JSON_PROPERTY_HOST_TRANSACTION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHostTransactionID(TransactionIDType hostTransactionID) { - this.hostTransactionID = hostTransactionID; - } - - - /** - * Return true if this StoredValueResult object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StoredValueResult storedValueResult = (StoredValueResult) o; - return Objects.equals(this.storedValueTransactionType, storedValueResult.storedValueTransactionType) && - Objects.equals(this.productCode, storedValueResult.productCode) && - Objects.equals(this.eanUpc, storedValueResult.eanUpc) && - Objects.equals(this.itemAmount, storedValueResult.itemAmount) && - Objects.equals(this.currency, storedValueResult.currency) && - Objects.equals(this.storedValueAccountStatus, storedValueResult.storedValueAccountStatus) && - Objects.equals(this.hostTransactionID, storedValueResult.hostTransactionID); - } - - @Override - public int hashCode() { - return Objects.hash(storedValueTransactionType, productCode, eanUpc, itemAmount, currency, storedValueAccountStatus, hostTransactionID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StoredValueResult {\n"); - sb.append(" storedValueTransactionType: ").append(toIndentedString(storedValueTransactionType)).append("\n"); - sb.append(" productCode: ").append(toIndentedString(productCode)).append("\n"); - sb.append(" eanUpc: ").append(toIndentedString(eanUpc)).append("\n"); - sb.append(" itemAmount: ").append(toIndentedString(itemAmount)).append("\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append(" storedValueAccountStatus: ").append(toIndentedString(storedValueAccountStatus)).append("\n"); - sb.append(" hostTransactionID: ").append(toIndentedString(hostTransactionID)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of StoredValueResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of StoredValueResult - * @throws JsonProcessingException if the JSON string is invalid with respect to StoredValueResult - */ - public static StoredValueResult fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, StoredValueResult.class); - } -/** - * Convert an instance of StoredValueResult to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/StoredValueTransactionType.java b/src/main/java/com/adyen/model/terminal/StoredValueTransactionType.java deleted file mode 100644 index 91a9dfb4d..000000000 --- a/src/main/java/com/adyen/model/terminal/StoredValueTransactionType.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets StoredValueTransactionType - */ -public enum StoredValueTransactionType { - - ACTIVATE("Activate"), - - DUPLICATE("Duplicate"), - - LOAD("Load"), - - RESERVE("Reserve"), - - REVERSE("Reverse"), - - UNLOAD("Unload"); - - private String value; - - StoredValueTransactionType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StoredValueTransactionType fromValue(String value) { - for (StoredValueTransactionType b : StoredValueTransactionType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/TerminalAPIRequest.java b/src/main/java/com/adyen/model/terminal/TerminalAPIRequest.java new file mode 100644 index 000000000..7d049e071 --- /dev/null +++ b/src/main/java/com/adyen/model/terminal/TerminalAPIRequest.java @@ -0,0 +1,77 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ +package com.adyen.model.terminal; + +import com.adyen.model.nexo.SaleToPOIRequest; + +import com.google.gson.annotations.SerializedName; + +import java.util.Objects; + +/** + * Terminal API Request + */ +public class TerminalAPIRequest { + @SerializedName("SaleToPOIRequest") + private SaleToPOIRequest saleToPOIRequest; + + /** + * Gets sale to POI request. + * + * @return the sale to POI request + */ + public SaleToPOIRequest getSaleToPOIRequest() { + return saleToPOIRequest; + } + + /** + * Sets sale to POI request. + * + * @param saleToPOIRequest the sale to POI request + */ + public void setSaleToPOIRequest(SaleToPOIRequest saleToPOIRequest) { + this.saleToPOIRequest = saleToPOIRequest; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TerminalAPIRequest that = (TerminalAPIRequest) o; + return saleToPOIRequest.equals(that.saleToPOIRequest); + } + + @Override + public int hashCode() { + return Objects.hash(saleToPOIRequest); + } + + @Override + public String toString() { + return "TerminalAPIRequest{" + + "saleToPOIRequest=" + saleToPOIRequest + + '}'; + } +} diff --git a/src/main/java/com/adyen/model/terminal/TerminalAPIResponse.java b/src/main/java/com/adyen/model/terminal/TerminalAPIResponse.java new file mode 100644 index 000000000..f1a6a94c2 --- /dev/null +++ b/src/main/java/com/adyen/model/terminal/TerminalAPIResponse.java @@ -0,0 +1,101 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ +package com.adyen.model.terminal; + +import com.adyen.model.nexo.SaleToPOIRequest; +import com.adyen.model.nexo.SaleToPOIResponse; + +import com.google.gson.annotations.SerializedName; + +import java.util.Objects; + +/** + * Terminal API Response + */ +public class TerminalAPIResponse { + @SerializedName("SaleToPOIResponse") + private SaleToPOIResponse saleToPOIResponse; + + @SerializedName("SaleToPOIRequest") + private SaleToPOIRequest saleToPOIRequest; + + /** + * Gets sale to POI request. + * + * @return the sale to POI request + */ + public SaleToPOIRequest getSaleToPOIRequest() { + return saleToPOIRequest; + } + + /** + * Sets sale to POI request. + * + * @param saleToPOIRequest the sale to POI request + */ + public void setSaleToPOIRequest(SaleToPOIRequest saleToPOIRequest) { + this.saleToPOIRequest = saleToPOIRequest; + } + + /** + * Gets sale to POI response. + * + * @return the sale to POI response + */ + public SaleToPOIResponse getSaleToPOIResponse() { + return saleToPOIResponse; + } + + /** + * Sets sale to POI response. + * + * @param saleToPOIResponse the sale to POI response + */ + public void setSaleToPOIResponse(SaleToPOIResponse saleToPOIResponse) { + this.saleToPOIResponse = saleToPOIResponse; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TerminalAPIResponse response = (TerminalAPIResponse) o; + return Objects.equals(saleToPOIResponse, response.saleToPOIResponse) && + Objects.equals(saleToPOIRequest, response.saleToPOIRequest); + } + + @Override + public int hashCode() { + return Objects.hash(saleToPOIResponse, saleToPOIRequest); + } + + @Override + public String toString() { + return "TerminalAPIResponse{" + + "saleToPOIResponse=" + saleToPOIResponse + + ", saleToPOIRequest=" + saleToPOIRequest + + '}'; + } +} diff --git a/src/main/java/com/adyen/model/terminal/TerminalAPISecuredRequest.java b/src/main/java/com/adyen/model/terminal/TerminalAPISecuredRequest.java new file mode 100644 index 000000000..f42801f1a --- /dev/null +++ b/src/main/java/com/adyen/model/terminal/TerminalAPISecuredRequest.java @@ -0,0 +1,78 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ +package com.adyen.model.terminal; + +import com.adyen.model.terminal.security.SaleToPOISecuredMessage; + +import com.google.gson.annotations.SerializedName; + +import java.util.Objects; + +/** + * Terminal API Secured Request + */ +public class TerminalAPISecuredRequest { + @SerializedName("SaleToPOIRequest") + private SaleToPOISecuredMessage saleToPOIRequest; + + + /** + * Gets sale to POI request. + * + * @return the sale to POI request + */ + public SaleToPOISecuredMessage getSaleToPOIRequest() { + return saleToPOIRequest; + } + + /** + * Sets sale to POI request. + * + * @param saleToPOIRequest the sale to POI request + */ + public void setSaleToPOIRequest(SaleToPOISecuredMessage saleToPOIRequest) { + this.saleToPOIRequest = saleToPOIRequest; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TerminalAPISecuredRequest that = (TerminalAPISecuredRequest) o; + return saleToPOIRequest.equals(that.saleToPOIRequest); + } + + @Override + public int hashCode() { + return Objects.hash(saleToPOIRequest); + } + + @Override + public String toString() { + return "TerminalAPISecuredRequest{" + + "saleToPOIRequest=" + saleToPOIRequest + + '}'; + } +} diff --git a/src/main/java/com/adyen/model/terminal/TerminalAPISecuredResponse.java b/src/main/java/com/adyen/model/terminal/TerminalAPISecuredResponse.java new file mode 100644 index 000000000..3fe0d2680 --- /dev/null +++ b/src/main/java/com/adyen/model/terminal/TerminalAPISecuredResponse.java @@ -0,0 +1,77 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ +package com.adyen.model.terminal; + +import com.adyen.model.terminal.security.SaleToPOISecuredMessage; + +import com.google.gson.annotations.SerializedName; + +import java.util.Objects; + +/** + * Terminal API Secured Response + */ +public class TerminalAPISecuredResponse { + @SerializedName("SaleToPOIResponse") + private SaleToPOISecuredMessage saleToPOIResponse; + + /** + * Gets sale to POI response. + * + * @return the sale to POI response + */ + public SaleToPOISecuredMessage getSaleToPOIResponse() { + return saleToPOIResponse; + } + + /** + * Sets sale to POI response. + * + * @param saleToPOIResponse the sale to POI response + */ + public void setSaleToPOIResponse(SaleToPOISecuredMessage saleToPOIResponse) { + this.saleToPOIResponse = saleToPOIResponse; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TerminalAPISecuredResponse that = (TerminalAPISecuredResponse) o; + return Objects.equals(saleToPOIResponse, that.saleToPOIResponse); + } + + @Override + public int hashCode() { + return Objects.hash(saleToPOIResponse); + } + + @Override + public String toString() { + return "TerminalAPISecuredResponse{" + + "saleToPOIResponse=" + saleToPOIResponse + + '}'; + } +} diff --git a/src/main/java/com/adyen/model/terminal/TerminalEnvironment.java b/src/main/java/com/adyen/model/terminal/TerminalEnvironment.java deleted file mode 100644 index 968874014..000000000 --- a/src/main/java/com/adyen/model/terminal/TerminalEnvironment.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets TerminalEnvironment - */ -public enum TerminalEnvironment { - - ATTENDED("Attended"), - - SEMIATTENDED("SemiAttended"), - - UNATTENDED("Unattended"); - - private String value; - - TerminalEnvironment(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TerminalEnvironment fromValue(String value) { - for (TerminalEnvironment b : TerminalEnvironment.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/TokenRequestedType.java b/src/main/java/com/adyen/model/terminal/TokenRequestedType.java deleted file mode 100644 index 1fb49ca78..000000000 --- a/src/main/java/com/adyen/model/terminal/TokenRequestedType.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets TokenRequestedType - */ -public enum TokenRequestedType { - - CUSTOMER("Customer"), - - TRANSACTION("Transaction"); - - private String value; - - TokenRequestedType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TokenRequestedType fromValue(String value) { - for (TokenRequestedType b : TokenRequestedType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/TotalFilter.java b/src/main/java/com/adyen/model/terminal/TotalFilter.java deleted file mode 100644 index 773547517..000000000 --- a/src/main/java/com/adyen/model/terminal/TotalFilter.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * TotalFilter - */ -@JsonPropertyOrder({ - TotalFilter.JSON_PROPERTY_P_O_I_I_D, - TotalFilter.JSON_PROPERTY_SALE_I_D, - TotalFilter.JSON_PROPERTY_OPERATOR_I_D, - TotalFilter.JSON_PROPERTY_SHIFT_NUMBER, - TotalFilter.JSON_PROPERTY_TOTALS_GROUP_I_D -}) - -public class TotalFilter { - public static final String JSON_PROPERTY_P_O_I_I_D = "POIID"; - private String POIID; - - public static final String JSON_PROPERTY_SALE_I_D = "SaleID"; - private String saleID; - - public static final String JSON_PROPERTY_OPERATOR_I_D = "OperatorID"; - private String operatorID; - - public static final String JSON_PROPERTY_SHIFT_NUMBER = "ShiftNumber"; - private String shiftNumber; - - public static final String JSON_PROPERTY_TOTALS_GROUP_I_D = "TotalsGroupID"; - private String totalsGroupID; - - public TotalFilter() { - } - - public TotalFilter POIID(String POIID) { - this.POIID = POIID; - return this; - } - - /** - * Get POIID - * @return POIID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_P_O_I_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPOIID() { - return POIID; - } - - - /** - * POIID - * - * @param POIID - */ - @JsonProperty(JSON_PROPERTY_P_O_I_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPOIID(String POIID) { - this.POIID = POIID; - } - - - public TotalFilter saleID(String saleID) { - this.saleID = saleID; - return this; - } - - /** - * Get saleID - * @return saleID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SALE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSaleID() { - return saleID; - } - - - /** - * saleID - * - * @param saleID - */ - @JsonProperty(JSON_PROPERTY_SALE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleID(String saleID) { - this.saleID = saleID; - } - - - public TotalFilter operatorID(String operatorID) { - this.operatorID = operatorID; - return this; - } - - /** - * Get operatorID - * @return operatorID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_OPERATOR_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getOperatorID() { - return operatorID; - } - - - /** - * operatorID - * - * @param operatorID - */ - @JsonProperty(JSON_PROPERTY_OPERATOR_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOperatorID(String operatorID) { - this.operatorID = operatorID; - } - - - public TotalFilter shiftNumber(String shiftNumber) { - this.shiftNumber = shiftNumber; - return this; - } - - /** - * Get shiftNumber - * @return shiftNumber - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SHIFT_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getShiftNumber() { - return shiftNumber; - } - - - /** - * shiftNumber - * - * @param shiftNumber - */ - @JsonProperty(JSON_PROPERTY_SHIFT_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShiftNumber(String shiftNumber) { - this.shiftNumber = shiftNumber; - } - - - public TotalFilter totalsGroupID(String totalsGroupID) { - this.totalsGroupID = totalsGroupID; - return this; - } - - /** - * Get totalsGroupID - * @return totalsGroupID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TOTALS_GROUP_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getTotalsGroupID() { - return totalsGroupID; - } - - - /** - * totalsGroupID - * - * @param totalsGroupID - */ - @JsonProperty(JSON_PROPERTY_TOTALS_GROUP_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotalsGroupID(String totalsGroupID) { - this.totalsGroupID = totalsGroupID; - } - - - /** - * Return true if this TotalFilter object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TotalFilter totalFilter = (TotalFilter) o; - return Objects.equals(this.POIID, totalFilter.POIID) && - Objects.equals(this.saleID, totalFilter.saleID) && - Objects.equals(this.operatorID, totalFilter.operatorID) && - Objects.equals(this.shiftNumber, totalFilter.shiftNumber) && - Objects.equals(this.totalsGroupID, totalFilter.totalsGroupID); - } - - @Override - public int hashCode() { - return Objects.hash(POIID, saleID, operatorID, shiftNumber, totalsGroupID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TotalFilter {\n"); - sb.append(" POIID: ").append(toIndentedString(POIID)).append("\n"); - sb.append(" saleID: ").append(toIndentedString(saleID)).append("\n"); - sb.append(" operatorID: ").append(toIndentedString(operatorID)).append("\n"); - sb.append(" shiftNumber: ").append(toIndentedString(shiftNumber)).append("\n"); - sb.append(" totalsGroupID: ").append(toIndentedString(totalsGroupID)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of TotalFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of TotalFilter - * @throws JsonProcessingException if the JSON string is invalid with respect to TotalFilter - */ - public static TotalFilter fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, TotalFilter.class); - } -/** - * Convert an instance of TotalFilter to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/TrackData.java b/src/main/java/com/adyen/model/terminal/TrackData.java deleted file mode 100644 index 104c3de01..000000000 --- a/src/main/java/com/adyen/model/terminal/TrackData.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.TrackFormat; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * ISO 7813 - ISO 4909. Generic data structure for a card track, used when the magstripe card reader is located on the Sale Terminal, or for magstripe Card Reader device request. The data structure is also used to store the line at the bottom of a bank check. Magnetic track or magnetic ink characters line. - */ -@ApiModel(description = "ISO 7813 - ISO 4909. Generic data structure for a card track, used when the magstripe card reader is located on the Sale Terminal, or for magstripe Card Reader device request. The data structure is also used to store the line at the bottom of a bank check. Magnetic track or magnetic ink characters line.") -@JsonPropertyOrder({ - TrackData.JSON_PROPERTY_TRACK_NUMB, - TrackData.JSON_PROPERTY_TRACK_FORMAT, - TrackData.JSON_PROPERTY_TRACK_VALUE -}) - -public class TrackData { - public static final String JSON_PROPERTY_TRACK_NUMB = "TrackNumb"; - private Integer trackNumb = 2; - - public static final String JSON_PROPERTY_TRACK_FORMAT = "TrackFormat"; - private TrackFormat trackFormat; - - public static final String JSON_PROPERTY_TRACK_VALUE = "TrackValue"; - private String trackValue; - - public TrackData() { - } - - public TrackData trackNumb(Integer trackNumb) { - this.trackNumb = trackNumb; - return this; - } - - /** - * Get trackNumb - * minimum: 1 - * maximum: 3 - * @return trackNumb - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TRACK_NUMB) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getTrackNumb() { - return trackNumb; - } - - - /** - * trackNumb - * - * @param trackNumb - */ - @JsonProperty(JSON_PROPERTY_TRACK_NUMB) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTrackNumb(Integer trackNumb) { - this.trackNumb = trackNumb; - } - - - public TrackData trackFormat(TrackFormat trackFormat) { - this.trackFormat = trackFormat; - return this; - } - - /** - * Get trackFormat - * @return trackFormat - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TRACK_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TrackFormat getTrackFormat() { - return trackFormat; - } - - - /** - * trackFormat - * - * @param trackFormat - */ - @JsonProperty(JSON_PROPERTY_TRACK_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTrackFormat(TrackFormat trackFormat) { - this.trackFormat = trackFormat; - } - - - public TrackData trackValue(String trackValue) { - this.trackValue = trackValue; - return this; - } - - /** - * Get trackValue - * @return trackValue - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_TRACK_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getTrackValue() { - return trackValue; - } - - - /** - * trackValue - * - * @param trackValue - */ - @JsonProperty(JSON_PROPERTY_TRACK_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTrackValue(String trackValue) { - this.trackValue = trackValue; - } - - - /** - * Return true if this TrackData object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TrackData trackData = (TrackData) o; - return Objects.equals(this.trackNumb, trackData.trackNumb) && - Objects.equals(this.trackFormat, trackData.trackFormat) && - Objects.equals(this.trackValue, trackData.trackValue); - } - - @Override - public int hashCode() { - return Objects.hash(trackNumb, trackFormat, trackValue); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TrackData {\n"); - sb.append(" trackNumb: ").append(toIndentedString(trackNumb)).append("\n"); - sb.append(" trackFormat: ").append(toIndentedString(trackFormat)).append("\n"); - sb.append(" trackValue: ").append(toIndentedString(trackValue)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of TrackData given an JSON string - * - * @param jsonString JSON string - * @return An instance of TrackData - * @throws JsonProcessingException if the JSON string is invalid with respect to TrackData - */ - public static TrackData fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, TrackData.class); - } -/** - * Convert an instance of TrackData to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/TrackFormat.java b/src/main/java/com/adyen/model/terminal/TrackFormat.java deleted file mode 100644 index f29905d6a..000000000 --- a/src/main/java/com/adyen/model/terminal/TrackFormat.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets TrackFormat - */ -public enum TrackFormat { - - AAMVA("AAMVA"), - - ISO("ISO"); - - private String value; - - TrackFormat(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TrackFormat fromValue(String value) { - for (TrackFormat b : TrackFormat.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/TransactionAction.java b/src/main/java/com/adyen/model/terminal/TransactionAction.java deleted file mode 100644 index 8d49fa581..000000000 --- a/src/main/java/com/adyen/model/terminal/TransactionAction.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import io.swagger.annotations.ApiModel; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Action to realise on a transaction. - */ -public enum TransactionAction { - - ABORTTRANSACTION("AbortTransaction"), - - STARTTRANSACTION("StartTransaction"); - - private String value; - - TransactionAction(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TransactionAction fromValue(String value) { - for (TransactionAction b : TransactionAction.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/TransactionConditions.java b/src/main/java/com/adyen/model/terminal/TransactionConditions.java deleted file mode 100644 index ed2eb655c..000000000 --- a/src/main/java/com/adyen/model/terminal/TransactionConditions.java +++ /dev/null @@ -1,510 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyHandling; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Conditions on which the transaction must be processed. - */ -@ApiModel(description = "Conditions on which the transaction must be processed.") -@JsonPropertyOrder({ - TransactionConditions.JSON_PROPERTY_ALLOWED_PAYMENT_BRAND, - TransactionConditions.JSON_PROPERTY_ACQUIRER_I_D, - TransactionConditions.JSON_PROPERTY_DEBIT_PREFERRED_FLAG, - TransactionConditions.JSON_PROPERTY_ALLOWED_LOYALTY_BRAND, - TransactionConditions.JSON_PROPERTY_LOYALTY_HANDLING, - TransactionConditions.JSON_PROPERTY_CUSTOMER_LANGUAGE, - TransactionConditions.JSON_PROPERTY_FORCE_ONLINE_FLAG, - TransactionConditions.JSON_PROPERTY_FORCE_ENTRY_MODE, - TransactionConditions.JSON_PROPERTY_MERCHANT_CATEGORY_CODE -}) - -public class TransactionConditions { - public static final String JSON_PROPERTY_ALLOWED_PAYMENT_BRAND = "AllowedPaymentBrand"; - private List allowedPaymentBrand = null; - - public static final String JSON_PROPERTY_ACQUIRER_I_D = "AcquirerID"; - private List acquirerID = null; - - public static final String JSON_PROPERTY_DEBIT_PREFERRED_FLAG = "DebitPreferredFlag"; - private Boolean debitPreferredFlag; - - public static final String JSON_PROPERTY_ALLOWED_LOYALTY_BRAND = "AllowedLoyaltyBrand"; - private List allowedLoyaltyBrand = null; - - public static final String JSON_PROPERTY_LOYALTY_HANDLING = "LoyaltyHandling"; - private LoyaltyHandling loyaltyHandling; - - public static final String JSON_PROPERTY_CUSTOMER_LANGUAGE = "CustomerLanguage"; - private String customerLanguage; - - public static final String JSON_PROPERTY_FORCE_ONLINE_FLAG = "ForceOnlineFlag"; - private Boolean forceOnlineFlag = false; - - /** - * Gets or Sets forceEntryMode - */ - public enum ForceEntryModeEnum { - CHECKREADER("CheckReader"), - - CONTACTLESS("Contactless"), - - FILE("File"), - - ICC("ICC"), - - KEYED("Keyed"), - - MAGSTRIPE("MagStripe"), - - MANUAL("Manual"), - - RFID("RFID"), - - SCANNED("Scanned"), - - SYNCHRONOUSICC("SynchronousICC"), - - TAPPED("Tapped"); - - private String value; - - ForceEntryModeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ForceEntryModeEnum fromValue(String value) { - for (ForceEntryModeEnum b : ForceEntryModeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_FORCE_ENTRY_MODE = "ForceEntryMode"; - private List forceEntryMode = null; - - public static final String JSON_PROPERTY_MERCHANT_CATEGORY_CODE = "MerchantCategoryCode"; - private String merchantCategoryCode; - - public TransactionConditions() { - } - - public TransactionConditions allowedPaymentBrand(List allowedPaymentBrand) { - this.allowedPaymentBrand = allowedPaymentBrand; - return this; - } - - public TransactionConditions addAllowedPaymentBrandItem(String allowedPaymentBrandItem) { - if (this.allowedPaymentBrand == null) { - this.allowedPaymentBrand = new ArrayList<>(); - } - this.allowedPaymentBrand.add(allowedPaymentBrandItem); - return this; - } - - /** - * Get allowedPaymentBrand - * @return allowedPaymentBrand - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ALLOWED_PAYMENT_BRAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getAllowedPaymentBrand() { - return allowedPaymentBrand; - } - - - /** - * allowedPaymentBrand - * - * @param allowedPaymentBrand - */ - @JsonProperty(JSON_PROPERTY_ALLOWED_PAYMENT_BRAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowedPaymentBrand(List allowedPaymentBrand) { - this.allowedPaymentBrand = allowedPaymentBrand; - } - - - public TransactionConditions acquirerID(List acquirerID) { - this.acquirerID = acquirerID; - return this; - } - - public TransactionConditions addAcquirerIDItem(Integer acquirerIDItem) { - if (this.acquirerID == null) { - this.acquirerID = new ArrayList<>(); - } - this.acquirerID.add(acquirerIDItem); - return this; - } - - /** - * Get acquirerID - * @return acquirerID - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ACQUIRER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getAcquirerID() { - return acquirerID; - } - - - /** - * acquirerID - * - * @param acquirerID - */ - @JsonProperty(JSON_PROPERTY_ACQUIRER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAcquirerID(List acquirerID) { - this.acquirerID = acquirerID; - } - - - public TransactionConditions debitPreferredFlag(Boolean debitPreferredFlag) { - this.debitPreferredFlag = debitPreferredFlag; - return this; - } - - /** - * The preferred type of payment is a debit transaction rather a credit transaction. - * @return debitPreferredFlag - **/ - @ApiModelProperty(value = "The preferred type of payment is a debit transaction rather a credit transaction.") - @JsonProperty(JSON_PROPERTY_DEBIT_PREFERRED_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDebitPreferredFlag() { - return debitPreferredFlag; - } - - - /** - * The preferred type of payment is a debit transaction rather a credit transaction. - * - * @param debitPreferredFlag - */ - @JsonProperty(JSON_PROPERTY_DEBIT_PREFERRED_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDebitPreferredFlag(Boolean debitPreferredFlag) { - this.debitPreferredFlag = debitPreferredFlag; - } - - - public TransactionConditions allowedLoyaltyBrand(List allowedLoyaltyBrand) { - this.allowedLoyaltyBrand = allowedLoyaltyBrand; - return this; - } - - public TransactionConditions addAllowedLoyaltyBrandItem(String allowedLoyaltyBrandItem) { - if (this.allowedLoyaltyBrand == null) { - this.allowedLoyaltyBrand = new ArrayList<>(); - } - this.allowedLoyaltyBrand.add(allowedLoyaltyBrandItem); - return this; - } - - /** - * Get allowedLoyaltyBrand - * @return allowedLoyaltyBrand - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ALLOWED_LOYALTY_BRAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getAllowedLoyaltyBrand() { - return allowedLoyaltyBrand; - } - - - /** - * allowedLoyaltyBrand - * - * @param allowedLoyaltyBrand - */ - @JsonProperty(JSON_PROPERTY_ALLOWED_LOYALTY_BRAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowedLoyaltyBrand(List allowedLoyaltyBrand) { - this.allowedLoyaltyBrand = allowedLoyaltyBrand; - } - - - public TransactionConditions loyaltyHandling(LoyaltyHandling loyaltyHandling) { - this.loyaltyHandling = loyaltyHandling; - return this; - } - - /** - * Get loyaltyHandling - * @return loyaltyHandling - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_HANDLING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyHandling getLoyaltyHandling() { - return loyaltyHandling; - } - - - /** - * loyaltyHandling - * - * @param loyaltyHandling - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_HANDLING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyHandling(LoyaltyHandling loyaltyHandling) { - this.loyaltyHandling = loyaltyHandling; - } - - - public TransactionConditions customerLanguage(String customerLanguage) { - this.customerLanguage = customerLanguage; - return this; - } - - /** - * If the language is selected by the Sale System before the request to the POI. - * @return customerLanguage - **/ - @ApiModelProperty(value = "If the language is selected by the Sale System before the request to the POI.") - @JsonProperty(JSON_PROPERTY_CUSTOMER_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCustomerLanguage() { - return customerLanguage; - } - - - /** - * If the language is selected by the Sale System before the request to the POI. - * - * @param customerLanguage - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_LANGUAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerLanguage(String customerLanguage) { - this.customerLanguage = customerLanguage; - } - - - public TransactionConditions forceOnlineFlag(Boolean forceOnlineFlag) { - this.forceOnlineFlag = forceOnlineFlag; - return this; - } - - /** - * Go online if data sent. - * @return forceOnlineFlag - **/ - @ApiModelProperty(value = "Go online if data sent.") - @JsonProperty(JSON_PROPERTY_FORCE_ONLINE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getForceOnlineFlag() { - return forceOnlineFlag; - } - - - /** - * Go online if data sent. - * - * @param forceOnlineFlag - */ - @JsonProperty(JSON_PROPERTY_FORCE_ONLINE_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceOnlineFlag(Boolean forceOnlineFlag) { - this.forceOnlineFlag = forceOnlineFlag; - } - - - public TransactionConditions forceEntryMode(List forceEntryMode) { - this.forceEntryMode = forceEntryMode; - return this; - } - - public TransactionConditions addForceEntryModeItem(ForceEntryModeEnum forceEntryModeItem) { - if (this.forceEntryMode == null) { - this.forceEntryMode = new ArrayList<>(); - } - this.forceEntryMode.add(forceEntryModeItem); - return this; - } - - /** - * Get forceEntryMode - * @return forceEntryMode - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FORCE_ENTRY_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getForceEntryMode() { - return forceEntryMode; - } - - - /** - * forceEntryMode - * - * @param forceEntryMode - */ - @JsonProperty(JSON_PROPERTY_FORCE_ENTRY_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceEntryMode(List forceEntryMode) { - this.forceEntryMode = forceEntryMode; - } - - - public TransactionConditions merchantCategoryCode(String merchantCategoryCode) { - this.merchantCategoryCode = merchantCategoryCode; - return this; - } - - /** - * The payment implies a specific MCC. - * @return merchantCategoryCode - **/ - @ApiModelProperty(value = "The payment implies a specific MCC.") - @JsonProperty(JSON_PROPERTY_MERCHANT_CATEGORY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getMerchantCategoryCode() { - return merchantCategoryCode; - } - - - /** - * The payment implies a specific MCC. - * - * @param merchantCategoryCode - */ - @JsonProperty(JSON_PROPERTY_MERCHANT_CATEGORY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMerchantCategoryCode(String merchantCategoryCode) { - this.merchantCategoryCode = merchantCategoryCode; - } - - - /** - * Return true if this TransactionConditions object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TransactionConditions transactionConditions = (TransactionConditions) o; - return Objects.equals(this.allowedPaymentBrand, transactionConditions.allowedPaymentBrand) && - Objects.equals(this.acquirerID, transactionConditions.acquirerID) && - Objects.equals(this.debitPreferredFlag, transactionConditions.debitPreferredFlag) && - Objects.equals(this.allowedLoyaltyBrand, transactionConditions.allowedLoyaltyBrand) && - Objects.equals(this.loyaltyHandling, transactionConditions.loyaltyHandling) && - Objects.equals(this.customerLanguage, transactionConditions.customerLanguage) && - Objects.equals(this.forceOnlineFlag, transactionConditions.forceOnlineFlag) && - Objects.equals(this.forceEntryMode, transactionConditions.forceEntryMode) && - Objects.equals(this.merchantCategoryCode, transactionConditions.merchantCategoryCode); - } - - @Override - public int hashCode() { - return Objects.hash(allowedPaymentBrand, acquirerID, debitPreferredFlag, allowedLoyaltyBrand, loyaltyHandling, customerLanguage, forceOnlineFlag, forceEntryMode, merchantCategoryCode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TransactionConditions {\n"); - sb.append(" allowedPaymentBrand: ").append(toIndentedString(allowedPaymentBrand)).append("\n"); - sb.append(" acquirerID: ").append(toIndentedString(acquirerID)).append("\n"); - sb.append(" debitPreferredFlag: ").append(toIndentedString(debitPreferredFlag)).append("\n"); - sb.append(" allowedLoyaltyBrand: ").append(toIndentedString(allowedLoyaltyBrand)).append("\n"); - sb.append(" loyaltyHandling: ").append(toIndentedString(loyaltyHandling)).append("\n"); - sb.append(" customerLanguage: ").append(toIndentedString(customerLanguage)).append("\n"); - sb.append(" forceOnlineFlag: ").append(toIndentedString(forceOnlineFlag)).append("\n"); - sb.append(" forceEntryMode: ").append(toIndentedString(forceEntryMode)).append("\n"); - sb.append(" merchantCategoryCode: ").append(toIndentedString(merchantCategoryCode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of TransactionConditions given an JSON string - * - * @param jsonString JSON string - * @return An instance of TransactionConditions - * @throws JsonProcessingException if the JSON string is invalid with respect to TransactionConditions - */ - public static TransactionConditions fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, TransactionConditions.class); - } -/** - * Convert an instance of TransactionConditions to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/TransactionIDType.java b/src/main/java/com/adyen/model/terminal/TransactionIDType.java deleted file mode 100644 index fdbc052cf..000000000 --- a/src/main/java/com/adyen/model/terminal/TransactionIDType.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.time.OffsetDateTime; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * Identification of a transaction for the Sale System or the POI System. - */ -@ApiModel(description = "Identification of a transaction for the Sale System or the POI System.") -@JsonPropertyOrder({ - TransactionIDType.JSON_PROPERTY_TRANSACTION_I_D, - TransactionIDType.JSON_PROPERTY_TIME_STAMP -}) - -public class TransactionIDType { - public static final String JSON_PROPERTY_TRANSACTION_I_D = "TransactionID"; - private String transactionID; - - public static final String JSON_PROPERTY_TIME_STAMP = "TimeStamp"; - private OffsetDateTime timeStamp; - - public TransactionIDType() { - } - - public TransactionIDType transactionID(String transactionID) { - this.transactionID = transactionID; - return this; - } - - /** - * Get transactionID - * @return transactionID - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_TRANSACTION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getTransactionID() { - return transactionID; - } - - - /** - * transactionID - * - * @param transactionID - */ - @JsonProperty(JSON_PROPERTY_TRANSACTION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransactionID(String transactionID) { - this.transactionID = transactionID; - } - - - public TransactionIDType timeStamp(OffsetDateTime timeStamp) { - this.timeStamp = timeStamp; - return this; - } - - /** - * Get timeStamp - * @return timeStamp - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_TIME_STAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OffsetDateTime getTimeStamp() { - return timeStamp; - } - - - /** - * timeStamp - * - * @param timeStamp - */ - @JsonProperty(JSON_PROPERTY_TIME_STAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTimeStamp(OffsetDateTime timeStamp) { - this.timeStamp = timeStamp; - } - - - /** - * Return true if this TransactionIDType object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TransactionIDType transactionIDType = (TransactionIDType) o; - return Objects.equals(this.transactionID, transactionIDType.transactionID) && - Objects.equals(this.timeStamp, transactionIDType.timeStamp); - } - - @Override - public int hashCode() { - return Objects.hash(transactionID, timeStamp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TransactionIDType {\n"); - sb.append(" transactionID: ").append(toIndentedString(transactionID)).append("\n"); - sb.append(" timeStamp: ").append(toIndentedString(timeStamp)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of TransactionIDType given an JSON string - * - * @param jsonString JSON string - * @return An instance of TransactionIDType - * @throws JsonProcessingException if the JSON string is invalid with respect to TransactionIDType - */ - public static TransactionIDType fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, TransactionIDType.class); - } -/** - * Convert an instance of TransactionIDType to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/TransactionStatusRequest.java b/src/main/java/com/adyen/model/terminal/TransactionStatusRequest.java deleted file mode 100644 index 1a22f90da..000000000 --- a/src/main/java/com/adyen/model/terminal/TransactionStatusRequest.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.DocumentQualifier; -import com.adyen.model.terminal.MessageReference; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information requested for status of the last or current Payment, Loyalty or Reversal transaction. Content of the TransactionStatus Request message. - */ -@ApiModel(description = "It conveys Information requested for status of the last or current Payment, Loyalty or Reversal transaction. Content of the TransactionStatus Request message.") -@JsonPropertyOrder({ - TransactionStatusRequest.JSON_PROPERTY_MESSAGE_REFERENCE, - TransactionStatusRequest.JSON_PROPERTY_RECEIPT_REPRINT_FLAG, - TransactionStatusRequest.JSON_PROPERTY_DOCUMENT_QUALIFIER -}) - -public class TransactionStatusRequest { - public static final String JSON_PROPERTY_MESSAGE_REFERENCE = "MessageReference"; - private MessageReference messageReference; - - public static final String JSON_PROPERTY_RECEIPT_REPRINT_FLAG = "ReceiptReprintFlag"; - private Boolean receiptReprintFlag = false; - - public static final String JSON_PROPERTY_DOCUMENT_QUALIFIER = "DocumentQualifier"; - private List documentQualifier = null; - - public TransactionStatusRequest() { - } - - public TransactionStatusRequest messageReference(MessageReference messageReference) { - this.messageReference = messageReference; - return this; - } - - /** - * Get messageReference - * @return messageReference - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MESSAGE_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public MessageReference getMessageReference() { - return messageReference; - } - - - /** - * messageReference - * - * @param messageReference - */ - @JsonProperty(JSON_PROPERTY_MESSAGE_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessageReference(MessageReference messageReference) { - this.messageReference = messageReference; - } - - - public TransactionStatusRequest receiptReprintFlag(Boolean receiptReprintFlag) { - this.receiptReprintFlag = receiptReprintFlag; - return this; - } - - /** - * Request to reprint the POI receipt(s). - * @return receiptReprintFlag - **/ - @ApiModelProperty(value = "Request to reprint the POI receipt(s).") - @JsonProperty(JSON_PROPERTY_RECEIPT_REPRINT_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getReceiptReprintFlag() { - return receiptReprintFlag; - } - - - /** - * Request to reprint the POI receipt(s). - * - * @param receiptReprintFlag - */ - @JsonProperty(JSON_PROPERTY_RECEIPT_REPRINT_FLAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReceiptReprintFlag(Boolean receiptReprintFlag) { - this.receiptReprintFlag = receiptReprintFlag; - } - - - public TransactionStatusRequest documentQualifier(List documentQualifier) { - this.documentQualifier = documentQualifier; - return this; - } - - public TransactionStatusRequest addDocumentQualifierItem(DocumentQualifier documentQualifierItem) { - if (this.documentQualifier == null) { - this.documentQualifier = new ArrayList<>(); - } - this.documentQualifier.add(documentQualifierItem); - return this; - } - - /** - * Get documentQualifier - * @return documentQualifier - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DOCUMENT_QUALIFIER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getDocumentQualifier() { - return documentQualifier; - } - - - /** - * documentQualifier - * - * @param documentQualifier - */ - @JsonProperty(JSON_PROPERTY_DOCUMENT_QUALIFIER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDocumentQualifier(List documentQualifier) { - this.documentQualifier = documentQualifier; - } - - - /** - * Return true if this TransactionStatusRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TransactionStatusRequest transactionStatusRequest = (TransactionStatusRequest) o; - return Objects.equals(this.messageReference, transactionStatusRequest.messageReference) && - Objects.equals(this.receiptReprintFlag, transactionStatusRequest.receiptReprintFlag) && - Objects.equals(this.documentQualifier, transactionStatusRequest.documentQualifier); - } - - @Override - public int hashCode() { - return Objects.hash(messageReference, receiptReprintFlag, documentQualifier); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TransactionStatusRequest {\n"); - sb.append(" messageReference: ").append(toIndentedString(messageReference)).append("\n"); - sb.append(" receiptReprintFlag: ").append(toIndentedString(receiptReprintFlag)).append("\n"); - sb.append(" documentQualifier: ").append(toIndentedString(documentQualifier)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of TransactionStatusRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of TransactionStatusRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to TransactionStatusRequest - */ - public static TransactionStatusRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, TransactionStatusRequest.class); - } -/** - * Convert an instance of TransactionStatusRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/TransactionStatusResponse.java b/src/main/java/com/adyen/model/terminal/TransactionStatusResponse.java deleted file mode 100644 index 65d7a1663..000000000 --- a/src/main/java/com/adyen/model/terminal/TransactionStatusResponse.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.MessageReference; -import com.adyen.model.terminal.RepeatedMessageResponse; -import com.adyen.model.terminal.Response; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * It conveys Information related to the status of the last or current Payment, Loyalty or Reversal transaction. Content of the TransactionStatus Response message. - */ -@ApiModel(description = "It conveys Information related to the status of the last or current Payment, Loyalty or Reversal transaction. Content of the TransactionStatus Response message.") -@JsonPropertyOrder({ - TransactionStatusResponse.JSON_PROPERTY_RESPONSE, - TransactionStatusResponse.JSON_PROPERTY_MESSAGE_REFERENCE, - TransactionStatusResponse.JSON_PROPERTY_REPEATED_MESSAGE_RESPONSE -}) - -public class TransactionStatusResponse { - public static final String JSON_PROPERTY_RESPONSE = "Response"; - private Response response; - - public static final String JSON_PROPERTY_MESSAGE_REFERENCE = "MessageReference"; - private MessageReference messageReference; - - public static final String JSON_PROPERTY_REPEATED_MESSAGE_RESPONSE = "RepeatedMessageResponse"; - private RepeatedMessageResponse repeatedMessageResponse; - - public TransactionStatusResponse() { - } - - public TransactionStatusResponse response(Response response) { - this.response = response; - return this; - } - - /** - * Get response - * @return response - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Response getResponse() { - return response; - } - - - /** - * response - * - * @param response - */ - @JsonProperty(JSON_PROPERTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponse(Response response) { - this.response = response; - } - - - public TransactionStatusResponse messageReference(MessageReference messageReference) { - this.messageReference = messageReference; - return this; - } - - /** - * Get messageReference - * @return messageReference - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MESSAGE_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public MessageReference getMessageReference() { - return messageReference; - } - - - /** - * messageReference - * - * @param messageReference - */ - @JsonProperty(JSON_PROPERTY_MESSAGE_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessageReference(MessageReference messageReference) { - this.messageReference = messageReference; - } - - - public TransactionStatusResponse repeatedMessageResponse(RepeatedMessageResponse repeatedMessageResponse) { - this.repeatedMessageResponse = repeatedMessageResponse; - return this; - } - - /** - * Get repeatedMessageResponse - * @return repeatedMessageResponse - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_REPEATED_MESSAGE_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public RepeatedMessageResponse getRepeatedMessageResponse() { - return repeatedMessageResponse; - } - - - /** - * repeatedMessageResponse - * - * @param repeatedMessageResponse - */ - @JsonProperty(JSON_PROPERTY_REPEATED_MESSAGE_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRepeatedMessageResponse(RepeatedMessageResponse repeatedMessageResponse) { - this.repeatedMessageResponse = repeatedMessageResponse; - } - - - /** - * Return true if this TransactionStatusResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TransactionStatusResponse transactionStatusResponse = (TransactionStatusResponse) o; - return Objects.equals(this.response, transactionStatusResponse.response) && - Objects.equals(this.messageReference, transactionStatusResponse.messageReference) && - Objects.equals(this.repeatedMessageResponse, transactionStatusResponse.repeatedMessageResponse); - } - - @Override - public int hashCode() { - return Objects.hash(response, messageReference, repeatedMessageResponse); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TransactionStatusResponse {\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append(" messageReference: ").append(toIndentedString(messageReference)).append("\n"); - sb.append(" repeatedMessageResponse: ").append(toIndentedString(repeatedMessageResponse)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of TransactionStatusResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of TransactionStatusResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to TransactionStatusResponse - */ - public static TransactionStatusResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, TransactionStatusResponse.class); - } -/** - * Convert an instance of TransactionStatusResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/TransactionTotals.java b/src/main/java/com/adyen/model/terminal/TransactionTotals.java deleted file mode 100644 index 626a50909..000000000 --- a/src/main/java/com/adyen/model/terminal/TransactionTotals.java +++ /dev/null @@ -1,624 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.terminal.LoyaltyTotals; -import com.adyen.model.terminal.LoyaltyUnit; -import com.adyen.model.terminal.PaymentInstrumentType; -import com.adyen.model.terminal.PaymentTotals; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * If Result is Success, contains all the totals, classified as required by the Sale in the message request. At least, transaction totals are provided per Acquirer, Acquirer Settlement, and Card Brand. Result of the Sale to POI Reconciliation processing. - */ -@ApiModel(description = "If Result is Success, contains all the totals, classified as required by the Sale in the message request. At least, transaction totals are provided per Acquirer, Acquirer Settlement, and Card Brand. Result of the Sale to POI Reconciliation processing.") -@JsonPropertyOrder({ - TransactionTotals.JSON_PROPERTY_PAYMENT_INSTRUMENT_TYPE, - TransactionTotals.JSON_PROPERTY_ACQUIRER_I_D, - TransactionTotals.JSON_PROPERTY_HOST_RECONCILIATION_I_D, - TransactionTotals.JSON_PROPERTY_CARD_BRAND, - TransactionTotals.JSON_PROPERTY_P_O_I_I_D, - TransactionTotals.JSON_PROPERTY_SALE_I_D, - TransactionTotals.JSON_PROPERTY_OPERATOR_I_D, - TransactionTotals.JSON_PROPERTY_SHIFT_NUMBER, - TransactionTotals.JSON_PROPERTY_TOTALS_GROUP_I_D, - TransactionTotals.JSON_PROPERTY_PAYMENT_CURRENCY, - TransactionTotals.JSON_PROPERTY_PAYMENT_TOTALS, - TransactionTotals.JSON_PROPERTY_LOYALTY_UNIT, - TransactionTotals.JSON_PROPERTY_LOYALTY_CURRENCY, - TransactionTotals.JSON_PROPERTY_LOYALTY_TOTALS -}) - -public class TransactionTotals { - public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_TYPE = "PaymentInstrumentType"; - private PaymentInstrumentType paymentInstrumentType; - - public static final String JSON_PROPERTY_ACQUIRER_I_D = "AcquirerID"; - private Integer acquirerID; - - public static final String JSON_PROPERTY_HOST_RECONCILIATION_I_D = "HostReconciliationID"; - private String hostReconciliationID; - - public static final String JSON_PROPERTY_CARD_BRAND = "CardBrand"; - private String cardBrand; - - public static final String JSON_PROPERTY_P_O_I_I_D = "POIID"; - private String POIID; - - public static final String JSON_PROPERTY_SALE_I_D = "SaleID"; - private String saleID; - - public static final String JSON_PROPERTY_OPERATOR_I_D = "OperatorID"; - private String operatorID; - - public static final String JSON_PROPERTY_SHIFT_NUMBER = "ShiftNumber"; - private String shiftNumber; - - public static final String JSON_PROPERTY_TOTALS_GROUP_I_D = "TotalsGroupID"; - private String totalsGroupID; - - public static final String JSON_PROPERTY_PAYMENT_CURRENCY = "PaymentCurrency"; - private String paymentCurrency; - - public static final String JSON_PROPERTY_PAYMENT_TOTALS = "PaymentTotals"; - private List paymentTotals = null; - - public static final String JSON_PROPERTY_LOYALTY_UNIT = "LoyaltyUnit"; - private LoyaltyUnit loyaltyUnit; - - public static final String JSON_PROPERTY_LOYALTY_CURRENCY = "LoyaltyCurrency"; - private String loyaltyCurrency; - - public static final String JSON_PROPERTY_LOYALTY_TOTALS = "LoyaltyTotals"; - private List loyaltyTotals = null; - - public TransactionTotals() { - } - - public TransactionTotals paymentInstrumentType(PaymentInstrumentType paymentInstrumentType) { - this.paymentInstrumentType = paymentInstrumentType; - return this; - } - - /** - * Get paymentInstrumentType - * @return paymentInstrumentType - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentInstrumentType getPaymentInstrumentType() { - return paymentInstrumentType; - } - - - /** - * paymentInstrumentType - * - * @param paymentInstrumentType - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentInstrumentType(PaymentInstrumentType paymentInstrumentType) { - this.paymentInstrumentType = paymentInstrumentType; - } - - - public TransactionTotals acquirerID(Integer acquirerID) { - this.acquirerID = acquirerID; - return this; - } - - /** - * If available. - * @return acquirerID - **/ - @ApiModelProperty(value = "If available.") - @JsonProperty(JSON_PROPERTY_ACQUIRER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getAcquirerID() { - return acquirerID; - } - - - /** - * If available. - * - * @param acquirerID - */ - @JsonProperty(JSON_PROPERTY_ACQUIRER_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAcquirerID(Integer acquirerID) { - this.acquirerID = acquirerID; - } - - - public TransactionTotals hostReconciliationID(String hostReconciliationID) { - this.hostReconciliationID = hostReconciliationID; - return this; - } - - /** - * If available. - * @return hostReconciliationID - **/ - @ApiModelProperty(value = "If available.") - @JsonProperty(JSON_PROPERTY_HOST_RECONCILIATION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getHostReconciliationID() { - return hostReconciliationID; - } - - - /** - * If available. - * - * @param hostReconciliationID - */ - @JsonProperty(JSON_PROPERTY_HOST_RECONCILIATION_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHostReconciliationID(String hostReconciliationID) { - this.hostReconciliationID = hostReconciliationID; - } - - - public TransactionTotals cardBrand(String cardBrand) { - this.cardBrand = cardBrand; - return this; - } - - /** - * If configured to present totals per card brand, and Response.Result is Success. - * @return cardBrand - **/ - @ApiModelProperty(value = "If configured to present totals per card brand, and Response.Result is Success.") - @JsonProperty(JSON_PROPERTY_CARD_BRAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCardBrand() { - return cardBrand; - } - - - /** - * If configured to present totals per card brand, and Response.Result is Success. - * - * @param cardBrand - */ - @JsonProperty(JSON_PROPERTY_CARD_BRAND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCardBrand(String cardBrand) { - this.cardBrand = cardBrand; - } - - - public TransactionTotals POIID(String POIID) { - this.POIID = POIID; - return this; - } - - /** - * If requested in the message request. - * @return POIID - **/ - @ApiModelProperty(value = "If requested in the message request.") - @JsonProperty(JSON_PROPERTY_P_O_I_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPOIID() { - return POIID; - } - - - /** - * If requested in the message request. - * - * @param POIID - */ - @JsonProperty(JSON_PROPERTY_P_O_I_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPOIID(String POIID) { - this.POIID = POIID; - } - - - public TransactionTotals saleID(String saleID) { - this.saleID = saleID; - return this; - } - - /** - * If requested in the message request. - * @return saleID - **/ - @ApiModelProperty(value = "If requested in the message request.") - @JsonProperty(JSON_PROPERTY_SALE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSaleID() { - return saleID; - } - - - /** - * If requested in the message request. - * - * @param saleID - */ - @JsonProperty(JSON_PROPERTY_SALE_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleID(String saleID) { - this.saleID = saleID; - } - - - public TransactionTotals operatorID(String operatorID) { - this.operatorID = operatorID; - return this; - } - - /** - * If requested in the message request. - * @return operatorID - **/ - @ApiModelProperty(value = "If requested in the message request.") - @JsonProperty(JSON_PROPERTY_OPERATOR_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getOperatorID() { - return operatorID; - } - - - /** - * If requested in the message request. - * - * @param operatorID - */ - @JsonProperty(JSON_PROPERTY_OPERATOR_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOperatorID(String operatorID) { - this.operatorID = operatorID; - } - - - public TransactionTotals shiftNumber(String shiftNumber) { - this.shiftNumber = shiftNumber; - return this; - } - - /** - * If requested in the message request. - * @return shiftNumber - **/ - @ApiModelProperty(value = "If requested in the message request.") - @JsonProperty(JSON_PROPERTY_SHIFT_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getShiftNumber() { - return shiftNumber; - } - - - /** - * If requested in the message request. - * - * @param shiftNumber - */ - @JsonProperty(JSON_PROPERTY_SHIFT_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShiftNumber(String shiftNumber) { - this.shiftNumber = shiftNumber; - } - - - public TransactionTotals totalsGroupID(String totalsGroupID) { - this.totalsGroupID = totalsGroupID; - return this; - } - - /** - * If requested in the message request. - * @return totalsGroupID - **/ - @ApiModelProperty(value = "If requested in the message request.") - @JsonProperty(JSON_PROPERTY_TOTALS_GROUP_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getTotalsGroupID() { - return totalsGroupID; - } - - - /** - * If requested in the message request. - * - * @param totalsGroupID - */ - @JsonProperty(JSON_PROPERTY_TOTALS_GROUP_I_D) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotalsGroupID(String totalsGroupID) { - this.totalsGroupID = totalsGroupID; - } - - - public TransactionTotals paymentCurrency(String paymentCurrency) { - this.paymentCurrency = paymentCurrency; - return this; - } - - /** - * Currency of a monetary amount. - * @return paymentCurrency - **/ - @ApiModelProperty(value = "Currency of a monetary amount.") - @JsonProperty(JSON_PROPERTY_PAYMENT_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPaymentCurrency() { - return paymentCurrency; - } - - - /** - * Currency of a monetary amount. - * - * @param paymentCurrency - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentCurrency(String paymentCurrency) { - this.paymentCurrency = paymentCurrency; - } - - - public TransactionTotals paymentTotals(List paymentTotals) { - this.paymentTotals = paymentTotals; - return this; - } - - public TransactionTotals addPaymentTotalsItem(PaymentTotals paymentTotalsItem) { - if (this.paymentTotals == null) { - this.paymentTotals = new ArrayList<>(); - } - this.paymentTotals.add(paymentTotalsItem); - return this; - } - - /** - * Get paymentTotals - * @return paymentTotals - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_TOTALS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPaymentTotals() { - return paymentTotals; - } - - - /** - * paymentTotals - * - * @param paymentTotals - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_TOTALS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentTotals(List paymentTotals) { - this.paymentTotals = paymentTotals; - } - - - public TransactionTotals loyaltyUnit(LoyaltyUnit loyaltyUnit) { - this.loyaltyUnit = loyaltyUnit; - return this; - } - - /** - * Get loyaltyUnit - * @return loyaltyUnit - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public LoyaltyUnit getLoyaltyUnit() { - return loyaltyUnit; - } - - - /** - * loyaltyUnit - * - * @param loyaltyUnit - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyUnit(LoyaltyUnit loyaltyUnit) { - this.loyaltyUnit = loyaltyUnit; - } - - - public TransactionTotals loyaltyCurrency(String loyaltyCurrency) { - this.loyaltyCurrency = loyaltyCurrency; - return this; - } - - /** - * If LoyaltyUnit is Monetary. - * @return loyaltyCurrency - **/ - @ApiModelProperty(value = "If LoyaltyUnit is Monetary.") - @JsonProperty(JSON_PROPERTY_LOYALTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getLoyaltyCurrency() { - return loyaltyCurrency; - } - - - /** - * If LoyaltyUnit is Monetary. - * - * @param loyaltyCurrency - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_CURRENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyCurrency(String loyaltyCurrency) { - this.loyaltyCurrency = loyaltyCurrency; - } - - - public TransactionTotals loyaltyTotals(List loyaltyTotals) { - this.loyaltyTotals = loyaltyTotals; - return this; - } - - public TransactionTotals addLoyaltyTotalsItem(LoyaltyTotals loyaltyTotalsItem) { - if (this.loyaltyTotals == null) { - this.loyaltyTotals = new ArrayList<>(); - } - this.loyaltyTotals.add(loyaltyTotalsItem); - return this; - } - - /** - * Get loyaltyTotals - * @return loyaltyTotals - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_TOTALS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getLoyaltyTotals() { - return loyaltyTotals; - } - - - /** - * loyaltyTotals - * - * @param loyaltyTotals - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_TOTALS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyTotals(List loyaltyTotals) { - this.loyaltyTotals = loyaltyTotals; - } - - - /** - * Return true if this TransactionTotals object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TransactionTotals transactionTotals = (TransactionTotals) o; - return Objects.equals(this.paymentInstrumentType, transactionTotals.paymentInstrumentType) && - Objects.equals(this.acquirerID, transactionTotals.acquirerID) && - Objects.equals(this.hostReconciliationID, transactionTotals.hostReconciliationID) && - Objects.equals(this.cardBrand, transactionTotals.cardBrand) && - Objects.equals(this.POIID, transactionTotals.POIID) && - Objects.equals(this.saleID, transactionTotals.saleID) && - Objects.equals(this.operatorID, transactionTotals.operatorID) && - Objects.equals(this.shiftNumber, transactionTotals.shiftNumber) && - Objects.equals(this.totalsGroupID, transactionTotals.totalsGroupID) && - Objects.equals(this.paymentCurrency, transactionTotals.paymentCurrency) && - Objects.equals(this.paymentTotals, transactionTotals.paymentTotals) && - Objects.equals(this.loyaltyUnit, transactionTotals.loyaltyUnit) && - Objects.equals(this.loyaltyCurrency, transactionTotals.loyaltyCurrency) && - Objects.equals(this.loyaltyTotals, transactionTotals.loyaltyTotals); - } - - @Override - public int hashCode() { - return Objects.hash(paymentInstrumentType, acquirerID, hostReconciliationID, cardBrand, POIID, saleID, operatorID, shiftNumber, totalsGroupID, paymentCurrency, paymentTotals, loyaltyUnit, loyaltyCurrency, loyaltyTotals); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TransactionTotals {\n"); - sb.append(" paymentInstrumentType: ").append(toIndentedString(paymentInstrumentType)).append("\n"); - sb.append(" acquirerID: ").append(toIndentedString(acquirerID)).append("\n"); - sb.append(" hostReconciliationID: ").append(toIndentedString(hostReconciliationID)).append("\n"); - sb.append(" cardBrand: ").append(toIndentedString(cardBrand)).append("\n"); - sb.append(" POIID: ").append(toIndentedString(POIID)).append("\n"); - sb.append(" saleID: ").append(toIndentedString(saleID)).append("\n"); - sb.append(" operatorID: ").append(toIndentedString(operatorID)).append("\n"); - sb.append(" shiftNumber: ").append(toIndentedString(shiftNumber)).append("\n"); - sb.append(" totalsGroupID: ").append(toIndentedString(totalsGroupID)).append("\n"); - sb.append(" paymentCurrency: ").append(toIndentedString(paymentCurrency)).append("\n"); - sb.append(" paymentTotals: ").append(toIndentedString(paymentTotals)).append("\n"); - sb.append(" loyaltyUnit: ").append(toIndentedString(loyaltyUnit)).append("\n"); - sb.append(" loyaltyCurrency: ").append(toIndentedString(loyaltyCurrency)).append("\n"); - sb.append(" loyaltyTotals: ").append(toIndentedString(loyaltyTotals)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of TransactionTotals given an JSON string - * - * @param jsonString JSON string - * @return An instance of TransactionTotals - * @throws JsonProcessingException if the JSON string is invalid with respect to TransactionTotals - */ - public static TransactionTotals fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, TransactionTotals.class); - } -/** - * Convert an instance of TransactionTotals to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/TransactionType.java b/src/main/java/com/adyen/model/terminal/TransactionType.java deleted file mode 100644 index 8a61051c4..000000000 --- a/src/main/java/com/adyen/model/terminal/TransactionType.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets TransactionType - */ -public enum TransactionType { - - AWARD("Award"), - - CASHADVANCE("CashAdvance"), - - COMPLETEDDEFFERED("CompletedDeffered"), - - COMPLETEDRESERVATION("CompletedReservation"), - - CREDIT("Credit"), - - DEBIT("Debit"), - - DECLINED("Declined"), - - FAILED("Failed"), - - FIRSTRESERVATION("FirstReservation"), - - ISSUERINSTALMENT("IssuerInstalment"), - - ONETIMERESERVATION("OneTimeReservation"), - - REBATE("Rebate"), - - REDEMPTION("Redemption"), - - REVERSEAWARD("ReverseAward"), - - REVERSECREDIT("ReverseCredit"), - - REVERSEDEBIT("ReverseDebit"), - - REVERSEREBATE("ReverseRebate"), - - REVERSEREDEMPTION("ReverseRedemption"), - - UPDATERESERVATION("UpdateReservation"); - - private String value; - - TransactionType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TransactionType fromValue(String value) { - for (TransactionType b : TransactionType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/TypeCode.java b/src/main/java/com/adyen/model/terminal/TypeCode.java deleted file mode 100644 index 8c950f16c..000000000 --- a/src/main/java/com/adyen/model/terminal/TypeCode.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets TypeCode - */ -public enum TypeCode { - - COMPANY("Company"), - - PERSONAL("Personal"); - - private String value; - - TypeCode(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TypeCode fromValue(String value) { - for (TypeCode b : TypeCode.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/UTMCoordinates.java b/src/main/java/com/adyen/model/terminal/UTMCoordinates.java deleted file mode 100644 index bb2c1cfd5..000000000 --- a/src/main/java/com/adyen/model/terminal/UTMCoordinates.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * UTMCoordinates - */ -@JsonPropertyOrder({ - UTMCoordinates.JSON_PROPERTY_UT_M_ZONE, - UTMCoordinates.JSON_PROPERTY_UT_M_EASTWARD, - UTMCoordinates.JSON_PROPERTY_UT_M_NORTHWARD -}) - -public class UTMCoordinates { - public static final String JSON_PROPERTY_UT_M_ZONE = "UTMZone"; - private String utMZone; - - public static final String JSON_PROPERTY_UT_M_EASTWARD = "UTMEastward"; - private String utMEastward; - - public static final String JSON_PROPERTY_UT_M_NORTHWARD = "UTMNorthward"; - private String utMNorthward; - - public UTMCoordinates() { - } - - public UTMCoordinates utMZone(String utMZone) { - this.utMZone = utMZone; - return this; - } - - /** - * Get utMZone - * @return utMZone - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_UT_M_ZONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getUtMZone() { - return utMZone; - } - - - /** - * utMZone - * - * @param utMZone - */ - @JsonProperty(JSON_PROPERTY_UT_M_ZONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUtMZone(String utMZone) { - this.utMZone = utMZone; - } - - - public UTMCoordinates utMEastward(String utMEastward) { - this.utMEastward = utMEastward; - return this; - } - - /** - * Get utMEastward - * @return utMEastward - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_UT_M_EASTWARD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getUtMEastward() { - return utMEastward; - } - - - /** - * utMEastward - * - * @param utMEastward - */ - @JsonProperty(JSON_PROPERTY_UT_M_EASTWARD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUtMEastward(String utMEastward) { - this.utMEastward = utMEastward; - } - - - public UTMCoordinates utMNorthward(String utMNorthward) { - this.utMNorthward = utMNorthward; - return this; - } - - /** - * Get utMNorthward - * @return utMNorthward - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_UT_M_NORTHWARD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getUtMNorthward() { - return utMNorthward; - } - - - /** - * utMNorthward - * - * @param utMNorthward - */ - @JsonProperty(JSON_PROPERTY_UT_M_NORTHWARD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUtMNorthward(String utMNorthward) { - this.utMNorthward = utMNorthward; - } - - - /** - * Return true if this UTMCoordinates object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UTMCoordinates utMCoordinates = (UTMCoordinates) o; - return Objects.equals(this.utMZone, utMCoordinates.utMZone) && - Objects.equals(this.utMEastward, utMCoordinates.utMEastward) && - Objects.equals(this.utMNorthward, utMCoordinates.utMNorthward); - } - - @Override - public int hashCode() { - return Objects.hash(utMZone, utMEastward, utMNorthward); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UTMCoordinates {\n"); - sb.append(" utMZone: ").append(toIndentedString(utMZone)).append("\n"); - sb.append(" utMEastward: ").append(toIndentedString(utMEastward)).append("\n"); - sb.append(" utMNorthward: ").append(toIndentedString(utMNorthward)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of UTMCoordinates given an JSON string - * - * @param jsonString JSON string - * @return An instance of UTMCoordinates - * @throws JsonProcessingException if the JSON string is invalid with respect to UTMCoordinates - */ - public static UTMCoordinates fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, UTMCoordinates.class); - } -/** - * Convert an instance of UTMCoordinates to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/terminal/UnitOfMeasure.java b/src/main/java/com/adyen/model/terminal/UnitOfMeasure.java deleted file mode 100644 index 4f319c2f6..000000000 --- a/src/main/java/com/adyen/model/terminal/UnitOfMeasure.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Adyen Terminal API - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.adyen.model.terminal; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets UnitOfMeasure - */ -public enum UnitOfMeasure { - - CASE("Case"), - - CENTILITRE("Centilitre"), - - CENTIMETRE("Centimetre"), - - FOOT("Foot"), - - GRAM("Gram"), - - INCH("Inch"), - - KILOGRAM("Kilogram"), - - KILOMETRE("Kilometre"), - - LITRE("Litre"), - - METER("Meter"), - - MILE("Mile"), - - OTHER("Other"), - - OUNCE("Ounce"), - - PINT("Pint"), - - POUND("Pound"), - - QUART("Quart"), - - UKGALLON("UKGallon"), - - USGALLON("USGallon"), - - YARD("Yard"); - - private String value; - - UnitOfMeasure(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static UnitOfMeasure fromValue(String value) { - for (UnitOfMeasure b : UnitOfMeasure.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/src/main/java/com/adyen/terminal/security/NexoDerivedKey.java b/src/main/java/com/adyen/model/terminal/security/NexoDerivedKey.java similarity index 53% rename from src/main/java/com/adyen/terminal/security/NexoDerivedKey.java rename to src/main/java/com/adyen/model/terminal/security/NexoDerivedKey.java index de09c532f..129e05523 100644 --- a/src/main/java/com/adyen/terminal/security/NexoDerivedKey.java +++ b/src/main/java/com/adyen/model/terminal/security/NexoDerivedKey.java @@ -1,4 +1,25 @@ -package com.adyen.terminal.security; +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +package com.adyen.model.terminal.security; /** * A container for Nexo derived keys diff --git a/src/main/java/com/adyen/model/terminal/security/SaleToPOISecuredMessage.java b/src/main/java/com/adyen/model/terminal/security/SaleToPOISecuredMessage.java new file mode 100644 index 000000000..0cf150095 --- /dev/null +++ b/src/main/java/com/adyen/model/terminal/security/SaleToPOISecuredMessage.java @@ -0,0 +1,91 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +package com.adyen.model.terminal.security; + +import com.adyen.model.nexo.MessageHeader; + +import com.google.gson.annotations.SerializedName; + +import java.util.Objects; + +public class SaleToPOISecuredMessage { + @SerializedName("MessageHeader") + private MessageHeader messageHeader; + + @SerializedName("NexoBlob") + private String nexoBlob; + + @SerializedName("SecurityTrailer") + private SecurityTrailer securityTrailer; + + public MessageHeader getMessageHeader() { + return messageHeader; + } + + public void setMessageHeader(MessageHeader messageHeader) { + this.messageHeader = messageHeader; + } + + public String getNexoBlob() { + return nexoBlob; + } + + public void setNexoBlob(String nexoBlob) { + this.nexoBlob = nexoBlob; + } + + public SecurityTrailer getSecurityTrailer() { + return securityTrailer; + } + + public void setSecurityTrailer(SecurityTrailer securityTrailer) { + this.securityTrailer = securityTrailer; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SaleToPOISecuredMessage that = (SaleToPOISecuredMessage) o; + return messageHeader.equals(that.messageHeader) && + nexoBlob.equals(that.nexoBlob) && + securityTrailer.equals(that.securityTrailer); + } + + @Override + public int hashCode() { + return Objects.hash(messageHeader, nexoBlob, securityTrailer); + } + + @Override + public String toString() { + return "SaleToPOISecuredMessage{" + + "messageHeader=" + messageHeader + + ", nexoBlob='" + nexoBlob + '\'' + + ", securityTrailer=" + securityTrailer + + '}'; + } +} diff --git a/src/main/java/com/adyen/terminal/security/SecurityKey.java b/src/main/java/com/adyen/model/terminal/security/SecurityKey.java similarity index 68% rename from src/main/java/com/adyen/terminal/security/SecurityKey.java rename to src/main/java/com/adyen/model/terminal/security/SecurityKey.java index 851da5fc9..f5ca74b78 100644 --- a/src/main/java/com/adyen/terminal/security/SecurityKey.java +++ b/src/main/java/com/adyen/model/terminal/security/SecurityKey.java @@ -1,4 +1,25 @@ -package com.adyen.terminal.security; +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +package com.adyen.model.terminal.security; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/adyen/model/terminal/security/SecurityTrailer.java b/src/main/java/com/adyen/model/terminal/security/SecurityTrailer.java new file mode 100644 index 000000000..42409da26 --- /dev/null +++ b/src/main/java/com/adyen/model/terminal/security/SecurityTrailer.java @@ -0,0 +1,120 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +package com.adyen.model.terminal.security; + + +import com.google.gson.annotations.SerializedName; + +import java.util.Arrays; +import java.util.Objects; + +public class SecurityTrailer { + @SerializedName("AdyenCryptoVersion") + private Integer adyenCryptoVersion; + + @SerializedName("KeyIdentifier") + private String keyIdentifier; + + @SerializedName("KeyVersion") + private Integer keyVersion; + + @SerializedName("Nonce") + private byte[] nonce; + + @SerializedName("Hmac") + private byte[] hmac; + + public Integer getAdyenCryptoVersion() { + return adyenCryptoVersion; + } + + public void setAdyenCryptoVersion(Integer adyenCryptoVersion) { + this.adyenCryptoVersion = adyenCryptoVersion; + } + + public String getKeyIdentifier() { + return keyIdentifier; + } + + public void setKeyIdentifier(String keyIdentifier) { + this.keyIdentifier = keyIdentifier; + } + + public Integer getKeyVersion() { + return keyVersion; + } + + public void setKeyVersion(Integer keyVersion) { + this.keyVersion = keyVersion; + } + + public byte[] getNonce() { + return nonce; + } + + public void setNonce(byte[] nonce) { + this.nonce = nonce; + } + + public byte[] getHmac() { + return hmac; + } + + public void setHmac(byte[] hmac) { + this.hmac = hmac; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityTrailer that = (SecurityTrailer) o; + return adyenCryptoVersion.equals(that.adyenCryptoVersion) && + keyIdentifier.equals(that.keyIdentifier) && + keyVersion.equals(that.keyVersion) && + Arrays.equals(nonce, that.nonce) && + Arrays.equals(hmac, that.hmac); + } + + @Override + public int hashCode() { + int result = Objects.hash(adyenCryptoVersion, keyIdentifier, keyVersion); + result = 31 * result + Arrays.hashCode(nonce); + result = 31 * result + Arrays.hashCode(hmac); + return result; + } + + @Override + public String toString() { + return "SecurityTrailer{" + + "adyenCryptoVersion=" + adyenCryptoVersion + + ", keyIdentifier='" + keyIdentifier + '\'' + + ", keyVersion=" + keyVersion + + ", nonce=" + Arrays.toString(nonce) + + ", hmac=" + Arrays.toString(hmac) + + '}'; + } +} diff --git a/src/main/java/com/adyen/notification/WebhookHandler.java b/src/main/java/com/adyen/notification/WebhookHandler.java index ade26fccf..78819be58 100644 --- a/src/main/java/com/adyen/notification/WebhookHandler.java +++ b/src/main/java/com/adyen/notification/WebhookHandler.java @@ -1,9 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2017 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ package com.adyen.notification; import com.adyen.model.notification.NotificationRequest; import com.adyen.model.payout.JSON; -import com.adyen.terminal.TerminalAPIRequest; -import com.fasterxml.jackson.core.JsonProcessingException; +import com.adyen.model.terminal.TerminalAPIRequest; +import com.adyen.terminal.serialization.TerminalAPIGsonBuilder; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.reflect.TypeToken; import java.io.IOException; @@ -11,7 +34,12 @@ * Notification converter */ public class WebhookHandler { + private static final Gson GSON = new Gson(); + private final Gson terminalGson; + public WebhookHandler() { + GsonBuilder gsonBuilder = new GsonBuilder(); + terminalGson = TerminalAPIGsonBuilder.create(); } public NotificationRequest handleNotificationJson(String json) throws IOException { @@ -23,7 +51,8 @@ public NotificationRequest handleNotificationJsonJackson(String json) throws IOE } // Note that terminal notifications are structured as TerminalAPIRequest objects - public TerminalAPIRequest handleTerminalNotificationJson(String json) throws JsonProcessingException { - return TerminalAPIRequest.fromJson(json); + public TerminalAPIRequest handleTerminalNotificationJson(String json) { + return terminalGson.fromJson(json, new TypeToken() { + }.getType()); } } diff --git a/src/main/java/com/adyen/serializer/ByteArrayDeserializer.java b/src/main/java/com/adyen/serializer/ByteArrayDeserializer.java index b00391a11..8fc817292 100644 --- a/src/main/java/com/adyen/serializer/ByteArrayDeserializer.java +++ b/src/main/java/com/adyen/serializer/ByteArrayDeserializer.java @@ -1,5 +1,6 @@ package com.adyen.serializer; +import com.fasterxml.jackson.core.JacksonException; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; @@ -13,7 +14,7 @@ public ByteArrayDeserializer() { } @Override - public byte[] deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { + public byte[] deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JacksonException { return jsonParser.getValueAsString().getBytes(StandardCharsets.UTF_8); } } diff --git a/src/main/java/com/adyen/serializer/ByteArrayToStringAdapter.java b/src/main/java/com/adyen/serializer/ByteArrayToStringAdapter.java index 6f541bdeb..61f0ed514 100644 --- a/src/main/java/com/adyen/serializer/ByteArrayToStringAdapter.java +++ b/src/main/java/com/adyen/serializer/ByteArrayToStringAdapter.java @@ -1,3 +1,24 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + package com.adyen.serializer; import com.google.gson.JsonDeserializationContext; diff --git a/src/main/java/com/adyen/serializer/DateSerializer.java b/src/main/java/com/adyen/serializer/DateSerializer.java index cbdf81d8f..c7d3b6923 100644 --- a/src/main/java/com/adyen/serializer/DateSerializer.java +++ b/src/main/java/com/adyen/serializer/DateSerializer.java @@ -1,3 +1,23 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2017 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ package com.adyen.serializer; import java.lang.reflect.Type; diff --git a/src/main/java/com/adyen/serializer/DateTimeGMTSerializer.java b/src/main/java/com/adyen/serializer/DateTimeGMTSerializer.java index 8bd2e77ac..b4ca351a9 100644 --- a/src/main/java/com/adyen/serializer/DateTimeGMTSerializer.java +++ b/src/main/java/com/adyen/serializer/DateTimeGMTSerializer.java @@ -1,3 +1,23 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2017 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ package com.adyen.serializer; import java.lang.reflect.Type; diff --git a/src/main/java/com/adyen/serializer/DateTimeISO8601Serializer.java b/src/main/java/com/adyen/serializer/DateTimeISO8601Serializer.java index 13b8346b3..da635fd38 100644 --- a/src/main/java/com/adyen/serializer/DateTimeISO8601Serializer.java +++ b/src/main/java/com/adyen/serializer/DateTimeISO8601Serializer.java @@ -1,3 +1,23 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2017 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ package com.adyen.serializer; import com.google.gson.JsonElement; diff --git a/src/main/java/com/adyen/serializer/SaleToAcquirerDataSerializer.java b/src/main/java/com/adyen/serializer/SaleToAcquirerDataSerializer.java new file mode 100644 index 000000000..da134f28c --- /dev/null +++ b/src/main/java/com/adyen/serializer/SaleToAcquirerDataSerializer.java @@ -0,0 +1,29 @@ +package com.adyen.serializer; + +import java.lang.reflect.Type; + +import com.adyen.model.terminal.SaleToAcquirerData; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonParseException; +import com.google.gson.JsonPrimitive; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; + +public class SaleToAcquirerDataSerializer implements + JsonSerializer, + JsonDeserializer { + + @Override + public JsonElement serialize(SaleToAcquirerData saleToAcquirerData, Type typeOfSrc, + JsonSerializationContext context) { + return new JsonPrimitive(saleToAcquirerData.toBase64()); + } + + @Override + public SaleToAcquirerData deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) + throws JsonParseException { + return SaleToAcquirerData.fromBase64(json.getAsString()); + } +} diff --git a/src/main/java/com/adyen/serializer/TerminalByteArrayDeserializer.java b/src/main/java/com/adyen/serializer/TerminalByteArrayDeserializer.java deleted file mode 100644 index 8d7f9bdf8..000000000 --- a/src/main/java/com/adyen/serializer/TerminalByteArrayDeserializer.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.adyen.serializer; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.Base64; - -public class TerminalByteArrayDeserializer extends StdDeserializer { - public TerminalByteArrayDeserializer() { - super(byte[].class); - } - - @Override - public byte[] deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { - return Base64.getDecoder().decode(jsonParser.getValueAsString().getBytes(StandardCharsets.UTF_8)); - } -} \ No newline at end of file diff --git a/src/main/java/com/adyen/serializer/TerminalByteArraySerializer.java b/src/main/java/com/adyen/serializer/TerminalByteArraySerializer.java deleted file mode 100644 index d53bf0573..000000000 --- a/src/main/java/com/adyen/serializer/TerminalByteArraySerializer.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.adyen.serializer; - -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; - -import java.io.IOException; -import java.util.Base64; - -public class TerminalByteArraySerializer extends StdSerializer { - public TerminalByteArraySerializer() { - super(byte[].class); - } - - @Override - public void serialize(byte[] bytes, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException { - String yourReadableString = Base64.getEncoder().encodeToString(bytes); - jsonGenerator.writeString(yourReadableString); - } -} diff --git a/src/main/java/com/adyen/service/TerminalConnectedApi.java b/src/main/java/com/adyen/service/PosPayment.java similarity index 75% rename from src/main/java/com/adyen/service/TerminalConnectedApi.java rename to src/main/java/com/adyen/service/PosPayment.java index eed9397dd..3d5d5f65b 100644 --- a/src/main/java/com/adyen/service/TerminalConnectedApi.java +++ b/src/main/java/com/adyen/service/PosPayment.java @@ -22,17 +22,21 @@ import com.adyen.ApiKeyAuthenticatedService; import com.adyen.Client; +import com.adyen.model.terminal.ConnectedTerminalsRequest; +import com.adyen.model.terminal.ConnectedTerminalsResponse; import com.adyen.service.exception.ApiException; import com.adyen.service.resource.terminal.cloud.ConnectedTerminals; -import com.adyen.terminal.ConnectedTerminalsRequest; -import com.adyen.terminal.ConnectedTerminalsResponse; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.reflect.TypeToken; import java.io.IOException; -public class TerminalConnectedApi extends ApiKeyAuthenticatedService { +public class PosPayment extends ApiKeyAuthenticatedService { + protected static final Gson GSON = new GsonBuilder().disableHtmlEscaping().create(); private final ConnectedTerminals connectedTerminals; - public TerminalConnectedApi(Client client) { + public PosPayment(Client client) { super(client); connectedTerminals = new ConnectedTerminals(this); } @@ -46,8 +50,9 @@ public TerminalConnectedApi(Client client) { * @throws ApiException ApiException */ public ConnectedTerminalsResponse connectedTerminals(ConnectedTerminalsRequest connectedTerminalsRequest) throws IOException, ApiException { - String jsonRequest = connectedTerminalsRequest.toJson(); + String jsonRequest = GSON.toJson(connectedTerminalsRequest); String jsonResult = connectedTerminals.request(jsonRequest); - return ConnectedTerminalsResponse.fromJson(jsonResult); + return GSON.fromJson(jsonResult, new TypeToken() { + }.getType()); } } diff --git a/src/main/java/com/adyen/service/TerminalCloudAPI.java b/src/main/java/com/adyen/service/TerminalCloudAPI.java index 4e6fda7bf..ce6a306fc 100644 --- a/src/main/java/com/adyen/service/TerminalCloudAPI.java +++ b/src/main/java/com/adyen/service/TerminalCloudAPI.java @@ -1,24 +1,50 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ package com.adyen.service; +import com.adyen.ApiKeyAuthenticatedService; import com.adyen.Client; -import com.adyen.Service; -import com.adyen.terminal.TerminalAPIRequest; -import com.adyen.terminal.TerminalAPIResponse; +import com.adyen.model.terminal.TerminalAPIRequest; +import com.adyen.model.terminal.TerminalAPIResponse; import com.adyen.service.exception.ApiException; import com.adyen.service.resource.terminal.cloud.Async; import com.adyen.service.resource.terminal.cloud.Sync; +import com.adyen.terminal.serialization.TerminalAPIGsonBuilder; +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; import java.io.IOException; -public class TerminalCloudAPI extends Service { +public class TerminalCloudAPI extends ApiKeyAuthenticatedService { private final Async terminalApiAsync; private final Sync terminalApiSync; + private final Gson terminalApiGson; + public TerminalCloudAPI(Client client) { super(client); terminalApiAsync = new Async(this); terminalApiSync = new Sync(this); + terminalApiGson = TerminalAPIGsonBuilder.create(); } /** @@ -30,7 +56,7 @@ public TerminalCloudAPI(Client client) { * @throws ApiException ApiException */ public String async(TerminalAPIRequest terminalAPIRequest) throws IOException, ApiException { - String jsonRequest = terminalAPIRequest.toJson(); + String jsonRequest = terminalApiGson.toJson(terminalAPIRequest); return terminalApiAsync.request(jsonRequest); } @@ -44,7 +70,7 @@ public String async(TerminalAPIRequest terminalAPIRequest) throws IOException, A * @throws ApiException ApiException */ public TerminalAPIResponse sync(TerminalAPIRequest terminalAPIRequest) throws IOException, ApiException { - String jsonRequest = terminalAPIRequest.toJson(); + String jsonRequest = terminalApiGson.toJson(terminalAPIRequest); String jsonResponse = terminalApiSync.request(jsonRequest); @@ -52,6 +78,7 @@ public TerminalAPIResponse sync(TerminalAPIRequest terminalAPIRequest) throws IO return null; } - return TerminalAPIResponse.fromJson(jsonResponse); + return terminalApiGson.fromJson(jsonResponse, new TypeToken() { + }.getType()); } } diff --git a/src/main/java/com/adyen/service/TerminalLocalAPI.java b/src/main/java/com/adyen/service/TerminalLocalAPI.java index 6c79b948a..9a1ac6c08 100644 --- a/src/main/java/com/adyen/service/TerminalLocalAPI.java +++ b/src/main/java/com/adyen/service/TerminalLocalAPI.java @@ -22,23 +22,31 @@ import com.adyen.Client; import com.adyen.Service; -import com.adyen.terminal.TerminalAPIRequest; -import com.adyen.terminal.TerminalAPIResponse; -import com.adyen.terminal.security.*; +import com.adyen.model.terminal.TerminalAPIRequest; +import com.adyen.model.terminal.TerminalAPIResponse; +import com.adyen.model.terminal.TerminalAPISecuredRequest; +import com.adyen.model.terminal.TerminalAPISecuredResponse; +import com.adyen.model.terminal.security.SaleToPOISecuredMessage; +import com.adyen.model.terminal.security.SecurityKey; import com.adyen.service.resource.terminal.local.LocalRequest; import com.adyen.terminal.security.NexoCrypto; import com.adyen.terminal.security.exception.NexoCryptoException; +import com.adyen.terminal.serialization.TerminalAPIGsonBuilder; +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; public class TerminalLocalAPI extends Service { private final LocalRequest localRequest; private final NexoCrypto nexoCrypto; + private final Gson terminalApiGson; public TerminalLocalAPI(Client client, SecurityKey securityKey) throws NexoCryptoException { super(client); localRequest = new LocalRequest(this); nexoCrypto = new NexoCrypto(securityKey); + terminalApiGson = TerminalAPIGsonBuilder.create(); } /** @@ -49,12 +57,12 @@ public TerminalLocalAPI(Client client, SecurityKey securityKey) throws NexoCrypt * @throws Exception exception */ public TerminalAPIResponse request(TerminalAPIRequest terminalAPIRequest) throws Exception { - String jsonRequest = terminalAPIRequest.toJson(); + String jsonRequest = terminalApiGson.toJson(terminalAPIRequest); SaleToPOISecuredMessage saleToPOISecuredRequest = nexoCrypto.encrypt(jsonRequest, terminalAPIRequest.getSaleToPOIRequest().getMessageHeader()); TerminalAPISecuredRequest securedPaymentRequest = new TerminalAPISecuredRequest(); securedPaymentRequest.setSaleToPOIRequest(saleToPOISecuredRequest); - String jsonEncryptedRequest = securedPaymentRequest.toJson(); + String jsonEncryptedRequest = terminalApiGson.toJson(securedPaymentRequest); String jsonResponse = localRequest.request(jsonEncryptedRequest); @@ -62,11 +70,11 @@ public TerminalAPIResponse request(TerminalAPIRequest terminalAPIRequest) throws return null; } - TerminalAPISecuredResponse securedPaymentResponse = TerminalAPISecuredResponse.fromJson(jsonResponse); - + TerminalAPISecuredResponse securedPaymentResponse = terminalApiGson.fromJson(jsonResponse, new TypeToken() { + }.getType()); SaleToPOISecuredMessage saleToPOISecuredResponse = securedPaymentResponse.getSaleToPOIResponse(); String jsonDecryptedResponse = nexoCrypto.decrypt(saleToPOISecuredResponse); - - return TerminalAPIResponse.fromJson(jsonDecryptedResponse); + return terminalApiGson.fromJson(jsonDecryptedResponse, new TypeToken() { + }.getType()); } } diff --git a/src/main/java/com/adyen/service/TerminalLocalAPIUnencrypted.java b/src/main/java/com/adyen/service/TerminalLocalAPIUnencrypted.java index 2cb06bc98..b7e3b911c 100644 --- a/src/main/java/com/adyen/service/TerminalLocalAPIUnencrypted.java +++ b/src/main/java/com/adyen/service/TerminalLocalAPIUnencrypted.java @@ -5,10 +5,12 @@ import com.adyen.Service; import com.adyen.enums.Environment; import com.adyen.httpclient.TerminalLocalAPIHostnameVerifier; - -import com.adyen.terminal.TerminalAPIRequest; -import com.adyen.terminal.TerminalAPIResponse; +import com.adyen.model.terminal.TerminalAPIRequest; +import com.adyen.model.terminal.TerminalAPIResponse; import com.adyen.service.resource.terminal.local.LocalRequest; +import com.adyen.terminal.serialization.TerminalAPIGsonBuilder; +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManager; @@ -29,11 +31,14 @@ public class TerminalLocalAPIUnencrypted extends Service { private final LocalRequest localRequest; + private final Gson terminalApiGson; + public TerminalLocalAPIUnencrypted(Client client) { super(client); if (client.getConfig().getEnvironment() == Environment.LIVE) { throw new IllegalArgumentException("Cannot use this class in a Live environment"); } + terminalApiGson = TerminalAPIGsonBuilder.create(); Config config = super.getClient().getConfig(); config.setHostnameVerifier(new TerminalLocalAPIHostnameVerifier(Environment.TEST)); if (config.getSSLContext() == null) { @@ -51,7 +56,7 @@ public TerminalLocalAPIUnencrypted(Client client) { * @throws Exception exception */ public TerminalAPIResponse request(TerminalAPIRequest terminalAPIRequest) throws Exception { - String jsonRequest = terminalAPIRequest.toJson(); + String jsonRequest = terminalApiGson.toJson(terminalAPIRequest); String jsonResponse = localRequest.request(jsonRequest); @@ -59,7 +64,8 @@ public TerminalAPIResponse request(TerminalAPIRequest terminalAPIRequest) throws return null; } - return TerminalAPIResponse.fromJson(jsonResponse); + return terminalApiGson.fromJson(jsonResponse, new TypeToken() { + }.getType()); } private SSLContext createTrustSSLContext() { diff --git a/src/main/java/com/adyen/service/resource/terminal/cloud/ConnectedTerminals.java b/src/main/java/com/adyen/service/resource/terminal/cloud/ConnectedTerminals.java index 6bd09375c..c428eda7a 100644 --- a/src/main/java/com/adyen/service/resource/terminal/cloud/ConnectedTerminals.java +++ b/src/main/java/com/adyen/service/resource/terminal/cloud/ConnectedTerminals.java @@ -28,6 +28,7 @@ public class ConnectedTerminals extends Resource { public ConnectedTerminals(Service service) { super(service, - service.getClient().getConfig().getTerminalApiCloudEndpoint() + "/connectedTerminals", null); + service.getClient().getConfig().getTerminalApiCloudEndpoint() + "/connectedTerminals", + Collections.singletonList("merchantAccount")); } } diff --git a/src/main/java/com/adyen/terminal/ConnectedTerminalsResponse.java b/src/main/java/com/adyen/terminal/ConnectedTerminalsResponse.java deleted file mode 100644 index b67a2e826..000000000 --- a/src/main/java/com/adyen/terminal/ConnectedTerminalsResponse.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.adyen.terminal; - -import com.adyen.model.terminal.JSON; -import com.fasterxml.jackson.core.JsonProcessingException; - -import java.util.List; -import java.util.Objects; - -/** - * Connected Terminals Response - */ -public class ConnectedTerminalsResponse { - - private List uniqueTerminalIds; - - public List getUniqueTerminalIds() { - return uniqueTerminalIds; - } - - public void setUniqueTerminalIds(List uniqueTerminalIds) { - this.uniqueTerminalIds = uniqueTerminalIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConnectedTerminalsResponse that = (ConnectedTerminalsResponse) o; - return Objects.equals(uniqueTerminalIds, that.uniqueTerminalIds); - } - - @Override - public int hashCode() { - return Objects.hash(uniqueTerminalIds); - } - - @Override - public String toString() { - return "ConnectedTerminalsResponse{" + - "uniqueTerminalIds=" + uniqueTerminalIds + - '}'; - } - - /** - * Create an instance of ConnectedTerminalsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ConnectedTerminalsResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to ConnectedTerminalsResponse - */ - public static ConnectedTerminalsResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, ConnectedTerminalsResponse.class); - } - - /** - * Convert an instance of ConnectedTerminalsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} diff --git a/src/main/java/com/adyen/terminal/SaleToPOIResponse.java b/src/main/java/com/adyen/terminal/SaleToPOIResponse.java deleted file mode 100644 index 0f52d9f48..000000000 --- a/src/main/java/com/adyen/terminal/SaleToPOIResponse.java +++ /dev/null @@ -1,698 +0,0 @@ -package com.adyen.terminal; - -import com.adyen.model.terminal.AdminResponse; -import com.adyen.model.terminal.BalanceInquiryResponse; -import com.adyen.model.terminal.CardAcquisitionResponse; -import com.adyen.model.terminal.CardReaderAPDUResponse; -import com.adyen.model.terminal.DiagnosisResponse; -import com.adyen.model.terminal.DisplayResponse; -import com.adyen.model.terminal.EnableServiceResponse; -import com.adyen.model.terminal.EventNotification; -import com.adyen.model.terminal.GetTotalsResponse; -import com.adyen.model.terminal.InputResponse; -import com.adyen.model.terminal.InputUpdate; -import com.adyen.model.terminal.JSON; -import com.adyen.model.terminal.LoginResponse; -import com.adyen.model.terminal.LogoutResponse; -import com.adyen.model.terminal.LoyaltyResponse; -import com.adyen.model.terminal.MessageHeader; - -import com.adyen.model.terminal.PaymentResponse; -import com.adyen.model.terminal.PrintResponse; -import com.adyen.model.terminal.ReconciliationResponse; -import com.adyen.model.terminal.ReversalResponse; -import com.adyen.model.terminal.SecurityTrailer; -import com.adyen.model.terminal.StoredValueResponse; -import com.adyen.model.terminal.TransactionStatusResponse; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -@ApiModel(description = "SaleToPoiResponse") -@JsonPropertyOrder({ - SaleToPOIResponse.JSON_PROPERTY_MESSAGE_HEADER, - SaleToPOIResponse.JSON_PROPERTY_BALANCE_INQUIRY_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_CARD_INQUISITION_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_ADMIN_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_DIAGNOSIS_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_DISPLAY_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_ENABLE_SERVICE_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_EVENT_NOTIFICATION, - SaleToPOIResponse.JSON_PROPERTY_GET_TOTALS_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_INPUT_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_INPUT_UPDATE, - SaleToPOIResponse.JSON_PROPERTY_LOGIN_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_LOGOUT_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_LOYALTY_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_PAYMENT_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_PRINT_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_CARD_READER_APDU_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_RECONCILIATION_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_REVERSAL_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_SOTRED_VALUE_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_TRANSACTION_STATUS_RESPONSE, - SaleToPOIResponse.JSON_PROPERTY_SECURITY_TRAILER -}) -public class SaleToPOIResponse { - - /** - * The Message header. - */ - public static final String JSON_PROPERTY_MESSAGE_HEADER = "MessageHeader"; - protected MessageHeader messageHeader; - /** - * The Balance inquiry Response. - */ - public static final String JSON_PROPERTY_BALANCE_INQUIRY_RESPONSE = "BalanceInquiryResponse"; - protected BalanceInquiryResponse balanceInquiryResponse; - /** - * The Card acquisition Response. - */ - public static final String JSON_PROPERTY_CARD_INQUISITION_RESPONSE = "CardAcquisitionResponse"; - protected CardAcquisitionResponse cardAcquisitionResponse; - /** - * The Admin Response. - */ - public static final String JSON_PROPERTY_ADMIN_RESPONSE = "AdminResponse"; - protected AdminResponse adminResponse; - /** - * The Diagnosis Response. - */ - public static final String JSON_PROPERTY_DIAGNOSIS_RESPONSE = "DiagnosisResponse"; - protected DiagnosisResponse diagnosisResponse; - /** - * The Display Response. - */ - public static final String JSON_PROPERTY_DISPLAY_RESPONSE = "DisplayResponse"; - protected DisplayResponse displayResponse; - /** - * The Enable service Response. - */ - public static final String JSON_PROPERTY_ENABLE_SERVICE_RESPONSE = "EnableServiceResponse"; - protected EnableServiceResponse enableServiceResponse; - /** - * The Event notification. - */ - public static final String JSON_PROPERTY_EVENT_NOTIFICATION = "EventNotification"; - protected EventNotification eventNotification; - /** - * The Get totals Response. - */ - public static final String JSON_PROPERTY_GET_TOTALS_RESPONSE = "GetTotalsResponse"; - protected GetTotalsResponse getTotalsResponse; - /** - * The Input Response. - */ - public static final String JSON_PROPERTY_INPUT_RESPONSE = "InputResponse"; - protected InputResponse inputResponse; - /** - * The Input update. - */ - public static final String JSON_PROPERTY_INPUT_UPDATE = "InputUpdate"; - protected InputUpdate inputUpdate; - /** - * The Login Response. - */ - public static final String JSON_PROPERTY_LOGIN_RESPONSE = "LoginResponse"; - protected LoginResponse loginResponse; - /** - * The Logout Response. - */ - public static final String JSON_PROPERTY_LOGOUT_RESPONSE = "LogoutResponse"; - protected LogoutResponse logoutResponse; - /** - * The Loyalty Response. - */ - public static final String JSON_PROPERTY_LOYALTY_RESPONSE = "LoyaltyResponse"; - protected LoyaltyResponse loyaltyResponse; - /** - * The Payment Response. - */ - public static final String JSON_PROPERTY_PAYMENT_RESPONSE = "PaymentResponse"; - protected PaymentResponse paymentResponse; - /** - * The Print Response. - */ - public static final String JSON_PROPERTY_PRINT_RESPONSE = "PrintResponse"; - protected PrintResponse printResponse; - /** - * The Card reader apdu Response. - */ - public static final String JSON_PROPERTY_CARD_READER_APDU_RESPONSE = "CardReaderAPDUResponse"; - protected CardReaderAPDUResponse cardReaderAPDUResponse; - /** - * The Reconciliation Response. - */ - public static final String JSON_PROPERTY_RECONCILIATION_RESPONSE = "ReconciliationResponse"; - protected ReconciliationResponse reconciliationResponse; - /** - * The Reversal Response. - */ - public static final String JSON_PROPERTY_REVERSAL_RESPONSE = "ReversalResponse"; - protected ReversalResponse reversalResponse; - /** - * The Stored value Response. - */ - public static final String JSON_PROPERTY_SOTRED_VALUE_RESPONSE = "StoredValueResponse"; - protected StoredValueResponse storedValueResponse; - /** - * The Transaction status Response. - */ - public static final String JSON_PROPERTY_TRANSACTION_STATUS_RESPONSE = "TransactionStatusResponse"; - protected TransactionStatusResponse transactionStatusResponse; - /** - * The Security trailer. - */ - public static final String JSON_PROPERTY_SECURITY_TRAILER = "SecurityTrailer"; - protected SecurityTrailer securityTrailer; - - /** - * Gets the value of the messageHeader property. - * - * @return possible object is {@link MessageHeader } - */ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_MESSAGE_HEADER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MessageHeader getMessageHeader() { - return messageHeader; - } - - /** - * Sets the value of the messageHeader property. - * - * @param value allowed object is {@link MessageHeader } - */ - @JsonProperty(JSON_PROPERTY_MESSAGE_HEADER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessageHeader(MessageHeader value) { - this.messageHeader = value; - } - - /** - * Gets the value of the balanceInquiryResponse property. - * - * @return possible object is {@link BalanceInquiryResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_BALANCE_INQUIRY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BalanceInquiryResponse getBalanceInquiryResponse() { - return balanceInquiryResponse; - } - - /** - * Sets the value of the balanceInquiryResponse property. - * - * @param value allowed object is {@link BalanceInquiryResponse } - */ - @JsonProperty(JSON_PROPERTY_BALANCE_INQUIRY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBalanceInquiryResponse(BalanceInquiryResponse value) { - this.balanceInquiryResponse = value; - } - - /** - * Gets the value of the cardAcquisitionResponse property. - * - * @return possible object is {@link CardAcquisitionResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_CARD_INQUISITION_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CardAcquisitionResponse getCardAcquisitionResponse() { - return cardAcquisitionResponse; - } - - /** - * Sets the value of the cardAcquisitionResponse property. - * - * @param value allowed object is {@link CardAcquisitionResponse } - */ - @JsonProperty(JSON_PROPERTY_CARD_INQUISITION_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCardAcquisitionResponse(CardAcquisitionResponse value) { - this.cardAcquisitionResponse = value; - } - - /** - * Gets the value of the adminResponse property. - * - * @return possible object is {@link AdminResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_ADMIN_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AdminResponse getAdminResponse() { - return adminResponse; - } - - /** - * Sets the value of the adminResponse property. - * - * @param value allowed object is {@link AdminResponse } - */ - @JsonProperty(JSON_PROPERTY_ADMIN_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAdminResponse(AdminResponse value) { - this.adminResponse = value; - } - - /** - * Gets the value of the diagnosisResponse property. - * - * @return possible object is {@link DiagnosisResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_DIAGNOSIS_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DiagnosisResponse getDiagnosisResponse() { - return diagnosisResponse; - } - - /** - * Sets the value of the diagnosisResponse property. - * - * @param value allowed object is {@link DiagnosisResponse } - */ - @JsonProperty(JSON_PROPERTY_DIAGNOSIS_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDiagnosisResponse(DiagnosisResponse value) { - this.diagnosisResponse = value; - } - - /** - * Gets the value of the displayResponse property. - * - * @return possible object is {@link DisplayResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_DISPLAY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DisplayResponse getDisplayResponse() { - return displayResponse; - } - - /** - * Sets the value of the displayResponse property. - * - * @param value allowed object is {@link DisplayResponse } - */ - @JsonProperty(JSON_PROPERTY_DISPLAY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDisplayResponse(DisplayResponse value) { - this.displayResponse = value; - } - - /** - * Gets the value of the enableServiceResponse property. - * - * @return possible object is {@link EnableServiceResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_ENABLE_SERVICE_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EnableServiceResponse getEnableServiceResponse() { - return enableServiceResponse; - } - - /** - * Sets the value of the enableServiceResponse property. - * - * @param value allowed object is {@link EnableServiceResponse } - */ - @JsonProperty(JSON_PROPERTY_ENABLE_SERVICE_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnableServiceResponse(EnableServiceResponse value) { - this.enableServiceResponse = value; - } - - /** - * Gets the value of the eventNotification property. - * - * @return possible object is {@link EventNotification } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_EVENT_NOTIFICATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventNotification getEventNotification() { - return eventNotification; - } - - /** - * Sets the value of the eventNotification property. - * - * @param value allowed object is {@link EventNotification } - */ - @JsonProperty(JSON_PROPERTY_EVENT_NOTIFICATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEventNotification(EventNotification value) { - this.eventNotification = value; - } - - /** - * Gets the value of the getTotalsResponse property. - * - * @return possible object is {@link GetTotalsResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_GET_TOTALS_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public GetTotalsResponse getGetTotalsResponse() { - return getTotalsResponse; - } - - /** - * Sets the value of the getTotalsResponse property. - * - * @param value allowed object is {@link GetTotalsResponse } - */ - @JsonProperty(JSON_PROPERTY_GET_TOTALS_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGetTotalsResponse(GetTotalsResponse value) { - this.getTotalsResponse = value; - } - - /** - * Gets the value of the inputResponse property. - * - * @return possible object is {@link InputResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_INPUT_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public InputResponse getInputResponse() { - return inputResponse; - } - - /** - * Sets the value of the inputResponse property. - * - * @param value allowed object is {@link InputResponse } - */ - @JsonProperty(JSON_PROPERTY_INPUT_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInputResponse(InputResponse value) { - this.inputResponse = value; - } - - /** - * Gets the value of the inputUpdate property. - * - * @return possible object is {@link InputUpdate } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_INPUT_UPDATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public InputUpdate getInputUpdate() { - return inputUpdate; - } - - /** - * Sets the value of the inputUpdate property. - * - * @param value allowed object is {@link InputUpdate } - */ - @JsonProperty(JSON_PROPERTY_INPUT_UPDATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInputUpdate(InputUpdate value) { - this.inputUpdate = value; - } - - /** - * Gets the value of the loginResponse property. - * - * @return possible object is {@link LoginResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_LOGIN_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LoginResponse getLoginResponse() { - return loginResponse; - } - - /** - * Sets the value of the loginResponse property. - * - * @param value allowed object is {@link LoginResponse } - */ - @JsonProperty(JSON_PROPERTY_LOGIN_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoginResponse(LoginResponse value) { - this.loginResponse = value; - } - - /** - * Gets the value of the logoutResponse property. - * - * @return possible object is {@link LogoutResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_LOGOUT_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogoutResponse getLogoutResponse() { - return logoutResponse; - } - - /** - * Sets the value of the logoutResponse property. - * - * @param value allowed object is {@link LogoutResponse } - */ - @JsonProperty(JSON_PROPERTY_LOGOUT_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLogoutResponse(LogoutResponse value) { - this.logoutResponse = value; - } - - /** - * Gets the value of the loyaltyResponse property. - * - * @return possible object is {@link LoyaltyResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_LOYALTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LoyaltyResponse getLoyaltyResponse() { - return loyaltyResponse; - } - - /** - * Sets the value of the loyaltyResponse property. - * - * @param value allowed object is {@link LoyaltyResponse } - */ - @JsonProperty(JSON_PROPERTY_LOYALTY_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLoyaltyResponse(LoyaltyResponse value) { - this.loyaltyResponse = value; - } - - /** - * Gets the value of the paymentResponse property. - * - * @return possible object is {@link PaymentResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public PaymentResponse getPaymentResponse() { - return paymentResponse; - } - - /** - * Sets the value of the paymentResponse property. - * - * @param value allowed object is {@link PaymentResponse } - */ - @JsonProperty(JSON_PROPERTY_PAYMENT_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentResponse(PaymentResponse value) { - this.paymentResponse = value; - } - - /** - * Gets the value of the printResponse property. - * - * @return possible object is {@link PrintResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_PRINT_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public PrintResponse getPrintResponse() { - return printResponse; - } - - /** - * Sets the value of the printResponse property. - * - * @param value allowed object is {@link PrintResponse } - */ - @JsonProperty(JSON_PROPERTY_PRINT_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrintResponse(PrintResponse value) { - this.printResponse = value; - } - - /** - * Gets the value of the cardReaderAPDUResponse property. - * - * @return possible object is {@link CardReaderAPDUResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_CARD_READER_APDU_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CardReaderAPDUResponse getCardReaderAPDUResponse() { - return cardReaderAPDUResponse; - } - - /** - * Sets the value of the cardReaderAPDUResponse property. - * - * @param value allowed object is {@link CardReaderAPDUResponse } - */ - @JsonProperty(JSON_PROPERTY_CARD_READER_APDU_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCardReaderAPDUResponse(CardReaderAPDUResponse value) { - this.cardReaderAPDUResponse = value; - } - - /** - * Gets the value of the reconciliationResponse property. - * - * @return possible object is {@link ReconciliationResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_RECONCILIATION_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ReconciliationResponse getReconciliationResponse() { - return reconciliationResponse; - } - - /** - * Sets the value of the reconciliationResponse property. - * - * @param value allowed object is {@link ReconciliationResponse } - */ - @JsonProperty(JSON_PROPERTY_RECONCILIATION_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReconciliationResponse(ReconciliationResponse value) { - this.reconciliationResponse = value; - } - - /** - * Gets the value of the reversalResponse property. - * - * @return possible object is {@link ReversalResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_REVERSAL_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ReversalResponse getReversalResponse() { - return reversalResponse; - } - - /** - * Sets the value of the reversalResponse property. - * - * @param value allowed object is {@link ReversalResponse } - */ - @JsonProperty(JSON_PROPERTY_REVERSAL_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReversalResponse(ReversalResponse value) { - this.reversalResponse = value; - } - - /** - * Gets the value of the storedValueResponse property. - * - * @return possible object is {@link StoredValueResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_SOTRED_VALUE_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public StoredValueResponse getStoredValueResponse() { - return storedValueResponse; - } - - /** - * Sets the value of the storedValueResponse property. - * - * @param value allowed object is {@link StoredValueResponse } - */ - @JsonProperty(JSON_PROPERTY_SOTRED_VALUE_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoredValueResponse(StoredValueResponse value) { - this.storedValueResponse = value; - } - - /** - * Gets the value of the transactionStatusResponse property. - * - * @return possible object is {@link TransactionStatusResponse } - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_TRANSACTION_STATUS_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TransactionStatusResponse getTransactionStatusResponse() { - return transactionStatusResponse; - } - - /** - * Sets the value of the transactionStatusResponse property. - * - * @param value allowed object is {@link TransactionStatusResponse } - */ - @JsonProperty(JSON_PROPERTY_TRANSACTION_STATUS_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransactionStatusResponse(TransactionStatusResponse value) { - this.transactionStatusResponse = value; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SaleToPOIResponse {\n"); - try { - sb.append(" saleToPOIResponse: ").append(toIndentedString(this.toJson())).append("\n"); - } catch (JsonProcessingException e) { - sb.append("Error: Could not serialize saleToPOIResponse"); - } - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Create an instance of SaleToPOIResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of SaleToPOIResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to SaleToPOIResponse - */ - public static SaleToPOIResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, SaleToPOIResponse.class); - } - - /** - * Convert an instance of SaleToPOIResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} diff --git a/src/main/java/com/adyen/terminal/TerminalAPIRequest.java b/src/main/java/com/adyen/terminal/TerminalAPIRequest.java deleted file mode 100644 index 86bc6f5a4..000000000 --- a/src/main/java/com/adyen/terminal/TerminalAPIRequest.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.adyen.terminal; - -import com.adyen.model.terminal.JSON; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - -/** - * Terminal API Request - */ -@ApiModel(description = "TerminalAPIRequest") -@JsonPropertyOrder({ - TerminalAPIRequest.JSON_PROPERTY_TERMINAL_REQUEST -}) -public class TerminalAPIRequest { - public static final String JSON_PROPERTY_TERMINAL_REQUEST = "SaleToPOIRequest"; - private SaleToPOIRequest saleToPOIRequest; - - /** - * Gets sale to POI request. - * - * @return the sale to POI request - */ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_TERMINAL_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SaleToPOIRequest getSaleToPOIRequest() { - return saleToPOIRequest; - } - - /** - * Sets sale to POI request. - * - * @param saleToPOIRequest the sale to POI request - */ - @JsonProperty(JSON_PROPERTY_TERMINAL_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleToPOIRequest(SaleToPOIRequest saleToPOIRequest) { - this.saleToPOIRequest = saleToPOIRequest; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TerminalAPIRequest that = (TerminalAPIRequest) o; - return saleToPOIRequest.equals(that.saleToPOIRequest); - } - - @Override - public int hashCode() { - return Objects.hash(saleToPOIRequest); - } - - @Override - public String toString() { - String sb = "class TerminalAPIRequest {\n" + - " saleToPOIRequest: " + toIndentedString(saleToPOIRequest) + "\n" + - "}"; - return sb; - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Create an instance of TerminalAPIRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of TerminalAPIRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to TerminalAPIRequest - */ - public static TerminalAPIRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, TerminalAPIRequest.class); - } - - /** - * Convert an instance of TerminalAPIRequest to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} diff --git a/src/main/java/com/adyen/terminal/TerminalAPIResponse.java b/src/main/java/com/adyen/terminal/TerminalAPIResponse.java deleted file mode 100644 index b4456b2bd..000000000 --- a/src/main/java/com/adyen/terminal/TerminalAPIResponse.java +++ /dev/null @@ -1,131 +0,0 @@ -package com.adyen.terminal; - -import com.adyen.model.terminal.JSON; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - -/** - * Terminal API Response - */ -@ApiModel(description = "TerminalAPIResponse") -@JsonPropertyOrder({ - TerminalAPIResponse.JSON_PROPERTY_TERMINAL_RESPONSE, - TerminalAPIResponse.JSON_PROPERTY_TERMINAL_REQUEST -}) -public class TerminalAPIResponse { - public static final String JSON_PROPERTY_TERMINAL_RESPONSE = "SaleToPOIResponse"; - private com.adyen.terminal.SaleToPOIResponse saleToPOIResponse; - - public static final String JSON_PROPERTY_TERMINAL_REQUEST = "SaleToPOIRequest"; - private com.adyen.terminal.SaleToPOIRequest saleToPOIRequest; - - /** - * Gets sale to POI response. - * - * @return the sale to POI response - */ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_TERMINAL_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SaleToPOIResponse getSaleToPOIResponse() { - return saleToPOIResponse; - } - - /** - * Sets sale to POI response. - * - * @param saleToPOIResponse the sale to POI response - */ - @JsonProperty(JSON_PROPERTY_TERMINAL_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleToPOIResponse(SaleToPOIResponse saleToPOIResponse) { - this.saleToPOIResponse = saleToPOIResponse; - } - - /** - * Gets sale to POI request. - * - * @return the sale to POI request - */ - @ApiModelProperty(required = false, value = "") - @JsonProperty(JSON_PROPERTY_TERMINAL_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SaleToPOIRequest getSaleToPOIRequest() { - return saleToPOIRequest; - } - - /** - * Sets sale to POI request. - * - * @param saleToPOIRequest the sale to POI request - */ - @JsonProperty(JSON_PROPERTY_TERMINAL_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleToPOIRequest(SaleToPOIRequest saleToPOIRequest) { - this.saleToPOIRequest = saleToPOIRequest; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TerminalAPIResponse response = (TerminalAPIResponse) o; - return Objects.equals(saleToPOIResponse, response.saleToPOIResponse) && - Objects.equals(saleToPOIRequest, response.saleToPOIRequest); - } - - @Override - public int hashCode() { - return Objects.hash(saleToPOIResponse, saleToPOIRequest); - } - - @Override - public String toString() { - String sb = "class TerminalAPIRequest {\n" + - " saleToPOIResponse: " + toIndentedString(saleToPOIResponse) + "\n" + - " saleToPOIRequest: " + toIndentedString(saleToPOIRequest) + "\n" + - "}"; - return sb; - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Create an instance of TerminalAPIResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of TerminalAPIResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to TerminalAPIResponse - */ - public static TerminalAPIResponse fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, TerminalAPIResponse.class); - } - - /** - * Convert an instance of TerminalAPIResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} diff --git a/src/main/java/com/adyen/terminal/security/NexoCrypto.java b/src/main/java/com/adyen/terminal/security/NexoCrypto.java index 484778389..830901701 100644 --- a/src/main/java/com/adyen/terminal/security/NexoCrypto.java +++ b/src/main/java/com/adyen/terminal/security/NexoCrypto.java @@ -1,7 +1,31 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 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.security; -import com.adyen.model.terminal.MessageHeader; -import com.adyen.model.terminal.SecurityTrailer; +import com.adyen.model.nexo.MessageHeader; +import com.adyen.model.terminal.security.NexoDerivedKey; +import com.adyen.model.terminal.security.SaleToPOISecuredMessage; +import com.adyen.model.terminal.security.SecurityKey; +import com.adyen.model.terminal.security.SecurityTrailer; import com.adyen.terminal.security.exception.NexoCryptoException; import java.util.Base64; import javax.crypto.BadPaddingException; @@ -20,7 +44,7 @@ import java.security.Provider; import java.security.SecureRandom; -import static com.adyen.terminal.security.NexoDerivedKey.NEXO_IV_LENGTH; +import static com.adyen.model.terminal.security.NexoDerivedKey.NEXO_IV_LENGTH; public class NexoCrypto { @@ -144,7 +168,7 @@ private byte[] generateRandomIvNonce() { byte[] ivNonce = new byte[NEXO_IV_LENGTH]; try { secureRandom = SecureRandom.getInstance("NativePRNGNonBlocking", PROVIDER); - } catch (NoSuchAlgorithmException ex) { + } catch (Exception NoSuchAlgorithmException) { secureRandom = new SecureRandom(); } secureRandom.nextBytes(ivNonce); diff --git a/src/main/java/com/adyen/terminal/security/NexoDerivedKeyGenerator.java b/src/main/java/com/adyen/terminal/security/NexoDerivedKeyGenerator.java index d4c721c22..f77015f2b 100644 --- a/src/main/java/com/adyen/terminal/security/NexoDerivedKeyGenerator.java +++ b/src/main/java/com/adyen/terminal/security/NexoDerivedKeyGenerator.java @@ -1,14 +1,37 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 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.security; +import com.adyen.model.terminal.security.NexoDerivedKey; + import javax.crypto.SecretKeyFactory; import javax.crypto.spec.PBEKeySpec; import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException; import java.util.Arrays; -import static com.adyen.terminal.security.NexoDerivedKey.NEXO_CIPHER_KEY_LENGTH; -import static com.adyen.terminal.security.NexoDerivedKey.NEXO_HMAC_KEY_LENGTH; -import static com.adyen.terminal.security.NexoDerivedKey.NEXO_IV_LENGTH; +import static com.adyen.model.terminal.security.NexoDerivedKey.NEXO_CIPHER_KEY_LENGTH; +import static com.adyen.model.terminal.security.NexoDerivedKey.NEXO_HMAC_KEY_LENGTH; +import static com.adyen.model.terminal.security.NexoDerivedKey.NEXO_IV_LENGTH; final class NexoDerivedKeyGenerator { diff --git a/src/main/java/com/adyen/terminal/security/SaleToPOISecuredMessage.java b/src/main/java/com/adyen/terminal/security/SaleToPOISecuredMessage.java deleted file mode 100644 index f4c46661f..000000000 --- a/src/main/java/com/adyen/terminal/security/SaleToPOISecuredMessage.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.adyen.terminal.security; - -import com.adyen.model.terminal.JSON; -import com.adyen.model.terminal.MessageHeader; -import com.adyen.model.terminal.SecurityTrailer; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - -@ApiModel(description = "SaleToPOISecuredMessage") -@JsonPropertyOrder({ - SaleToPOISecuredMessage.JSON_PROPERTY_MESSAGE_HEADER, - SaleToPOISecuredMessage.JSON_PROPERTY_NEXO_BLOB, - SaleToPOISecuredMessage.JSON_PROPERTY_SECURITY_TRAILER -}) -public class SaleToPOISecuredMessage { - public static final String JSON_PROPERTY_MESSAGE_HEADER = "MessageHeader"; - private MessageHeader messageHeader; - - public static final String JSON_PROPERTY_NEXO_BLOB = "NexoBlob"; - private String nexoBlob; - - public static final String JSON_PROPERTY_SECURITY_TRAILER = "SecurityTrailer"; - private SecurityTrailer securityTrailer; - - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_MESSAGE_HEADER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MessageHeader getMessageHeader() { - return messageHeader; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE_HEADER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessageHeader(MessageHeader messageHeader) { - this.messageHeader = messageHeader; - } - - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_NEXO_BLOB) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNexoBlob() { - return nexoBlob; - } - - @JsonProperty(JSON_PROPERTY_NEXO_BLOB) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNexoBlob(String nexoBlob) { - this.nexoBlob = nexoBlob; - } - - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_SECURITY_TRAILER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityTrailer getSecurityTrailer() { - return securityTrailer; - } - - @JsonProperty(JSON_PROPERTY_SECURITY_TRAILER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecurityTrailer(SecurityTrailer securityTrailer) { - this.securityTrailer = securityTrailer; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SaleToPOISecuredMessage that = (SaleToPOISecuredMessage) o; - return messageHeader.equals(that.messageHeader) && - nexoBlob.equals(that.nexoBlob) && - securityTrailer.equals(that.securityTrailer); - } - - @Override - public int hashCode() { - return Objects.hash(messageHeader, nexoBlob, securityTrailer); - } - - @Override - public String toString() { - return "SaleToPOISecuredMessage{" + - "messageHeader=" + messageHeader + - ", nexoBlob='" + nexoBlob + '\'' + - ", securityTrailer=" + securityTrailer + - '}'; - } - - /** - * Create an instance of SaleToPOISecuredMessage given an JSON string - * - * @param jsonString JSON string - * @return An instance of SaleToPOISecuredMessage - * @throws JsonProcessingException if the JSON string is invalid with respect to SaleToPOISecuredMessage - */ - public static SaleToPOISecuredMessage fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, SaleToPOISecuredMessage.class); - } - - /** - * Convert an instance of SaleToPOISecuredMessage to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} diff --git a/src/main/java/com/adyen/terminal/security/TerminalAPISecuredRequest.java b/src/main/java/com/adyen/terminal/security/TerminalAPISecuredRequest.java deleted file mode 100644 index 61cf3dcb2..000000000 --- a/src/main/java/com/adyen/terminal/security/TerminalAPISecuredRequest.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.adyen.terminal.security; - -import com.adyen.model.terminal.JSON; -import com.adyen.serializer.TerminalByteArraySerializer; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.module.SimpleModule; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - -/** - * Terminal API Secured Request - */ -@ApiModel(description = "TerminalAPISecuredRequest") -@JsonPropertyOrder({ - TerminalAPISecuredRequest.JSON_PROPERTY_TERMINAL_REQUEST -}) -public class TerminalAPISecuredRequest { - public static final String JSON_PROPERTY_TERMINAL_REQUEST = "SaleToPOIRequest"; - private SaleToPOISecuredMessage saleToPOIRequest; - - - /** - * Gets sale to POI request. - * - * @return the sale to POI request - */ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_TERMINAL_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SaleToPOISecuredMessage getSaleToPOIRequest() { - return saleToPOIRequest; - } - - /** - * Sets sale to POI request. - * - * @param saleToPOIRequest the sale to POI request - */ - @JsonProperty(JSON_PROPERTY_TERMINAL_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleToPOIRequest(SaleToPOISecuredMessage saleToPOIRequest) { - this.saleToPOIRequest = saleToPOIRequest; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TerminalAPISecuredRequest that = (TerminalAPISecuredRequest) o; - return saleToPOIRequest.equals(that.saleToPOIRequest); - } - - @Override - public int hashCode() { - return Objects.hash(saleToPOIRequest); - } - - @Override - public String toString() { - return "TerminalAPISecuredRequest{" + - "saleToPOIRequest=" + saleToPOIRequest + - '}'; - } - - /** - * Create an instance of TerminalAPISecuredRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of TerminalAPISecuredRequest - * @throws JsonProcessingException if the JSON string is invalid with respect to TerminalAPISecuredRequest - */ - public static TerminalAPISecuredRequest fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, TerminalAPISecuredRequest.class); - } - - /** - * Convert an instance of TerminalAPISecuredRequest to an JSON string - * WARNING: this serializer uses a custom byte array deserializer for encryption - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - SimpleModule simpleModule = new SimpleModule(); - simpleModule.addSerializer(byte[].class, new TerminalByteArraySerializer()); - - return JSON.getMapper().registerModule(simpleModule).writeValueAsString(this); - } -} diff --git a/src/main/java/com/adyen/terminal/security/TerminalAPISecuredResponse.java b/src/main/java/com/adyen/terminal/security/TerminalAPISecuredResponse.java deleted file mode 100644 index 12a96dd7b..000000000 --- a/src/main/java/com/adyen/terminal/security/TerminalAPISecuredResponse.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.adyen.terminal.security; - -import com.adyen.model.terminal.JSON; -import com.adyen.serializer.TerminalByteArrayDeserializer; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.module.SimpleModule; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - -/** - * Terminal API Secured Response - */ -@ApiModel(description = "TerminalAPISecuredResponse") -@JsonPropertyOrder({ - TerminalAPISecuredResponse.JSON_PROPERTY_TERMINAL_RESPONSE -}) -public class TerminalAPISecuredResponse { - public static final String JSON_PROPERTY_TERMINAL_RESPONSE = "SaleToPOIResponse"; - private SaleToPOISecuredMessage saleToPOIResponse; - - /** - * Gets sale to POI response. - * - * @return the sale to POI response - */ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_TERMINAL_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SaleToPOISecuredMessage getSaleToPOIResponse() { - return saleToPOIResponse; - } - - /** - * Sets sale to POI response. - * - * @param saleToPOIResponse the sale to POI response - */ - @JsonProperty(JSON_PROPERTY_TERMINAL_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSaleToPOIResponse(SaleToPOISecuredMessage saleToPOIResponse) { - this.saleToPOIResponse = saleToPOIResponse; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TerminalAPISecuredResponse that = (TerminalAPISecuredResponse) o; - return Objects.equals(saleToPOIResponse, that.saleToPOIResponse); - } - - @Override - public int hashCode() { - return Objects.hash(saleToPOIResponse); - } - - @Override - public String toString() { - return "TerminalAPISecuredResponse{" + - "saleToPOIResponse=" + saleToPOIResponse + - '}'; - } - - - /** - * Create an instance of TerminalAPISecuredResponse given an JSON string - * - * WARNING: this deserializer uses a custom byte array deserializer for encryption - * - * @param jsonString JSON string - * @return An instance of TerminalAPISecuredResponse - * @throws JsonProcessingException if the JSON string is invalid with respect to TerminalAPISecuredResponse - */ - public static TerminalAPISecuredResponse fromJson(String jsonString) throws JsonProcessingException { - SimpleModule simpleModule = new SimpleModule(); - simpleModule.addDeserializer(byte[].class, new TerminalByteArrayDeserializer()); - return JSON.getMapper().registerModule(simpleModule).readValue(jsonString, TerminalAPISecuredResponse.class); - } - - /** - * Convert an instance of TerminalAPISecuredResponse to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} diff --git a/src/main/java/com/adyen/terminal/security/TerminalCommonNameValidator.java b/src/main/java/com/adyen/terminal/security/TerminalCommonNameValidator.java index 83a01eb26..bc6611a91 100644 --- a/src/main/java/com/adyen/terminal/security/TerminalCommonNameValidator.java +++ b/src/main/java/com/adyen/terminal/security/TerminalCommonNameValidator.java @@ -1,3 +1,24 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 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.security; import com.adyen.enums.Environment; diff --git a/src/main/java/com/adyen/terminal/serialization/ByteArrayToBase64TypeAdapter.java b/src/main/java/com/adyen/terminal/serialization/ByteArrayToBase64TypeAdapter.java new file mode 100644 index 000000000..7e805e50f --- /dev/null +++ b/src/main/java/com/adyen/terminal/serialization/ByteArrayToBase64TypeAdapter.java @@ -0,0 +1,42 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 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.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonParseException; +import com.google.gson.JsonPrimitive; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import java.util.Base64; +import java.lang.reflect.Type; + +public class ByteArrayToBase64TypeAdapter implements JsonSerializer, JsonDeserializer { + public byte[] deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { + return Base64.getDecoder().decode(json.getAsString().getBytes()); + } + + public JsonElement serialize(byte[] src, Type typeOfSrc, JsonSerializationContext context) { + return new JsonPrimitive(new String(Base64.getEncoder().encode(src))); + } +} diff --git a/src/main/java/com/adyen/terminal/serialization/TerminalAPIGsonBuilder.java b/src/main/java/com/adyen/terminal/serialization/TerminalAPIGsonBuilder.java new file mode 100644 index 000000000..cdf276f0e --- /dev/null +++ b/src/main/java/com/adyen/terminal/serialization/TerminalAPIGsonBuilder.java @@ -0,0 +1,61 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 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.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() { + } + + 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(); + + return gsonBuilder.create(); + } +} diff --git a/src/main/java/com/adyen/terminal/serialization/XMLEnumAdapterFactory.java b/src/main/java/com/adyen/terminal/serialization/XMLEnumAdapterFactory.java new file mode 100644 index 000000000..7476f0167 --- /dev/null +++ b/src/main/java/com/adyen/terminal/serialization/XMLEnumAdapterFactory.java @@ -0,0 +1,38 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 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.google.gson.Gson; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +public class XMLEnumAdapterFactory implements TypeAdapterFactory { + @Override + public TypeAdapter create(final Gson gson, final TypeToken type) { + Class rawType = type.getRawType(); + if (rawType.isEnum()) { + return new XMLEnumTypeAdapter<>(rawType); + } + return null; + } +} \ No newline at end of file diff --git a/src/main/java/com/adyen/terminal/serialization/XMLEnumTypeAdapter.java b/src/main/java/com/adyen/terminal/serialization/XMLEnumTypeAdapter.java new file mode 100644 index 000000000..122343f4a --- /dev/null +++ b/src/main/java/com/adyen/terminal/serialization/XMLEnumTypeAdapter.java @@ -0,0 +1,87 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 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.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonToken; +import com.google.gson.stream.JsonWriter; + +import javax.xml.bind.annotation.XmlEnumValue; +import java.io.IOException; +import java.lang.reflect.Method; + +public class XMLEnumTypeAdapter extends TypeAdapter { + + private final Class clazz; + + public XMLEnumTypeAdapter(Class clazz) { + this.clazz = clazz; + } + + @Override + public void write(JsonWriter out, T value) throws IOException { + if (value == null || !value.getClass().isEnum()) { + out.nullValue(); + return; + } + + Enum enumValue = (Enum) value; + try { + if (enumValue.getClass().getField(enumValue.name()).getAnnotation(XmlEnumValue.class) != null) { + XmlEnumValue xmlEnumValue = enumValue.getClass().getField(enumValue.name()).getAnnotation(XmlEnumValue.class); + out.value(xmlEnumValue.value()); + } else { + out.value(enumValue.name()); + } + } catch (Exception e) { + throw new IOException(e); + } + } + + public T read(JsonReader in) throws IOException { + JsonToken token = in.peek(); + if (token == JsonToken.NULL) { + in.nextNull(); + return null; + } + + String value = in.nextString(); + T enumObject = null; + try { + Method[] methods = clazz.getMethods(); + for (Method m : methods) { + if ("fromValue".equals(m.getName())) { + enumObject = (T) m.invoke(null, value); + } + } + + if (enumObject == null) { + enumObject = (T) Enum.valueOf(Enum.class, value); + } + } catch (Exception e) { + throw new IOException(e); + } + + return enumObject; + } +} diff --git a/src/main/java/com/adyen/terminal/serialization/XMLGregorianCalendarTypeAdapter.java b/src/main/java/com/adyen/terminal/serialization/XMLGregorianCalendarTypeAdapter.java new file mode 100644 index 000000000..c6ecf4554 --- /dev/null +++ b/src/main/java/com/adyen/terminal/serialization/XMLGregorianCalendarTypeAdapter.java @@ -0,0 +1,52 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 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.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonParseException; +import com.google.gson.JsonPrimitive; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; + +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; +import java.lang.reflect.Type; + +public class XMLGregorianCalendarTypeAdapter implements JsonSerializer, JsonDeserializer { + @Override + public XMLGregorianCalendar deserialize( + JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) + throws JsonParseException { + try { + return DatatypeFactory.newInstance().newXMLGregorianCalendar(jsonElement.getAsString()); + } catch (Exception e) { + throw new JsonParseException(e); + } + } + + @Override + public JsonElement serialize(XMLGregorianCalendar xmlGregorianCalendar, Type type, JsonSerializationContext jsonSerializationContext) { + return new JsonPrimitive(xmlGregorianCalendar.toString()); + } +} diff --git a/src/test/java/com/adyen/BaseTest.java b/src/test/java/com/adyen/BaseTest.java index 861ed62b6..0ddee2809 100644 --- a/src/test/java/com/adyen/BaseTest.java +++ b/src/test/java/com/adyen/BaseTest.java @@ -24,20 +24,35 @@ import com.adyen.enums.VatCategory; import com.adyen.httpclient.AdyenHttpClient; import com.adyen.httpclient.HTTPClientException; +import com.adyen.model.nexo.AmountsReq; +import com.adyen.model.nexo.MessageCategoryType; +import com.adyen.model.nexo.MessageClassType; +import com.adyen.model.nexo.MessageHeader; +import com.adyen.model.nexo.MessageType; +import com.adyen.model.nexo.PaymentTransaction; +import com.adyen.model.nexo.SaleData; +import com.adyen.model.nexo.SaleToPOIRequest; +import com.adyen.model.nexo.TransactionIdentification; +import com.adyen.model.payment.ApplicationInfo; import com.adyen.model.payment.AuthenticationResultRequest; import com.adyen.model.payment.BrowserInfo; import com.adyen.model.payment.Card; +import com.adyen.model.payment.CommonField; import com.adyen.model.payment.Name; import com.adyen.model.payment.PaymentRequest3d; import com.adyen.model.payment.PaymentRequest3ds2; import com.adyen.model.payment.ThreeDS2RequestData; -import com.adyen.model.terminal.*; +import com.adyen.model.terminal.TerminalAPIRequest; import com.adyen.model.additionalData.InvoiceLine; import com.adyen.model.payment.PaymentRequest; -import com.adyen.terminal.SaleToPOIRequest; +import com.adyen.terminal.serialization.XMLGregorianCalendarTypeAdapter; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; @@ -46,14 +61,22 @@ import java.time.OffsetDateTime; import java.util.*; +import static com.adyen.Client.LIB_NAME; +import static com.adyen.Client.LIB_VERSION; import static org.junit.Assert.fail; import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; public class BaseTest { + protected final ApplicationInfo applicationInfo = new ApplicationInfo() + .adyenLibrary(new CommonField().name(LIB_NAME).version(LIB_VERSION)); + protected static final Gson PRETTY_PRINT_GSON = new GsonBuilder() + .registerTypeHierarchyAdapter(XMLGregorianCalendar.class, new XMLGregorianCalendarTypeAdapter()) + .setPrettyPrinting().create(); public static final String USER_AGENT = "User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36"; + private static final String CHECKOUT_ENDPOINT_TEST = "https://checkout-test.adyen.com/checkout"; /** * Returns a Client object that has a mocked response */ @@ -301,13 +324,13 @@ protected Client createMockClientForErrors(int status, String fileName) { return client; } - protected com.adyen.terminal.TerminalAPIRequest createTerminalAPIPaymentRequest() throws DatatypeConfigurationException { + protected TerminalAPIRequest createTerminalAPIPaymentRequest() throws DatatypeConfigurationException { SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest(); MessageHeader messageHeader = new MessageHeader(); messageHeader.setProtocolVersion("3.0"); - messageHeader.setMessageClass(MessageClass.SERVICE); - messageHeader.setMessageCategory(MessageCategory.PAYMENT); + messageHeader.setMessageClass(MessageClassType.SERVICE); + messageHeader.setMessageCategory(MessageCategoryType.PAYMENT); messageHeader.setMessageType(MessageType.REQUEST); messageHeader.setSaleID("001"); messageHeader.setServiceID("001"); @@ -315,12 +338,13 @@ protected com.adyen.terminal.TerminalAPIRequest createTerminalAPIPaymentRequest( saleToPOIRequest.setMessageHeader(messageHeader); - com.adyen.model.terminal.PaymentRequest paymentRequest = new com.adyen.model.terminal.PaymentRequest(); + com.adyen.model.nexo.PaymentRequest paymentRequest = new com.adyen.model.nexo.PaymentRequest(); SaleData saleData = new SaleData(); - TransactionIDType transactionIdentification = new TransactionIDType(); + TransactionIdentification transactionIdentification = new TransactionIdentification(); transactionIdentification.setTransactionID("001"); -// transactionIdentification.setTimeStamp(null); + XMLGregorianCalendar timestamp = DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar()); + transactionIdentification.setTimeStamp(timestamp); saleData.setSaleTransactionID(transactionIdentification); PaymentTransaction paymentTransaction = new PaymentTransaction(); @@ -334,7 +358,7 @@ protected com.adyen.terminal.TerminalAPIRequest createTerminalAPIPaymentRequest( saleToPOIRequest.setPaymentRequest(paymentRequest); - com.adyen.terminal.TerminalAPIRequest terminalAPIRequest = new com.adyen.terminal.TerminalAPIRequest(); + TerminalAPIRequest terminalAPIRequest = new TerminalAPIRequest(); terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest); return terminalAPIRequest; diff --git a/src/test/java/com/adyen/NexoCryptoTest.java b/src/test/java/com/adyen/NexoCryptoTest.java index 6e48035b9..ddfad4af6 100644 --- a/src/test/java/com/adyen/NexoCryptoTest.java +++ b/src/test/java/com/adyen/NexoCryptoTest.java @@ -20,11 +20,11 @@ */ package com.adyen; -import com.adyen.model.terminal.MessageHeader; -import com.adyen.terminal.TerminalAPIRequest; +import com.adyen.model.nexo.MessageHeader; +import com.adyen.model.terminal.TerminalAPIRequest; +import com.adyen.model.terminal.security.SaleToPOISecuredMessage; +import com.adyen.model.terminal.security.SecurityKey; import com.adyen.terminal.security.NexoCrypto; -import com.adyen.terminal.security.SaleToPOISecuredMessage; -import com.adyen.terminal.security.SecurityKey; import com.adyen.terminal.security.exception.NexoCryptoException; import org.junit.BeforeClass; import org.junit.Test; @@ -54,7 +54,7 @@ public static void setUp() { public void testEncryption() throws Exception { TerminalAPIRequest terminalAPIRequest = createTerminalAPIPaymentRequest(); MessageHeader messageHeader = terminalAPIRequest.getSaleToPOIRequest().getMessageHeader(); - String requestJson = terminalAPIRequest.toJson(); + String requestJson = PRETTY_PRINT_GSON.toJson(terminalAPIRequest); NexoCrypto nexoCrypto = new NexoCrypto(testSecurityKey); @@ -69,7 +69,7 @@ public void testEncryption() throws Exception { public void testDecryption() throws Exception { TerminalAPIRequest terminalAPIRequest = createTerminalAPIPaymentRequest(); MessageHeader messageHeader = terminalAPIRequest.getSaleToPOIRequest().getMessageHeader(); - String requestJson = terminalAPIRequest.toJson(); + String requestJson = PRETTY_PRINT_GSON.toJson(terminalAPIRequest); NexoCrypto nexoCrypto = new NexoCrypto(testSecurityKey); @@ -88,7 +88,7 @@ public void testEncryptionWithInvalidSecurityKey() throws Exception { public void testDecryptionWithInvalidHmac() throws Exception { TerminalAPIRequest terminalAPIRequest = createTerminalAPIPaymentRequest(); MessageHeader messageHeader = terminalAPIRequest.getSaleToPOIRequest().getMessageHeader(); - String requestJson = terminalAPIRequest.toJson(); + String requestJson = PRETTY_PRINT_GSON.toJson(terminalAPIRequest); NexoCrypto nexoCrypto = new NexoCrypto(testSecurityKey); diff --git a/src/test/java/com/adyen/TerminalConnectedApiTest.java b/src/test/java/com/adyen/PosPaymentTest.java similarity index 52% rename from src/test/java/com/adyen/TerminalConnectedApiTest.java rename to src/test/java/com/adyen/PosPaymentTest.java index 24d1a75c5..6b1345e94 100644 --- a/src/test/java/com/adyen/TerminalConnectedApiTest.java +++ b/src/test/java/com/adyen/PosPaymentTest.java @@ -1,9 +1,29 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ package com.adyen; -import com.adyen.service.TerminalConnectedApi; +import com.adyen.model.terminal.ConnectedTerminalsRequest; +import com.adyen.model.terminal.ConnectedTerminalsResponse; +import com.adyen.service.PosPayment; import com.adyen.service.exception.ApiException; -import com.adyen.terminal.ConnectedTerminalsRequest; -import com.adyen.terminal.ConnectedTerminalsResponse; import org.junit.Test; import static org.junit.Assert.assertEquals; @@ -11,15 +31,15 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -public class TerminalConnectedApiTest extends BaseTest { +public class PosPaymentTest extends BaseTest { @Test public void testConnectedTerminalsSuccess() throws Exception { Client client = createMockClientFromFile("mocks/pos/connectedTerminals-success.json"); - TerminalConnectedApi terminalConnectedApi = new TerminalConnectedApi(client); + PosPayment posPayment = new PosPayment(client); ConnectedTerminalsRequest request = new ConnectedTerminalsRequest(); - ConnectedTerminalsResponse result = terminalConnectedApi.connectedTerminals(request); + ConnectedTerminalsResponse result = posPayment.connectedTerminals(request); assertEquals(2, result.getUniqueTerminalIds().size()); } @@ -27,12 +47,12 @@ public void testConnectedTerminalsSuccess() throws Exception { @Test public void testConnectedTerminalsErrorInvalidMerchant() throws Exception { Client client = createMockClientForErrors(403, "mocks/pos/connectedTerminals-error-403.json"); - TerminalConnectedApi terminalConnectedApi = new TerminalConnectedApi(client); + PosPayment posPayment = new PosPayment(client); ConnectedTerminalsRequest request = new ConnectedTerminalsRequest(); try { - terminalConnectedApi.connectedTerminals(request); + posPayment.connectedTerminals(request); fail("Exception expected"); } catch (ApiException e) { assertNotNull(e.getResponseBody()); @@ -44,12 +64,12 @@ public void testConnectedTerminalsErrorInvalidMerchant() throws Exception { @Test public void testConnectedTerminalsErrorMissingMerchant() throws Exception { Client client = createMockClientForErrors(500, "mocks/pos/connectedTerminals-error-500.json"); - TerminalConnectedApi terminalConnectedApi = new TerminalConnectedApi(client); + PosPayment posPayment = new PosPayment(client); ConnectedTerminalsRequest request = new ConnectedTerminalsRequest(); try { - terminalConnectedApi.connectedTerminals(request); + posPayment.connectedTerminals(request); fail("Exception expected"); } catch (ApiException e) { assertNotNull(e.getResponseBody()); diff --git a/src/test/java/com/adyen/TerminalCloudAPITest.java b/src/test/java/com/adyen/TerminalCloudAPITest.java index 30be2b4e2..af076a22f 100644 --- a/src/test/java/com/adyen/TerminalCloudAPITest.java +++ b/src/test/java/com/adyen/TerminalCloudAPITest.java @@ -1,33 +1,48 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ package com.adyen; -import com.adyen.enums.Environment; -import com.adyen.httpclient.TerminalLocalAPIHostnameVerifier; -import com.adyen.model.applicationinfo.ApplicationInfo; -import com.adyen.model.applicationinfo.CommonField; +import com.adyen.model.nexo.MessageCategoryType; +import com.adyen.model.nexo.MessageClassType; +import com.adyen.model.nexo.MessageHeader; +import com.adyen.model.nexo.MessageType; +import com.adyen.model.nexo.OutputFormatType; +import com.adyen.model.nexo.OutputText; +import com.adyen.model.nexo.POIData; +import com.adyen.model.nexo.PaymentInstrumentType; +import com.adyen.model.nexo.PaymentReceipt; +import com.adyen.model.nexo.PaymentRequest; +import com.adyen.model.nexo.PaymentResult; +import com.adyen.model.nexo.Response; +import com.adyen.model.nexo.ResultType; +import com.adyen.model.nexo.SaleData; +import com.adyen.model.nexo.SaleToPOIRequest; +import com.adyen.model.nexo.SaleToPOIResponse; +import com.adyen.model.terminal.SaleToAcquirerData; +import com.adyen.model.terminal.TerminalAPIRequest; +import com.adyen.model.terminal.TerminalAPIResponse; import com.adyen.service.TerminalCloudAPI; -import com.adyen.service.TerminalLocalAPI; -import com.adyen.service.TerminalLocalAPIUnencrypted; -import com.adyen.service.exception.ApiException; -import com.adyen.terminal.*; -import com.adyen.model.terminal.*; -import com.adyen.terminal.TerminalAPIRequest; -import com.adyen.terminal.TerminalAPIResponse; -import com.adyen.terminal.security.SecurityKey; -import com.fasterxml.jackson.core.JsonProcessingException; import org.junit.Test; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManagerFactory; -import java.io.FileInputStream; -import java.io.IOException; import java.math.BigDecimal; -import java.security.KeyStore; -import java.security.PublicKey; -import java.security.SecureRandom; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; import java.util.List; import static org.junit.Assert.assertEquals; @@ -49,7 +64,11 @@ public void asyncPaymentRequestSuccess() throws Exception { Client client = createMockClientFromFile("mocks/terminal-api/payment-async-success"); TerminalCloudAPI terminalCloudApi = new TerminalCloudAPI(client); - String requestResponse = terminalCloudApi.async(new TerminalAPIRequest()); + TerminalAPIRequest terminalAPIPaymentRequest = createTerminalAPIPaymentRequest(); + + String requestResponse = terminalCloudApi.async(terminalAPIPaymentRequest); + + assertNotNull(requestResponse); assertEquals("ok", requestResponse); } @@ -61,13 +80,14 @@ public void syncPaymentRequestSuccess() throws Exception { Client client = createMockClientFromFile("mocks/terminal-api/payment-sync-success.json"); TerminalCloudAPI terminalCloudApi = new TerminalCloudAPI(client); - TerminalAPIRequest terminalAPIPaymentRequest = new TerminalAPIRequest(); + TerminalAPIRequest terminalAPIPaymentRequest = createTerminalAPIPaymentRequest(); // add some data SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest(); PaymentRequest paymentRequest = new PaymentRequest(); SaleData saleDataRequest = new SaleData(); - saleDataRequest.setSaleToAcquirerData("saleToAcquirerData"); + SaleToAcquirerData saleToAcquirerData = new SaleToAcquirerData(); + saleDataRequest.setSaleToAcquirerData(saleToAcquirerData); paymentRequest.setSaleData(saleDataRequest); saleToPOIRequest.setPaymentRequest(paymentRequest); terminalAPIPaymentRequest.setSaleToPOIRequest(saleToPOIRequest); @@ -83,8 +103,8 @@ public void syncPaymentRequestSuccess() throws Exception { MessageHeader messageHeader = saleToPoiResponse.getMessageHeader(); assertEquals(MessageType.RESPONSE, messageHeader.getMessageType()); - assertEquals(MessageClass.SERVICE, messageHeader.getMessageClass()); - assertEquals(MessageCategory.PAYMENT, messageHeader.getMessageCategory()); + assertEquals(MessageClassType.SERVICE, messageHeader.getMessageClass()); + assertEquals(MessageCategoryType.PAYMENT, messageHeader.getMessageCategory()); assertEquals("3.0", messageHeader.getProtocolVersion()); assertEquals("001", messageHeader.getSaleID()); assertEquals("1234567890", messageHeader.getServiceID()); @@ -92,21 +112,21 @@ public void syncPaymentRequestSuccess() throws Exception { assertNotNull(saleToPoiResponse.getPaymentResponse().getResponse()); Response response = saleToPoiResponse.getPaymentResponse().getResponse(); - assertEquals(Result.SUCCESS, response.getResult()); + assertEquals(ResultType.SUCCESS, response.getResult()); assertNotNull(response.getAdditionalResponse()); - assertNotNull(saleToPoiResponse.getPaymentResponse().getPoIData()); - POIData poiData = saleToPoiResponse.getPaymentResponse().getPoIData(); - assertEquals(1000, poiData.getPoIReconciliationID().intValue()); - assertNotNull(poiData.getPoITransactionID()); - assertEquals("4r7i001556529591000.8515565295894301", poiData.getPoITransactionID().getTransactionID()); - assertEquals("2019-04-29T00:00Z", poiData.getPoITransactionID().getTimeStamp().toString()); + assertNotNull(saleToPoiResponse.getPaymentResponse().getPOIData()); + POIData poiData = saleToPoiResponse.getPaymentResponse().getPOIData(); + assertEquals("1000", poiData.getPOIReconciliationID()); + assertNotNull(poiData.getPOITransactionID()); + assertEquals("4r7i001556529591000.8515565295894301", poiData.getPOITransactionID().getTransactionID()); + assertEquals("2019-04-29T00:00:00.000Z", poiData.getPOITransactionID().getTimeStamp().toString()); assertNotNull(saleToPoiResponse.getPaymentResponse().getSaleData()); SaleData saleData = saleToPoiResponse.getPaymentResponse().getSaleData(); assertNotNull(saleData.getSaleTransactionID()); assertEquals("001", saleData.getSaleTransactionID().getTransactionID()); - assertEquals("2019-04-29T00:00Z", saleData.getSaleTransactionID().getTimeStamp().toString()); + assertEquals("2019-04-29T00:00:00.000Z", saleData.getSaleTransactionID().getTimeStamp().toString()); assertNotNull(saleToPoiResponse.getPaymentResponse().getPaymentReceipt()); assertFalse(saleToPoiResponse.getPaymentResponse().getPaymentReceipt().isEmpty()); @@ -114,7 +134,7 @@ public void syncPaymentRequestSuccess() throws Exception { for (PaymentReceipt paymentReceipt : paymentReceiptList) { assertNotNull(paymentReceipt.getDocumentQualifier()); assertNotNull(paymentReceipt.getOutputContent()); - assertEquals(OutputFormat.TEXT, paymentReceipt.getOutputContent().getOutputFormat()); + assertEquals(OutputFormatType.TEXT, paymentReceipt.getOutputContent().getOutputFormat()); assertNotNull(paymentReceipt.getOutputContent().getOutputText()); assertFalse(paymentReceipt.getOutputContent().getOutputText().isEmpty()); List outputTextList = paymentReceipt.getOutputContent().getOutputText(); @@ -124,7 +144,7 @@ public void syncPaymentRequestSuccess() throws Exception { assertNotNull(saleToPoiResponse.getPaymentResponse().getPaymentResult()); PaymentResult paymentResult = saleToPoiResponse.getPaymentResponse().getPaymentResult(); - assertTrue(paymentResult.getOnlineFlag()); + assertTrue(paymentResult.isOnlineFlag()); assertNotNull(paymentResult.getPaymentAcquirerData()); assertEquals("P400Plus-123456789", paymentResult.getPaymentAcquirerData().getAcquirerPOIID()); assertEquals("123456", paymentResult.getPaymentAcquirerData().getApprovalCode()); @@ -133,7 +153,7 @@ public void syncPaymentRequestSuccess() throws Exception { assertNotNull(paymentResult.getPaymentInstrumentData()); assertNotNull(paymentResult.getPaymentInstrumentData().getCardData()); assertEquals("mc", paymentResult.getPaymentInstrumentData().getCardData().getPaymentBrand()); - assertEquals("411111 **** 1111", paymentResult.getPaymentInstrumentData().getCardData().getMaskedPan()); + assertEquals("411111 **** 1111", paymentResult.getPaymentInstrumentData().getCardData().getMaskedPAN()); assertEquals(PaymentInstrumentType.CARD, paymentResult.getPaymentInstrumentData().getPaymentInstrumentType()); assertNotNull(paymentResult.getAmountsResp()); assertEquals("EUR", paymentResult.getAmountsResp().getCurrency()); @@ -141,9 +161,9 @@ public void syncPaymentRequestSuccess() throws Exception { assertNotNull(paymentResult.getCurrencyConversion()); assertNotNull(paymentResult.getCurrencyConversion().get(0)); - assertTrue(paymentResult.getCurrencyConversion().get(0).getCustomerApprovedFlag()); - assertEquals("3", paymentResult.getCurrencyConversion().get(0).getMarkup()); - assertEquals("0.035", paymentResult.getCurrencyConversion().get(0).getRate()); + assertTrue(paymentResult.getCurrencyConversion().get(0).isCustomerApprovedFlag()); + assertEquals(new BigDecimal("3"), paymentResult.getCurrencyConversion().get(0).getMarkup()); + assertEquals(new BigDecimal("0.035"), paymentResult.getCurrencyConversion().get(0).getRate()); assertNotNull(paymentResult.getCurrencyConversion().get(0).getConvertedAmount()); assertEquals(new BigDecimal("48.32"), paymentResult.getCurrencyConversion().get(0).getConvertedAmount().getAmountValue()); assertEquals("EUR", paymentResult.getCurrencyConversion().get(0).getConvertedAmount().getCurrency()); @@ -158,7 +178,7 @@ public void syncPaymentRequestErrorEmptyBody() throws Exception { Client client = createMockClientFromFile("mocks/terminal-api/payment-sync-error-empty.json"); TerminalCloudAPI terminalCloudApi = new TerminalCloudAPI(client); - TerminalAPIResponse terminalAPIResponse = terminalCloudApi.sync(new TerminalAPIRequest()); + TerminalAPIResponse terminalAPIResponse = terminalCloudApi.sync(null); assertNotNull(terminalAPIResponse); assertNotNull(terminalAPIResponse.getSaleToPOIRequest()); @@ -172,7 +192,7 @@ public void syncAbortRequestSuccess() throws Exception { Client client = createMockClientFromFile("mocks/terminal-api/abort-sync-success"); TerminalCloudAPI terminalCloudApi = new TerminalCloudAPI(client); - TerminalAPIRequest terminalAPIAbortRequest = new TerminalAPIRequest(); + TerminalAPIRequest terminalAPIAbortRequest = createTerminalAPIPaymentRequest(); TerminalAPIResponse terminalAPIResponse = terminalCloudApi.sync(terminalAPIAbortRequest); @@ -195,7 +215,7 @@ public void syncInputRequestSuccess() throws Exception { assertNotNull(requestResponse.getSaleToPOIResponse().getInputResponse().getInputResult()); assertNotNull(requestResponse.getSaleToPOIResponse().getInputResponse().getInputResult().getInput()); assertNotNull(requestResponse.getSaleToPOIResponse().getInputResponse().getInputResult().getInput().getMenuEntryNumber()); - assertEquals(2, requestResponse.getSaleToPOIResponse().getInputResponse().getInputResult().getInput().getMenuEntryNumber().size()); + assertEquals(2, requestResponse.getSaleToPOIResponse().getInputResponse().getInputResult().getInput().getMenuEntryNumber().length); } /** @@ -206,13 +226,14 @@ public void syncPaymentRequestStoredValueSuccess() throws Exception { Client client = createMockClientFromFile("mocks/terminal-api/payment-sync-success-storedvalue.json"); TerminalCloudAPI terminalCloudApi = new TerminalCloudAPI(client); - TerminalAPIRequest terminalAPIPaymentRequest = new TerminalAPIRequest(); + TerminalAPIRequest terminalAPIPaymentRequest = createTerminalAPIPaymentRequest(); // add some data SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest(); PaymentRequest paymentRequest = new PaymentRequest(); SaleData saleDataRequest = new SaleData(); - saleDataRequest.setSaleToAcquirerData("Base64string"); + SaleToAcquirerData saleToAcquirerData = new SaleToAcquirerData(); + saleDataRequest.setSaleToAcquirerData(saleToAcquirerData); paymentRequest.setSaleData(saleDataRequest); saleToPOIRequest.setPaymentRequest(paymentRequest); terminalAPIPaymentRequest.setSaleToPOIRequest(saleToPOIRequest); @@ -228,8 +249,8 @@ public void syncPaymentRequestStoredValueSuccess() throws Exception { MessageHeader messageHeader = saleToPoiResponse.getMessageHeader(); assertEquals(MessageType.RESPONSE, messageHeader.getMessageType()); - assertEquals(MessageClass.SERVICE, messageHeader.getMessageClass()); - assertEquals(MessageCategory.STOREDVALUE, messageHeader.getMessageCategory()); + assertEquals(MessageClassType.SERVICE, messageHeader.getMessageClass()); + assertEquals(MessageCategoryType.STORED_VALUE, messageHeader.getMessageCategory()); assertEquals("3.0", messageHeader.getProtocolVersion()); assertEquals("001", messageHeader.getSaleID()); assertEquals("1234567890", messageHeader.getServiceID()); @@ -237,21 +258,21 @@ public void syncPaymentRequestStoredValueSuccess() throws Exception { assertNotNull(saleToPoiResponse.getStoredValueResponse().getResponse()); Response response = saleToPoiResponse.getStoredValueResponse().getResponse(); - assertEquals(Result.SUCCESS, response.getResult()); + assertEquals(ResultType.SUCCESS, response.getResult()); assertNotNull(response.getAdditionalResponse()); - assertNotNull(saleToPoiResponse.getStoredValueResponse().getPoIData()); - POIData poiData = saleToPoiResponse.getStoredValueResponse().getPoIData(); - assertEquals(1000, poiData.getPoIReconciliationID().intValue()); - assertNotNull(poiData.getPoIReconciliationID()); - assertEquals("4r7i001556529591000.8515565295894301", poiData.getPoITransactionID().getTransactionID()); - assertEquals("2019-04-29T00:00Z", poiData.getPoITransactionID().getTimeStamp().toString()); + assertNotNull(saleToPoiResponse.getStoredValueResponse().getPOIData()); + POIData poiData = saleToPoiResponse.getStoredValueResponse().getPOIData(); + assertEquals("1000", poiData.getPOIReconciliationID()); + assertNotNull(poiData.getPOITransactionID()); + assertEquals("4r7i001556529591000.8515565295894301", poiData.getPOITransactionID().getTransactionID()); + assertEquals("2019-04-29T00:00:00.000Z", poiData.getPOITransactionID().getTimeStamp().toString()); assertNotNull(saleToPoiResponse.getStoredValueResponse().getSaleData()); SaleData saleData = saleToPoiResponse.getStoredValueResponse().getSaleData(); assertNotNull(saleData.getSaleTransactionID()); assertEquals("001", saleData.getSaleTransactionID().getTransactionID()); - assertEquals("2019-04-29T00:00Z", saleData.getSaleTransactionID().getTimeStamp().toString()); + assertEquals("2019-04-29T00:00:00.000Z", saleData.getSaleTransactionID().getTimeStamp().toString()); assertNotNull(saleToPoiResponse.getStoredValueResponse().getPaymentReceipt()); assertFalse(saleToPoiResponse.getStoredValueResponse().getPaymentReceipt().isEmpty()); @@ -259,7 +280,7 @@ public void syncPaymentRequestStoredValueSuccess() throws Exception { for (PaymentReceipt paymentReceipt : paymentReceiptList) { assertNotNull(paymentReceipt.getDocumentQualifier()); assertNotNull(paymentReceipt.getOutputContent()); - assertEquals(OutputFormat.TEXT, paymentReceipt.getOutputContent().getOutputFormat()); + assertEquals(OutputFormatType.TEXT, paymentReceipt.getOutputContent().getOutputFormat()); assertNotNull(paymentReceipt.getOutputContent().getOutputText()); assertFalse(paymentReceipt.getOutputContent().getOutputText().isEmpty()); List outputTextList = paymentReceipt.getOutputContent().getOutputText(); diff --git a/src/test/java/com/adyen/TerminalLocalAPITest.java b/src/test/java/com/adyen/TerminalLocalAPITest.java index f127103bc..030a43fe2 100644 --- a/src/test/java/com/adyen/TerminalLocalAPITest.java +++ b/src/test/java/com/adyen/TerminalLocalAPITest.java @@ -20,13 +20,25 @@ */ package com.adyen; -import com.adyen.terminal.TerminalAPIRequest; -import com.adyen.terminal.TerminalAPIResponse; -import com.adyen.model.terminal.*; -import com.adyen.terminal.*; +import com.adyen.model.nexo.MessageCategoryType; +import com.adyen.model.nexo.MessageClassType; +import com.adyen.model.nexo.MessageHeader; +import com.adyen.model.nexo.MessageType; +import com.adyen.model.nexo.OutputFormatType; +import com.adyen.model.nexo.OutputText; +import com.adyen.model.nexo.POIData; +import com.adyen.model.nexo.PaymentInstrumentType; +import com.adyen.model.nexo.PaymentReceipt; +import com.adyen.model.nexo.PaymentResult; +import com.adyen.model.nexo.Response; +import com.adyen.model.nexo.ResultType; +import com.adyen.model.nexo.SaleData; +import com.adyen.model.nexo.SaleToPOIResponse; +import com.adyen.model.terminal.TerminalAPIRequest; +import com.adyen.model.terminal.TerminalAPIResponse; +import com.adyen.model.terminal.security.SecurityKey; import com.adyen.service.TerminalLocalAPI; import com.adyen.service.TerminalLocalAPIUnencrypted; -import com.adyen.terminal.security.SecurityKey; import org.junit.Test; import java.math.BigDecimal; @@ -41,90 +53,89 @@ * Tests for local Terminal API request */ public class TerminalLocalAPITest extends BaseTest { -// TODO fix this test (need to change the security details as the hmac validation throws an error because we changed the payload) - -// /** -// * Test success flow for local request -// */ -// @Test -// public void syncPaymentRequestSuccess() throws Exception { -// Client client = createMockClientFromFile("mocks/terminal-api/payment-local-success.json"); -// SecurityKey securityKey = new SecurityKey(); -// securityKey.setKeyVersion(1); -// securityKey.setAdyenCryptoVersion(1); -// securityKey.setKeyIdentifier("CryptoKeyIdentifier12345"); -// securityKey.setPassphrase("p@ssw0rd123456"); -// TerminalLocalAPI terminalLocalApi = new TerminalLocalAPI(client, securityKey); -// -// TerminalAPIRequest terminalAPIPaymentRequest = createTerminalAPIPaymentRequest(); -// TerminalAPIResponse terminalAPIResponse = terminalLocalApi.request(terminalAPIPaymentRequest); -// -// assertNotNull(terminalAPIResponse); -// assertNotNull(terminalAPIResponse.getSaleToPOIResponse()); -// -// SaleToPOIResponse saleToPoiResponse = terminalAPIResponse.getSaleToPOIResponse(); -// assertNotNull(saleToPoiResponse.getMessageHeader()); -// assertNotNull(saleToPoiResponse.getPaymentResponse()); -// -// MessageHeader messageHeader = saleToPoiResponse.getMessageHeader(); -// assertEquals(MessageType.RESPONSE, messageHeader.getMessageType()); -// assertEquals(MessageClass.SERVICE, messageHeader.getMessageClass()); -// assertEquals(MessageCategory.PAYMENT, messageHeader.getMessageCategory()); -// assertEquals("3.0", messageHeader.getProtocolVersion()); -// assertEquals("325488592", messageHeader.getSaleID()); -// assertEquals("325488592", messageHeader.getServiceID()); -// assertEquals("P400Plus-275039202", messageHeader.getPOIID()); -// -// assertNotNull(saleToPoiResponse.getPaymentResponse().getResponse()); -// Response response = saleToPoiResponse.getPaymentResponse().getResponse(); -// assertEquals(Result.SUCCESS, response.getResult()); -// assertNotNull(response.getAdditionalResponse()); -// -// assertNotNull(saleToPoiResponse.getPaymentResponse().getPoIData()); -// POIData poiData = saleToPoiResponse.getPaymentResponse().getPoIData(); -// assertEquals("1000", poiData.getPoITransactionID()); -// assertNotNull(poiData.getPoITransactionID()); -// assertEquals("4r7i001557325515012.8815573255107661", poiData.getPoITransactionID().getTransactionID()); -// assertEquals("2019-05-08T14:25:15.000Z", poiData.getPoITransactionID().getTimeStamp().toString()); -// -// assertNotNull(saleToPoiResponse.getPaymentResponse().getSaleData()); -// SaleData saleData = saleToPoiResponse.getPaymentResponse().getSaleData(); -// assertNotNull(saleData.getSaleTransactionID()); -// assertEquals("999", saleData.getSaleTransactionID().getTransactionID()); -// assertEquals("2019-05-08T14:24:48.598Z", saleData.getSaleTransactionID().getTimeStamp().toString()); -// -// assertNotNull(saleToPoiResponse.getPaymentResponse().getPaymentReceipt()); -// assertFalse(saleToPoiResponse.getPaymentResponse().getPaymentReceipt().isEmpty()); -// List paymentReceiptList = saleToPoiResponse.getPaymentResponse().getPaymentReceipt(); -// for (PaymentReceipt paymentReceipt : paymentReceiptList) { -// assertNotNull(paymentReceipt.getDocumentQualifier()); -// assertNotNull(paymentReceipt.getOutputContent()); -// assertEquals(OutputFormat.TEXT, paymentReceipt.getOutputContent().getOutputFormat()); -// assertNotNull(paymentReceipt.getOutputContent().getOutputText()); -// assertFalse(paymentReceipt.getOutputContent().getOutputText().isEmpty()); -// List outputTextList = paymentReceipt.getOutputContent().getOutputText(); -// for(OutputText outputText : outputTextList) { -// assertNotNull(outputText.getText()); -// } -// } -// -// assertNotNull(saleToPoiResponse.getPaymentResponse().getPaymentResult()); -// PaymentResult paymentResult = saleToPoiResponse.getPaymentResponse().getPaymentResult(); -// assertTrue(paymentResult.getOnlineFlag()); -// assertNotNull(paymentResult.getPaymentAcquirerData()); -// assertEquals("P400Plus-275039202", paymentResult.getPaymentAcquirerData().getAcquirerPOIID()); -// assertEquals("123456", paymentResult.getPaymentAcquirerData().getApprovalCode()); -// assertEquals("TestMerchantRenatoTest", paymentResult.getPaymentAcquirerData().getMerchantID()); -// assertNotNull(paymentResult.getPaymentAcquirerData().getAcquirerTransactionID()); -// assertNotNull(paymentResult.getPaymentInstrumentData()); -// assertNotNull(paymentResult.getPaymentInstrumentData().getCardData()); -// assertEquals("mc", paymentResult.getPaymentInstrumentData().getCardData().getPaymentBrand()); -// assertEquals("541333 **** 0010", paymentResult.getPaymentInstrumentData().getCardData().getMaskedPan()); -// assertEquals(PaymentInstrumentType.CARD, paymentResult.getPaymentInstrumentData().getPaymentInstrumentType()); -// assertNotNull(paymentResult.getAmountsResp()); -// assertEquals("EUR", paymentResult.getAmountsResp().getCurrency()); -// assertEquals(BigDecimal.ONE, paymentResult.getAmountsResp().getAuthorizedAmount()); -// } + + /** + * Test success flow for local request + */ + @Test + public void syncPaymentRequestSuccess() throws Exception { + Client client = createMockClientFromFile("mocks/terminal-api/payment-local-success.json"); + SecurityKey securityKey = new SecurityKey(); + securityKey.setKeyVersion(1); + securityKey.setAdyenCryptoVersion(1); + securityKey.setKeyIdentifier("CryptoKeyIdentifier12345"); + securityKey.setPassphrase("p@ssw0rd123456"); + TerminalLocalAPI terminalLocalApi = new TerminalLocalAPI(client, securityKey); + + TerminalAPIRequest terminalAPIPaymentRequest = createTerminalAPIPaymentRequest(); + TerminalAPIResponse terminalAPIResponse = terminalLocalApi.request(terminalAPIPaymentRequest); + + assertNotNull(terminalAPIResponse); + assertNotNull(terminalAPIResponse.getSaleToPOIResponse()); + + SaleToPOIResponse saleToPoiResponse = terminalAPIResponse.getSaleToPOIResponse(); + assertNotNull(saleToPoiResponse.getMessageHeader()); + assertNotNull(saleToPoiResponse.getPaymentResponse()); + + MessageHeader messageHeader = saleToPoiResponse.getMessageHeader(); + assertEquals(MessageType.RESPONSE, messageHeader.getMessageType()); + assertEquals(MessageClassType.SERVICE, messageHeader.getMessageClass()); + assertEquals(MessageCategoryType.PAYMENT, messageHeader.getMessageCategory()); + assertEquals("3.0", messageHeader.getProtocolVersion()); + assertEquals("325488592", messageHeader.getSaleID()); + assertEquals("325488592", messageHeader.getServiceID()); + assertEquals("P400Plus-275039202", messageHeader.getPOIID()); + + assertNotNull(saleToPoiResponse.getPaymentResponse().getResponse()); + Response response = saleToPoiResponse.getPaymentResponse().getResponse(); + assertEquals(ResultType.SUCCESS, response.getResult()); + assertNotNull(response.getAdditionalResponse()); + + assertNotNull(saleToPoiResponse.getPaymentResponse().getPOIData()); + POIData poiData = saleToPoiResponse.getPaymentResponse().getPOIData(); + assertEquals("1000", poiData.getPOIReconciliationID()); + assertNotNull(poiData.getPOITransactionID()); + assertEquals("4r7i001557325515012.8815573255107661", poiData.getPOITransactionID().getTransactionID()); + assertEquals("2019-05-08T14:25:15.000Z", poiData.getPOITransactionID().getTimeStamp().toString()); + + assertNotNull(saleToPoiResponse.getPaymentResponse().getSaleData()); + SaleData saleData = saleToPoiResponse.getPaymentResponse().getSaleData(); + assertNotNull(saleData.getSaleTransactionID()); + assertEquals("999", saleData.getSaleTransactionID().getTransactionID()); + assertEquals("2019-05-08T14:24:48.598Z", saleData.getSaleTransactionID().getTimeStamp().toString()); + + assertNotNull(saleToPoiResponse.getPaymentResponse().getPaymentReceipt()); + assertFalse(saleToPoiResponse.getPaymentResponse().getPaymentReceipt().isEmpty()); + List paymentReceiptList = saleToPoiResponse.getPaymentResponse().getPaymentReceipt(); + for (PaymentReceipt paymentReceipt : paymentReceiptList) { + assertNotNull(paymentReceipt.getDocumentQualifier()); + assertNotNull(paymentReceipt.getOutputContent()); + assertEquals(OutputFormatType.TEXT, paymentReceipt.getOutputContent().getOutputFormat()); + assertNotNull(paymentReceipt.getOutputContent().getOutputText()); + assertFalse(paymentReceipt.getOutputContent().getOutputText().isEmpty()); + List outputTextList = paymentReceipt.getOutputContent().getOutputText(); + for(OutputText outputText : outputTextList) { + assertNotNull(outputText.getText()); + } + } + + assertNotNull(saleToPoiResponse.getPaymentResponse().getPaymentResult()); + PaymentResult paymentResult = saleToPoiResponse.getPaymentResponse().getPaymentResult(); + assertTrue(paymentResult.isOnlineFlag()); + assertNotNull(paymentResult.getPaymentAcquirerData()); + assertEquals("P400Plus-275039202", paymentResult.getPaymentAcquirerData().getAcquirerPOIID()); + assertEquals("123456", paymentResult.getPaymentAcquirerData().getApprovalCode()); + assertEquals("TestMerchantRenatoTest", paymentResult.getPaymentAcquirerData().getMerchantID()); + assertNotNull(paymentResult.getPaymentAcquirerData().getAcquirerTransactionID()); + assertNotNull(paymentResult.getPaymentInstrumentData()); + assertNotNull(paymentResult.getPaymentInstrumentData().getCardData()); + assertEquals("mc", paymentResult.getPaymentInstrumentData().getCardData().getPaymentBrand()); + assertEquals("541333 **** 0010", paymentResult.getPaymentInstrumentData().getCardData().getMaskedPAN()); + assertEquals(PaymentInstrumentType.CARD, paymentResult.getPaymentInstrumentData().getPaymentInstrumentType()); + assertNotNull(paymentResult.getAmountsResp()); + assertEquals("EUR", paymentResult.getAmountsResp().getCurrency()); + assertEquals(BigDecimal.ONE, paymentResult.getAmountsResp().getAuthorizedAmount()); + } /** * Test success flow for local request unencrypted @@ -133,7 +144,7 @@ public class TerminalLocalAPITest extends BaseTest { public void unencryptedPaymentRequestSuccess() throws Exception { Client client = createMockClientFromFile("mocks/terminal-api/payment-sync-success.json"); TerminalLocalAPIUnencrypted terminalLocalAPIUnencrypted = new TerminalLocalAPIUnencrypted(client); - TerminalAPIResponse response = terminalLocalAPIUnencrypted.request(new TerminalAPIRequest()); + TerminalAPIResponse response = terminalLocalAPIUnencrypted.request(createTerminalAPIPaymentRequest()); assertNotNull(response); assertNotNull(response.getSaleToPOIResponse()); diff --git a/src/test/java/com/adyen/UtilTest.java b/src/test/java/com/adyen/UtilTest.java index 95142a051..40612a9bd 100644 --- a/src/test/java/com/adyen/UtilTest.java +++ b/src/test/java/com/adyen/UtilTest.java @@ -55,7 +55,7 @@ public void testNotificationHmac() throws SignatureException { notificationRequestItem.setOriginalReference("originalReference"); notificationRequestItem.setMerchantAccountCode("merchantAccount"); notificationRequestItem.setMerchantReference("reference"); - notificationRequestItem.setAmount(new Amount().currency("EUR").value(1000L)); + notificationRequestItem.setAmount(new Amount().currency("EUR").value(1000l)); notificationRequestItem.setEventCode("EVENT"); notificationRequestItem.setSuccess(true); diff --git a/src/test/java/com/adyen/WebhookTest.java b/src/test/java/com/adyen/WebhookTest.java index 48b2caf7b..d8ca069e4 100644 --- a/src/test/java/com/adyen/WebhookTest.java +++ b/src/test/java/com/adyen/WebhookTest.java @@ -26,15 +26,19 @@ import com.adyen.model.managementwebhooks.MerchantUpdatedNotificationRequest; import com.adyen.model.managementwebhooks.PaymentMethodCreatedNotificationRequest; import com.adyen.model.marketpaywebhooks.AccountHolderCreateNotification; +import com.adyen.model.nexo.DeviceType; +import com.adyen.model.nexo.DisplayOutput; +import com.adyen.model.nexo.EventNotification; +import com.adyen.model.nexo.EventToNotifyType; +import com.adyen.model.nexo.InfoQualifyType; import com.adyen.model.notification.NotificationRequest; import com.adyen.model.notification.NotificationRequestItem; -import com.adyen.model.terminal.*; +import com.adyen.model.terminal.TerminalAPIRequest; import com.adyen.model.transactionwebhooks.TransactionNotificationRequestV4; import com.adyen.notification.BankingWebhookHandler; import com.adyen.notification.ClassicPlatformWebhookHandler; import com.adyen.notification.ManagementWebhookHandler; import com.adyen.notification.WebhookHandler; -import com.adyen.terminal.TerminalAPIRequest; import com.adyen.util.HMACValidator; import com.fasterxml.jackson.core.JsonProcessingException; import com.google.gson.JsonParser; @@ -205,9 +209,9 @@ public void testTerminalDisplayNotification() throws Exception { .handleTerminalNotificationJson(json); DisplayOutput displayOutput = notification.getSaleToPOIRequest().getDisplayRequest().getDisplayOutput().get(0); - assertEquals(InfoQualify.STATUS, displayOutput.getInfoQualify()); - assertEquals(Device.CASHIERDISPLAY, displayOutput.getDevice()); - assertEquals(false, displayOutput.getResponseRequiredFlag()); + assertEquals(InfoQualifyType.STATUS, displayOutput.getInfoQualify()); + assertEquals(DeviceType.CASHIER_DISPLAY, displayOutput.getDevice()); + assertEquals(false, displayOutput.isResponseRequiredFlag()); } @Test @@ -217,7 +221,7 @@ public void testTerminalEventNotification() throws Exception { EventNotification eventNotification = notification.getSaleToPOIRequest().getEventNotification(); assertEquals("newstate=IDLE&oldstate=START", eventNotification.getEventDetails()); - assertEquals(EventToNotify.SHUTDOWN, eventNotification.getEventToNotify()); + assertEquals(EventToNotifyType.SHUTDOWN, eventNotification.getEventToNotify()); } @Test @@ -234,6 +238,11 @@ public void testSetNotificationItem() throws Exception { assertEquals("987654321", notificationRequest.getNotificationItems().get(0).getPspReference()); } + private void assertJsonStringEquals(String firstInput, String secondInput) { + JsonParser parser = new JsonParser(); + assertEquals(parser.parse(firstInput), parser.parse(secondInput)); + } + private NotificationRequest readNotificationRequestFromFile(String resourcePath) throws IOException { String json = getFileContents(resourcePath); return webhookHandler.handleNotificationJson(json); diff --git a/src/test/java/com/adyen/builders/terminal/TerminalAPIRequestBuilderTest.java b/src/test/java/com/adyen/builders/terminal/TerminalAPIRequestBuilderTest.java new file mode 100644 index 000000000..219d501e9 --- /dev/null +++ b/src/test/java/com/adyen/builders/terminal/TerminalAPIRequestBuilderTest.java @@ -0,0 +1,106 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +package com.adyen.builders.terminal; + +import com.adyen.model.nexo.MessageCategoryType; +import com.adyen.model.nexo.MessageClassType; +import com.adyen.model.nexo.PaymentRequest; +import com.adyen.model.nexo.TransactionStatusRequest; +import com.adyen.model.terminal.TerminalAPIRequest; +import com.adyen.builders.terminal.TerminalAPIRequestBuilder; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; + +@RunWith(MockitoJUnitRunner.class) +public class TerminalAPIRequestBuilderTest { + + private TerminalAPIRequestBuilder terminalAPIRequestBuilder; + + @Mock + private PaymentRequest paymentRequest; + @Mock + private TransactionStatusRequest transactionStatusRequest; + + private final String SALE_ID = "test-sale-id"; + private final String SERVICE_ID = "test-service-id"; + private final String POI_ID = "test-poi"; + + @Before + public void setUp() { + terminalAPIRequestBuilder = new TerminalAPIRequestBuilder(SALE_ID, SERVICE_ID, POI_ID); + } + + @Test + public void testPaymentRequest() { + TerminalAPIRequest terminalAPIRequest = terminalAPIRequestBuilder.withPaymentRequest(paymentRequest).build(); + + assertNotNull(terminalAPIRequest); + assertNotNull(terminalAPIRequest.getSaleToPOIRequest()); + assertNotNull(terminalAPIRequest.getSaleToPOIRequest().getMessageHeader()); + assertEquals(SALE_ID, terminalAPIRequest.getSaleToPOIRequest().getMessageHeader().getSaleID()); + assertEquals(SERVICE_ID, terminalAPIRequest.getSaleToPOIRequest().getMessageHeader().getServiceID()); + assertEquals(POI_ID, terminalAPIRequest.getSaleToPOIRequest().getMessageHeader().getPOIID()); + assertEquals(MessageClassType.SERVICE, terminalAPIRequest.getSaleToPOIRequest().getMessageHeader().getMessageClass()); + assertEquals(MessageCategoryType.PAYMENT, terminalAPIRequest.getSaleToPOIRequest().getMessageHeader().getMessageCategory()); + assertNotNull(terminalAPIRequest.getSaleToPOIRequest().getPaymentRequest()); + } + + @Test + public void testMultipleRequestObjects() { + TerminalAPIRequest terminalAPIRequest = terminalAPIRequestBuilder + .withTransactionStatusRequest(transactionStatusRequest) + .withPaymentRequest(paymentRequest) + .build(); + + assertNotNull(terminalAPIRequest); + assertNotNull(terminalAPIRequest.getSaleToPOIRequest()); + assertNotNull(terminalAPIRequest.getSaleToPOIRequest().getMessageHeader()); + assertEquals(SALE_ID, terminalAPIRequest.getSaleToPOIRequest().getMessageHeader().getSaleID()); + assertEquals(SERVICE_ID, terminalAPIRequest.getSaleToPOIRequest().getMessageHeader().getServiceID()); + assertEquals(POI_ID, terminalAPIRequest.getSaleToPOIRequest().getMessageHeader().getPOIID()); + assertEquals(MessageClassType.SERVICE, terminalAPIRequest.getSaleToPOIRequest().getMessageHeader().getMessageClass()); + assertEquals(MessageCategoryType.PAYMENT, terminalAPIRequest.getSaleToPOIRequest().getMessageHeader().getMessageCategory()); + assertNotNull(terminalAPIRequest.getSaleToPOIRequest().getPaymentRequest()); + assertNull(terminalAPIRequest.getSaleToPOIRequest().getTransactionStatusRequest()); + } + + @Test + public void testNoRequest() { + TerminalAPIRequest terminalAPIRequest = terminalAPIRequestBuilder.build(); + + assertNotNull(terminalAPIRequest); + assertNotNull(terminalAPIRequest.getSaleToPOIRequest()); + assertNotNull(terminalAPIRequest.getSaleToPOIRequest().getMessageHeader()); + assertEquals(SALE_ID, terminalAPIRequest.getSaleToPOIRequest().getMessageHeader().getSaleID()); + assertEquals(SERVICE_ID, terminalAPIRequest.getSaleToPOIRequest().getMessageHeader().getServiceID()); + assertEquals(POI_ID, terminalAPIRequest.getSaleToPOIRequest().getMessageHeader().getPOIID()); + assertNull(terminalAPIRequest.getSaleToPOIRequest().getMessageHeader().getMessageClass()); + assertNull(terminalAPIRequest.getSaleToPOIRequest().getMessageHeader().getMessageCategory()); + } +} diff --git a/src/test/java/com/adyen/serializer/SaleToAcquirerDataSerializerTest.java b/src/test/java/com/adyen/serializer/SaleToAcquirerDataSerializerTest.java new file mode 100644 index 000000000..a748b9de7 --- /dev/null +++ b/src/test/java/com/adyen/serializer/SaleToAcquirerDataSerializerTest.java @@ -0,0 +1,116 @@ +package com.adyen.serializer; + +import com.adyen.model.applicationinfo.ApplicationInfo; +import com.adyen.model.applicationinfo.ExternalPlatform; +import com.adyen.model.applicationinfo.MerchantDevice; +import com.adyen.model.terminal.SaleToAcquirerData; +import com.google.gson.Gson; +import com.google.gson.JsonParser; +import com.google.gson.GsonBuilder; +import java.util.Base64; +import org.junit.Test; + +import java.util.HashMap; +import java.util.Map; + +import static com.adyen.Client.LIB_NAME; +import static com.adyen.Client.LIB_VERSION; +import static org.junit.Assert.assertEquals; + +public class SaleToAcquirerDataSerializerTest { + + protected static final Gson PRETTY_PRINT_GSON = new GsonBuilder().setPrettyPrinting().create(); + + @Test + public void testSerialize() { + SaleToAcquirerDataSerializer saleToAcquirerDataModelAdapter = new SaleToAcquirerDataSerializer(); + SaleToAcquirerData saleToAcquirerData = new SaleToAcquirerData(); + + Map metadata = new HashMap<>(); + metadata.put("key", "value"); + saleToAcquirerData.setMetadata(metadata); + saleToAcquirerData.setShopperEmail("myemail@mail.com"); + saleToAcquirerData.setShopperReference("13164308"); + saleToAcquirerData.setRecurringContract("RECURRING,ONECLICK"); + saleToAcquirerData.setShopperStatement("YOUR SHOPPER STATEMENT"); + saleToAcquirerData.setRecurringDetailName("VALUE"); + saleToAcquirerData.setRecurringTokenService("VALUE"); + saleToAcquirerData.setStore("store value"); + saleToAcquirerData.setMerchantAccount("merchantAccount"); + saleToAcquirerData.setCurrency("EUR"); + + ApplicationInfo applicationInfo = new ApplicationInfo(); + + ExternalPlatform externalPlatform = new ExternalPlatform(); + externalPlatform.setIntegrator("externalPlatformIntegrator"); + externalPlatform.setName("externalPlatformName"); + externalPlatform.setVersion("2.0.0"); + applicationInfo.setExternalPlatform(externalPlatform); + + MerchantDevice merchantDevice = new MerchantDevice(); + merchantDevice.setOs("merchantDeviceOS"); + merchantDevice.setOsVersion("10.12.6"); + merchantDevice.setReference("4c32759faaa7"); + applicationInfo.setMerchantDevice(merchantDevice); + + saleToAcquirerData.setApplicationInfo(applicationInfo); + saleToAcquirerData.setTenderOption("ReceiptHandler,AllowPartialAuthorisation,AskGratuity"); + + Map additionalData = new HashMap<>(); + additionalData.put("key.key", "value"); + additionalData.put("key.keyTwo", "value2"); + saleToAcquirerData.setAdditionalData(additionalData); + saleToAcquirerData.setAuthorisationType("authorisationType"); + + String json = "{\n" + + " \"metadata\": {\n" + + " \"key\": \"value\"\n" + + " },\n" + + " \"shopperEmail\": \"myemail@mail.com\",\n" + + " \"shopperReference\": \"13164308\",\n" + + " \"recurringContract\": \"RECURRING,ONECLICK\",\n" + + " \"shopperStatement\": \"YOUR SHOPPER STATEMENT\",\n" + + " \"recurringDetailName\": \"VALUE\",\n" + + " \"recurringTokenService\": \"VALUE\",\n" + + " \"store\": \"store value\",\n" + + " \"merchantAccount\": \"merchantAccount\",\n" + + " \"currency\": \"EUR\",\n" + + " \"applicationInfo\": {\n" + + " \"adyenLibrary\": {\n" + + " \"name\": \""+ LIB_NAME + "\",\n" + + " \"version\": \""+ LIB_VERSION + "\"\n" + + " },\n" + + " \"externalPlatform\": {\n" + + " \"integrator\": \"externalPlatformIntegrator\",\n" + + " \"name\": \"externalPlatformName\",\n" + + " \"version\": \"2.0.0\"\n" + + " },\n" + + " \"merchantDevice\": {\n" + + " \"os\": \"merchantDeviceOS\",\n" + + " \"osVersion\": \"10.12.6\",\n" + + " \"reference\": \"4c32759faaa7\"\n" + + " }\n" + + " },\n" + + " \"tenderOption\": \"ReceiptHandler,AllowPartialAuthorisation,AskGratuity\",\n" + + " \"additionalData\": {\n" + + " \"key.keyTwo\": \"value2\",\n" + + " \"key.key\": \"value\"\n" + + " },\n" + + " \"authorisationType\": \"authorisationType\"\n" + + "}"; + + // test if json string matches + String requestJson = PRETTY_PRINT_GSON.toJson(saleToAcquirerData); + assertJsonStringEquals(requestJson, json); + + // test if base64 works + String serialized = saleToAcquirerDataModelAdapter.serialize(saleToAcquirerData, null, null).getAsString(); + SaleToAcquirerData saleToAcquirerDataDecoded = new Gson().fromJson(new String(Base64.getDecoder().decode(serialized)), SaleToAcquirerData.class); + assertEquals(saleToAcquirerData, saleToAcquirerDataDecoded); + } + + public static void assertJsonStringEquals(String firstInput, String secondInput) { + JsonParser parser = new JsonParser(); + assertEquals(parser.parse(firstInput), parser.parse(secondInput)); + } +} diff --git a/src/test/java/com/adyen/serializer/XMLEnumSerializerTest.java b/src/test/java/com/adyen/serializer/XMLEnumSerializerTest.java new file mode 100644 index 000000000..39b524217 --- /dev/null +++ b/src/test/java/com/adyen/serializer/XMLEnumSerializerTest.java @@ -0,0 +1,56 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * + * Adyen Java API Library + * + * Copyright (c) 2019 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ +package com.adyen.serializer; + +import com.adyen.model.nexo.AuthenticationMethodType; +import com.adyen.terminal.serialization.XMLEnumTypeAdapter; +import com.google.gson.stream.JsonReader; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.junit.MockitoJUnitRunner; + +import java.io.StringReader; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +@RunWith(MockitoJUnitRunner.class) +public class XMLEnumSerializerTest { + + @Test + public void testAuthenticationMethodTypeMultipleValues() throws Exception { + XMLEnumTypeAdapter adapter = new XMLEnumTypeAdapter<>(AuthenticationMethodType.class); + + String value1 = "\"OnlinePIN\""; + JsonReader jsonReader1 = new JsonReader(new StringReader(value1)); + AuthenticationMethodType authenticationMethodType1 = adapter.read(jsonReader1); + + assertNotNull(authenticationMethodType1); + assertEquals(AuthenticationMethodType.ON_LINE_PIN, authenticationMethodType1); + + String value2 = "\"OnLinePIN\""; + JsonReader jsonReader2 = new JsonReader(new StringReader(value2)); + AuthenticationMethodType authenticationMethodType2 = adapter.read(jsonReader2); + + assertNotNull(authenticationMethodType2); + assertEquals(AuthenticationMethodType.ON_LINE_PIN, authenticationMethodType2); + } +} diff --git a/src/test/java/com/adyen/util/HMACValidatorTest.java b/src/test/java/com/adyen/util/HMACValidatorTest.java index 0982c740e..5c020cc93 100644 --- a/src/test/java/com/adyen/util/HMACValidatorTest.java +++ b/src/test/java/com/adyen/util/HMACValidatorTest.java @@ -143,7 +143,7 @@ public void testValidateHMACMissingOptionalField() throws SignatureException { @Test public void testValidateHMACEmptyNotificationRequest() { try { - new HMACValidator().getDataToSign(null); + new HMACValidator().getDataToSign((NotificationRequestItem) null); } catch (IllegalArgumentException e) { assertEquals("Missing NotificationRequestItem.", e.getMessage()); }