From ed3630fa6fbcf7b862b1cfc09e8b5ae6e6b3e5bb Mon Sep 17 00:00:00 2001 From: Dusty Gutzmann Date: Mon, 8 Jul 2019 12:47:16 -0600 Subject: [PATCH] Release 228.3 --- app.gradle | 90 + clover-android-connector-sdk/build.gradle | 2 +- .../connector/sdk/v3/PaymentConnector.java | 10 +- .../sdk/v3/base/PendingPaymentEntry.java | 84 +- .../remotemessage/AcknowledgementMessage.java | 297 ---- .../ActivityMessageFromActivity.java | 330 ---- .../ActivityMessageToActivity.java | 330 ---- .../sdk/v3/remotemessage/ActivityRequest.java | 402 ----- .../ActivityResponseMessage.java | 402 ----- .../v3/remotemessage/AddDiscountAction.java | 211 --- .../v3/remotemessage/AddLineItemAction.java | 244 --- .../sdk/v3/remotemessage/BreakMessage.java | 258 --- .../remotemessage/CapturePreAuthMessage.java | 369 ---- .../CapturePreAuthResponseMessage.java | 441 ----- .../remotemessage/CardDataRequestMessage.java | 296 ---- .../CardDataResponseMessage.java | 365 ---- .../CashbackSelectedMessage.java | 294 --- .../remotemessage/CloseoutRequestMessage.java | 330 ---- .../CloseoutResponseMessage.java | 368 ---- .../remotemessage/ConfirmPaymentMessage.java | 337 ---- .../DiscoveryRequestMessage.java | 294 --- .../DiscoveryResponseMessage.java | 621 ------- .../sdk/v3/remotemessage/ErrorCode.java | 57 - .../sdk/v3/remotemessage/ErrorCodeEnum.java | 209 --- .../v3/remotemessage/ExternalDeviceState.java | 57 - .../ExternalDeviceStateData.java | 248 --- .../remotemessage/ExternalDeviceSubState.java | 57 - .../v3/remotemessage/FinishCancelMessage.java | 294 --- .../sdk/v3/remotemessage/FinishOkMessage.java | 446 ----- .../v3/remotemessage/ForceConnectMessage.java | 294 --- .../GetPrintersRequestMessage.java | 294 --- .../GetPrintersResponseMessage.java | 299 ---- .../v3/remotemessage/ImagePrintMessage.java | 404 ----- .../sdk/v3/remotemessage/InputOption.java | 248 --- .../clover/sdk/v3/remotemessage/KeyPress.java | 57 - .../sdk/v3/remotemessage/KeyPressEnum.java | 209 --- .../sdk/v3/remotemessage/KeyPressMessage.java | 291 --- .../LastMessageRequestMessage.java | 258 --- .../LastMessageResponseMessage.java | 334 ---- .../sdk/v3/remotemessage/LogLevelEnum.java | 57 - .../sdk/v3/remotemessage/LogMessage.java | 327 ---- .../clover/sdk/v3/remotemessage/Message.java | 248 --- .../clover/sdk/v3/remotemessage/Method.java | 57 - .../remotemessage/OpenCashDrawerMessage.java | 332 ---- .../OrderActionAddDiscountMessage.java | 293 --- .../OrderActionAddLineItemMessage.java | 293 --- .../OrderActionRemoveDiscountMessage.java | 293 --- .../OrderActionRemoveLineItemMessage.java | 293 --- .../OrderActionResponseMessage.java | 293 --- .../v3/remotemessage/OrderUpdateMessage.java | 486 ----- .../v3/remotemessage/PairingCodeMessage.java | 294 --- .../remotemessage/PairingRequestMessage.java | 402 ----- .../remotemessage/PairingResponseMessage.java | 490 ----- .../sdk/v3/remotemessage/PairingState.java | 57 - .../v3/remotemessage/PartialAuthMessage.java | 294 --- .../sdk/v3/remotemessage/PayIntent.java | 1327 -------------- .../PaymentConfirmedMessage.java | 296 ---- .../remotemessage/PaymentRejectedMessage.java | 332 ---- .../remotemessage/PaymentVoidedMessage.java | 329 ---- .../PrintJobStatusRequestMessage.java | 296 ---- .../PrintJobStatusResponseMessage.java | 332 ---- .../sdk/v3/remotemessage/QueryStatus.java | 57 - .../sdk/v3/remotemessage/QueryStatusEnum.java | 209 --- .../remotemessage/RefundRequestMessage.java | 474 ----- .../remotemessage/RefundResponseMessage.java | 482 ----- .../sdk/v3/remotemessage/RemoteError.java | 371 ---- .../sdk/v3/remotemessage/RemoteMessage.java | 607 ------- .../v3/remotemessage/RemoteMessageType.java | 57 - .../remotemessage/RemoveDiscountAction.java | 242 --- .../remotemessage/RemoveLineItemAction.java | 209 --- .../ResetDeviceResponseMessage.java | 363 ---- .../sdk/v3/remotemessage/ResetMessage.java | 258 --- .../sdk/v3/remotemessage/ResultStatus.java | 57 - .../v3/remotemessage/ResultStatusEnum.java | 209 --- ...etrieveCustomActivitiesRequestMessage.java | 299 ---- ...trieveCustomActivitiesResponseMessage.java | 299 ---- .../RetrieveDeviceStatusRequestMessage.java | 294 --- .../RetrieveDeviceStatusResponseMessage.java | 437 ----- .../RetrievePaymentRequestMessage.java | 296 ---- .../RetrievePaymentResponseMessage.java | 404 ----- .../RetrievePendingPaymentsMessage.java | 258 --- ...etrievePendingPaymentsResponseMessage.java | 335 ---- .../ShowPaymentReceiptOptionsMessage.java | 369 ---- .../sdk/v3/remotemessage/ShutDownMessage.java | 258 --- .../SignatureVerifiedMessage.java | 332 ---- .../sdk/v3/remotemessage/TerminalMessage.java | 294 --- .../v3/remotemessage/TextPrintMessage.java | 370 ---- .../sdk/v3/remotemessage/ThankYouMessage.java | 258 --- .../sdk/v3/remotemessage/TipAddedMessage.java | 294 --- .../v3/remotemessage/TipAdjustMessage.java | 372 ---- .../TipAdjustResponseMessage.java | 408 ----- .../sdk/v3/remotemessage/TransactionType.java | 57 - .../remotemessage/TxStartRequestMessage.java | 406 ----- .../remotemessage/TxStartResponseMessage.java | 437 ----- .../remotemessage/TxStartResponseResult.java | 57 - .../clover/sdk/v3/remotemessage/TxState.java | 57 - .../sdk/v3/remotemessage/TxStateEnum.java | 209 --- .../sdk/v3/remotemessage/TxStateMessage.java | 294 --- .../sdk/v3/remotemessage/UiDirection.java | 57 - .../clover/sdk/v3/remotemessage/UiState.java | 57 - .../sdk/v3/remotemessage/UiStateMessage.java | 398 ----- .../v3/remotemessage/VaultCardMessage.java | 294 --- .../VaultCardResponseMessage.java | 365 ---- .../remotemessage/VerifySignatureMessage.java | 334 ---- .../v3/remotemessage/VoidPaymentMessage.java | 395 ----- .../sdk/v3/remotemessage/WelcomeMessage.java | 258 --- .../v3/remotepay/CloverDeviceErrorEvent.java | 8 +- .../sdk/v3/remotepay/DeviceEventState.java | 4 +- .../RetrievePendingPaymentsResponse.java | 656 +++---- .../sdk/v3/remotepay/TransactionType.java | 2 +- .../sdk/v3/remotepay/TransactionTypeEnum.java | 8 +- clover-android-loyalty-kit/build.gradle | 2 +- .../clover/loyalty/ILoyaltyDataService.java | 5 +- .../com/clover/loyalty/LoyaltyDataTypes.java | 95 +- clover-android-sdk-examples/build.gradle | 11 +- .../gradle/wrapper/gradle-wrapper.jar | Bin 49875 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 - clover-android-sdk-examples/gradlew | 164 -- clover-android-sdk-examples/gradlew.bat | 90 - clover-android-sdk-examples/lib/calc.jar | Bin 28614 -> 0 bytes .../src/main/AndroidManifest.xml | 28 + .../sdk/examples/CustomItemTestActivity.java | 178 ++ .../sdk/examples/EmployeeTestActivity.java | 36 +- .../sdk/examples/ImagePrinterActivity.java | 72 + .../sdk/examples/InventoryTestActivity.java | 55 +- .../LockScreenBootCompleteReceiver.java | 74 + .../sdk/examples/LockScreenTestActivity.java | 143 ++ .../examples/LockscreenEmployeeAdapter.java | 88 + .../sdk/examples/MerchantTestActivity.java | 23 +- .../sdk/examples/PrintTaskTestActivity.java | 252 +++ .../sdk/examples/PrintTestActivity.java | 263 --- ...rovider.java => PrinterImageProvider.java} | 23 +- .../sdk/examples/PrinterListAdapter.java | 93 + .../sdk/examples/PrinterTestActivity.java | 38 +- .../ReceiptRegistrationTestActivity.java | 196 -- .../src/main/res/drawable/clover_logo.png | Bin 0 -> 12772 bytes .../main/res/drawable/clover_logo_green.png | Bin 0 -> 2138 bytes .../res/drawable/employee_item_effects.xml | 8 + .../res/layout/activity_custom_item_test.xml | 127 ++ .../main/res/layout/activity_lockscreen.xml | 34 + .../res/layout/activity_print_task_test.xml | 44 + .../res/layout/image_printer_acitivity.xml | 45 + .../res/layout/item_adapter_lockscreen.xml | 25 + .../res/layout/printer_adapter_layout.xml | 28 + .../src/main/res/values-de-rDE/strings.xml | 2 - .../src/main/res/values-pl-rPL/strings.xml | 2 - .../src/main/res/values-pt-rBR/strings.xml | 2 - .../src/main/res/values/colors.xml | 5 + .../src/main/res/values/strings.xml | 20 + clover-android-sdk/build.gradle | 4 +- .../gradle/wrapper/gradle-wrapper.jar | Bin 49875 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 - clover-android-sdk/gradlew | 164 -- clover-android-sdk/gradlew.bat | 90 - clover-android-sdk/lib/calc-240.3.jar | Bin 29010 -> 0 bytes clover-android-sdk/lib/calc-259.1.jar | Bin 30999 -> 0 bytes clover-android-sdk/lib/calc-264.jar | Bin 31013 -> 0 bytes clover-android-sdk/lib/calc-270.3.jar | Bin 31376 -> 0 bytes .../lib/{calc-270.9.jar => calc-277.3.jar} | Bin 31376 -> 31763 bytes clover-android-sdk/lib/calc.jar | Bin 29007 -> 0 bytes .../clover/sdk/internal/util/ObjectsTest.java | 29 - .../clover/sdk/internal/util/StringsTest.java | 28 - .../sdk/v1/app/AppNotificationTest.java | 55 - .../sdk/v1/employee/EmployeeUtilsTest.java | 36 - .../com/clover/sdk/v1/app/IAppService.aidl | 39 - .../sdk/v3/employees/IEmployeeService.aidl | 266 ++- .../sdk/v3/inventory/IInventoryService.aidl | 25 +- .../clover/sdk/v3/order/IOrderService.aidl | 9 + .../sdk/v3/order/IOrderServiceV3_1.aidl | 33 + .../sdk/v3/payments/IServiceFeeService.aidl | 46 + .../v3/payments/ServiceFeeRefundRequest.aidl | 3 + .../sdk/v3/payments/ServiceFeeRequest.aidl | 3 + .../java/com/clover/common2/Signature2.java | 25 +- .../java/com/clover/sdk/FdParcelable.java | 19 +- .../java/com/clover/sdk/GenericClient.java | 31 +- .../main/java/com/clover/sdk/Lockscreen.java | 148 ++ .../clover/sdk/cashdrawer/package-info.java | 5 +- .../clover/sdk/internal/util/BitmapUtils.java | 5 +- .../com/clover/sdk/util/CustomerMode.java | 79 +- .../java/com/clover/sdk/util/Platform2.java | 45 +- .../main/java/com/clover/sdk/v1/Intents.java | 64 +- .../com/clover/sdk/v1/ServiceConnector.java | 14 +- .../com/clover/sdk/v1/app/AppConnector.java | 81 - .../java/com/clover/sdk/v1/app/AppIntent.java | 57 - .../com/clover/sdk/v1/merchant/Merchant.java | 11 +- .../sdk/v1/merchant/MerchantAddress.java | 125 +- .../sdk/v1/merchant/MerchantConnector.java | 160 +- .../com/clover/sdk/v1/merchant/Module.java | 3 +- .../com/clover/sdk/v1/printer/CashDrawer.java | 147 +- .../com/clover/sdk/v1/printer/Printer.java | 327 ++-- .../sdk/v1/printer/PrinterConnector.java | 94 +- .../sdk/v1/printer/ReceiptContract.java | 6 + .../sdk/v1/printer/ReceiptRegistration.java | 4 +- .../printer/ReceiptRegistrationConnector.java | 26 +- .../sdk/v1/printer/job/BillPrintJob.java | 91 - .../sdk/v1/printer/job/CreditPrintJob.java | 87 - .../v1/printer/job/GiftReceiptPrintJob.java | 69 - .../sdk/v1/printer/job/ImagePrintJob.java | 3 + .../sdk/v1/printer/job/ImagePrintJob2.java | 167 ++ .../v1/printer/job/LineItemOrderPrintJob.java | 83 - .../v1/printer/job/OrderBasedPrintJob.java | 69 - .../sdk/v1/printer/job/OrderPrintJob.java | 74 - .../sdk/v1/printer/job/PaymentPrintJob.java | 88 - .../v1/printer/job/PrintJobsConnector.java | 4 +- .../sdk/v1/printer/job/ReceiptPrintJob.java | 77 - .../sdk/v1/printer/job/RefundPrintJob.java | 90 - .../sdk/v1/printer/job/ReportPrintJob.java | 2 +- .../printer/job/StaticOrderBasedPrintJob.java | 17 + .../v1/printer/job/StaticReceiptPrintJob.java | 10 + .../v1/printer/job/StaticRefundPrintJob.java | 98 - .../sdk/v1/printer/job/ViewPrintJob.java | 48 +- .../clover/sdk/v1/tender/TenderConnector.java | 26 +- .../main/java/com/clover/sdk/v3/apps/App.java | 39 +- .../clover/sdk/v3/apps/AppBillingInfo.java | 122 +- .../com/clover/sdk/v3/apps/AppTracking.java | 8 +- .../sdk/v3/apps/MerchantBillingStatus.java | 2 +- .../com/clover/sdk/v3/cash/CashEvents.java | 3 +- .../v3/configurator/AppAndSubscription.java | 276 --- .../clover/sdk/v3/configurator/AppConfig.java | 343 ---- .../sdk/v3/employees/EmployeeConnector.java | 100 +- .../com/clover/sdk/v3/employees/Roles.java | 165 -- .../sdk/v3/employees/RolesContract.java | 303 ---- .../sdk/v3/inventory/InventoryContract.java | 1572 ++++++++++++++++- .../com/clover/sdk/v3/merchant/Gateway.java | 8 +- .../com/clover/sdk/v3/merchant/Merchant.java | 8 +- .../sdk/v3/merchant/MerchantBoarding.java | 8 +- .../sdk/v3/merchant/MerchantHierarchy.java | 8 +- .../com/clover/sdk/v3/merchant/Setting.java | 483 ----- .../clover/sdk/v3/merchant/SettingName.java | 57 - .../clover/sdk/v3/merchant/TipSuggestion.java | 51 +- .../com/clover/sdk/v3/order/OrderCalc.java | 44 +- .../sdk/v3/order/OrderV31Connector.java | 25 + .../clover/sdk/v3/order/OrderV3Connector.java | 15 + .../com/clover/sdk/v3/payments/Batch.java | 8 +- .../clover/sdk/v3/payments/CreditRequest.java | 39 +- .../com/clover/sdk/v3/payments/Payment.java | 40 +- .../sdk/v3/payments/SelectedService.java | 4 + .../sdk/v3/payments/ServiceFeeConnector.java | 96 + .../v3/payments/ServiceFeeRefundRequest.java | 95 +- .../sdk/v3/payments/ServiceFeeRequest.java | 328 ++++ .../sdk/v3/payments/TransactionInfo.java | 72 + .../com/clover/sdk/v3/report/BaseSale.java | 341 ++++ .../clover/sdk/v3/report/ItemSalesBucket.java | 313 ++++ .../v3/report/LineItemsArrayAndWarning.java | 250 +++ .../clover/sdk/v3/report/LineItemsReport.java | 282 +++ .../com/clover/sdk/v3/report/ReportItem.java | 1359 ++++++++++++++ .../com/clover/sdk/v3/report/ReportLabel.java | 149 +- .../main/java/com/clover/sdk/v3/sim/Sim.java | 469 ----- .../java/com/clover/sdk/v3/sim/SimStatus.java | 53 - .../java/com/clover/sdk/v3/sim/SimUsage.java | 241 --- .../main/res/drawable/return_to_merchant.png | Bin 14141 -> 0 bytes .../src/main/res/values/perms.xml | 21 - .../src/main/res/values/strings.xml | 2 + .../clover/sdk/v3/order/OrderCalcTest.java | 145 ++ common.gradle | 3 +- deps.gradle | 4 +- versions.gradle | 3 +- 257 files changed, 8668 insertions(+), 36358 deletions(-) create mode 100644 app.gradle delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/AcknowledgementMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ActivityMessageFromActivity.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ActivityMessageToActivity.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ActivityRequest.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ActivityResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/AddDiscountAction.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/AddLineItemAction.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/BreakMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CapturePreAuthMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CapturePreAuthResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CardDataRequestMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CardDataResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CashbackSelectedMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CloseoutRequestMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CloseoutResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ConfirmPaymentMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/DiscoveryRequestMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/DiscoveryResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ErrorCode.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ErrorCodeEnum.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ExternalDeviceState.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ExternalDeviceStateData.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ExternalDeviceSubState.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/FinishCancelMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/FinishOkMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ForceConnectMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/GetPrintersRequestMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/GetPrintersResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ImagePrintMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/InputOption.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/KeyPress.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/KeyPressEnum.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/KeyPressMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/LastMessageRequestMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/LastMessageResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/LogLevelEnum.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/LogMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/Message.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/Method.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OpenCashDrawerMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionAddDiscountMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionAddLineItemMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionRemoveDiscountMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionRemoveLineItemMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderUpdateMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PairingCodeMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PairingRequestMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PairingResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PairingState.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PartialAuthMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PayIntent.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PaymentConfirmedMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PaymentRejectedMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PaymentVoidedMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PrintJobStatusRequestMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PrintJobStatusResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/QueryStatus.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/QueryStatusEnum.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RefundRequestMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RefundResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoteError.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoteMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoteMessageType.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoveDiscountAction.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoveLineItemAction.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ResetDeviceResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ResetMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ResultStatus.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ResultStatusEnum.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrieveCustomActivitiesRequestMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrieveCustomActivitiesResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrieveDeviceStatusRequestMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrieveDeviceStatusResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrievePaymentRequestMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrievePaymentResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrievePendingPaymentsMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrievePendingPaymentsResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ShowPaymentReceiptOptionsMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ShutDownMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/SignatureVerifiedMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TerminalMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TextPrintMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ThankYouMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TipAddedMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TipAdjustMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TipAdjustResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TransactionType.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStartRequestMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStartResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStartResponseResult.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxState.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStateEnum.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStateMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/UiDirection.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/UiState.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/UiStateMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/VaultCardMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/VaultCardResponseMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/VerifySignatureMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/VoidPaymentMessage.java delete mode 100644 clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/WelcomeMessage.java delete mode 100644 clover-android-sdk-examples/gradle/wrapper/gradle-wrapper.jar delete mode 100644 clover-android-sdk-examples/gradle/wrapper/gradle-wrapper.properties delete mode 100755 clover-android-sdk-examples/gradlew delete mode 100644 clover-android-sdk-examples/gradlew.bat delete mode 100644 clover-android-sdk-examples/lib/calc.jar create mode 100644 clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/CustomItemTestActivity.java create mode 100644 clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/ImagePrinterActivity.java create mode 100644 clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/LockScreenBootCompleteReceiver.java create mode 100644 clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/LockScreenTestActivity.java create mode 100644 clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/LockscreenEmployeeAdapter.java create mode 100644 clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrintTaskTestActivity.java delete mode 100644 clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrintTestActivity.java rename clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/{ReceiptRegistrationTestProvider.java => PrinterImageProvider.java} (80%) create mode 100644 clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrinterListAdapter.java delete mode 100644 clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/ReceiptRegistrationTestActivity.java create mode 100644 clover-android-sdk-examples/src/main/res/drawable/clover_logo.png create mode 100644 clover-android-sdk-examples/src/main/res/drawable/clover_logo_green.png create mode 100644 clover-android-sdk-examples/src/main/res/drawable/employee_item_effects.xml create mode 100644 clover-android-sdk-examples/src/main/res/layout/activity_custom_item_test.xml create mode 100644 clover-android-sdk-examples/src/main/res/layout/activity_lockscreen.xml create mode 100644 clover-android-sdk-examples/src/main/res/layout/activity_print_task_test.xml create mode 100644 clover-android-sdk-examples/src/main/res/layout/image_printer_acitivity.xml create mode 100644 clover-android-sdk-examples/src/main/res/layout/item_adapter_lockscreen.xml create mode 100644 clover-android-sdk-examples/src/main/res/layout/printer_adapter_layout.xml create mode 100644 clover-android-sdk-examples/src/main/res/values/colors.xml delete mode 100644 clover-android-sdk/gradle/wrapper/gradle-wrapper.jar delete mode 100644 clover-android-sdk/gradle/wrapper/gradle-wrapper.properties delete mode 100755 clover-android-sdk/gradlew delete mode 100644 clover-android-sdk/gradlew.bat delete mode 100644 clover-android-sdk/lib/calc-240.3.jar delete mode 100644 clover-android-sdk/lib/calc-259.1.jar delete mode 100644 clover-android-sdk/lib/calc-264.jar delete mode 100644 clover-android-sdk/lib/calc-270.3.jar rename clover-android-sdk/lib/{calc-270.9.jar => calc-277.3.jar} (59%) delete mode 100644 clover-android-sdk/lib/calc.jar delete mode 100644 clover-android-sdk/src/instrumentTest/java/com/clover/sdk/internal/util/ObjectsTest.java delete mode 100644 clover-android-sdk/src/instrumentTest/java/com/clover/sdk/internal/util/StringsTest.java delete mode 100644 clover-android-sdk/src/instrumentTest/java/com/clover/sdk/v1/app/AppNotificationTest.java delete mode 100644 clover-android-sdk/src/instrumentTest/java/com/clover/sdk/v1/employee/EmployeeUtilsTest.java delete mode 100644 clover-android-sdk/src/main/aidl/com/clover/sdk/v1/app/IAppService.aidl create mode 100644 clover-android-sdk/src/main/aidl/com/clover/sdk/v3/payments/IServiceFeeService.aidl create mode 100644 clover-android-sdk/src/main/aidl/com/clover/sdk/v3/payments/ServiceFeeRefundRequest.aidl create mode 100644 clover-android-sdk/src/main/aidl/com/clover/sdk/v3/payments/ServiceFeeRequest.aidl create mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/Lockscreen.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v1/app/AppConnector.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v1/app/AppIntent.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/BillPrintJob.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/CreditPrintJob.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/GiftReceiptPrintJob.java create mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/ImagePrintJob2.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/LineItemOrderPrintJob.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/OrderBasedPrintJob.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/OrderPrintJob.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/PaymentPrintJob.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/ReceiptPrintJob.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/RefundPrintJob.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/StaticRefundPrintJob.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v3/configurator/AppAndSubscription.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v3/configurator/AppConfig.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v3/employees/Roles.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v3/employees/RolesContract.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v3/merchant/Setting.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v3/merchant/SettingName.java create mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v3/payments/ServiceFeeConnector.java rename clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ExternalDeviceStateEnum.java => clover-android-sdk/src/main/java/com/clover/sdk/v3/payments/ServiceFeeRefundRequest.java (55%) create mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v3/payments/ServiceFeeRequest.java create mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v3/report/BaseSale.java create mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v3/report/ItemSalesBucket.java create mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v3/report/LineItemsArrayAndWarning.java create mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v3/report/LineItemsReport.java create mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v3/report/ReportItem.java rename clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionResponse.java => clover-android-sdk/src/main/java/com/clover/sdk/v3/report/ReportLabel.java (51%) delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v3/sim/Sim.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v3/sim/SimStatus.java delete mode 100644 clover-android-sdk/src/main/java/com/clover/sdk/v3/sim/SimUsage.java delete mode 100644 clover-android-sdk/src/main/res/drawable/return_to_merchant.png delete mode 100644 clover-android-sdk/src/main/res/values/perms.xml create mode 100644 clover-android-sdk/src/test/java/com/clover/sdk/v3/order/OrderCalcTest.java diff --git a/app.gradle b/app.gradle new file mode 100644 index 000000000..8fe917215 --- /dev/null +++ b/app.gradle @@ -0,0 +1,90 @@ +apply plugin: 'com.android.application' + +apply from: file("${project.rootDir}/common.gradle") +//apply from: file("${project.rootDir}/signing.gradle") +apply from: file("${project.rootDir}/versions.gradle") + +/** + * Gets the full path of the proguard file specified by `name`. + * + * The current options are: + * proguard-clover-apps.txt + */ +ext.getCommonProguardFile = { name -> + def fileName = "${androidBuild}/$name" + if (!new File(fileName).exists()) { + throw new IllegalArgumentException("'$name' is not a valid proguard config file") + } + return fileName +} + +def manifestFile = new File(project.projectDir, '/src/main/AndroidManifest.xml') + +def getPackage = { -> + def parser = new groovy.util.XmlParser(false, true) + def rootNode = parser.parse(manifestFile) + def attributes = rootNode.attributes() + def pkg = attributes['package'] + return pkg +} + +def getVersionCode = { -> + def code = project.hasProperty('versionCode') ? versionCode.toInteger() : 32000 + return code +} + +def getVersionName = { -> + def ns = new groovy.xml.Namespace('http://schemas.android.com/apk/res/android', 'ns') + def parser = new groovy.util.XmlParser(false, true) + def rootNode = parser.parse(manifestFile) + def attributes = rootNode.attributes() + def baseCode = attributes[ns.versionName] ?: '1.0' + def name = baseCode + "-" + getVersionCode() + return name; +} + +def releaseBuildTypes = ['release', 'releaseSigned'] + +android.applicationVariants.all { variant -> + if (releaseBuildTypes.contains(buildType.name)) { + String pkg = getPackage() + if (!variant.productFlavors.empty) { + logger.warn('There are product flavors in the project, going to use package names from their override') + if (variant.productFlavors.get(0).applicationId != null) { + pkg = variant.productFlavors.get(0).applicationId + } + } + + String versionName = getVersionName() + variant.outputs.all { output -> + outputFileName = new File(output.outputFile.name.replace(project.archivesBaseName, "${pkg}-${versionName}")) + } + } +} + +android { + compileSdkVersion COMPILE_SDK_VERSION + buildToolsVersion BUILD_TOOLS_VERSION + useLibrary HTTP_LIBRARY + + defaultConfig { + versionCode getVersionCode() + versionName getVersionName() + + minSdkVersion MIN_SDK_VERSION + targetSdkVersion TARGET_SDK_VERSION + } + + packagingOptions { + exclude 'META-INF/LICENSE' + exclude 'META-INF/NOTICE' + } + + lintOptions { + abortOnError false + } + + dexOptions { + preDexLibraries = Boolean.valueOf(System.getProperty("androidPreDex", "true")) + } +} diff --git a/clover-android-connector-sdk/build.gradle b/clover-android-connector-sdk/build.gradle index e2f3e107a..33cc0eb9f 100644 --- a/clover-android-connector-sdk/build.gradle +++ b/clover-android-connector-sdk/build.gradle @@ -14,7 +14,7 @@ * limitations under the License. */ group = 'com.clover.sdk' -version = '221.9' +version = '228.3' apply from: file("${project.rootDir}/lib.gradle") diff --git a/clover-android-connector-sdk/src/main/java/com/clover/connector/sdk/v3/PaymentConnector.java b/clover-android-connector-sdk/src/main/java/com/clover/connector/sdk/v3/PaymentConnector.java index 419fa76c3..95eeb7ed4 100644 --- a/clover-android-connector-sdk/src/main/java/com/clover/connector/sdk/v3/PaymentConnector.java +++ b/clover-android-connector-sdk/src/main/java/com/clover/connector/sdk/v3/PaymentConnector.java @@ -256,18 +256,10 @@ public PaymentConnector(Context context, Account account, IPaymentConnectorListe addCloverConnectorListener(paymentConnectorListener); } - if (remoteApplicationId == null || remoteApplicationId.isEmpty()) { - try { - Toast.makeText(context, "Warning! No remote application ID provided!", Toast.LENGTH_LONG).show(); - } catch (Exception e) { - //most likely did not run on UI thread - Log.e(this.getClass().getSimpleName(), "Tried to make a Toast on non UI Thread", e); - } - } connectToPaymentService(context, account, remoteApplicationId); } - private void connectToPaymentService(final Context context, Account account, String remoteApplicationId) { + private void connectToPaymentService(final Context context, Account account, final String remoteApplicationId) { if (paymentV3Connector == null) { paymentV3Connector = new PaymentV3Connector(context, account, new ServiceConnector.OnServiceConnectedListener() { @Override diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/base/PendingPaymentEntry.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/base/PendingPaymentEntry.java index 3dfe9bc9c..70055f17a 100644 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/base/PendingPaymentEntry.java +++ b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/base/PendingPaymentEntry.java @@ -1,6 +1,6 @@ /** * Autogenerated by Avro - * + * * DO NOT EDIT DIRECTLY */ @@ -33,6 +33,8 @@ * */ @SuppressWarnings("all") @@ -52,6 +54,20 @@ public java.lang.String getPaymentId() { return genClient.cacheGet(CacheKey.paymentId); } + /** + * An id that will be persisted with transactions. + */ + public java.lang.String getExternalId() { + return genClient.cacheGet(CacheKey.externalId); + } + + /** + * Included tip + */ + public java.lang.Long getTipAmount() { + return genClient.cacheGet(CacheKey.tipAmount); + } + @@ -68,14 +84,26 @@ public Object extractValue(PendingPaymentEntry instance) { return instance.genClient.extractOther("paymentId", java.lang.String.class); } }, - ; + externalId { + @Override + public Object extractValue(PendingPaymentEntry instance) { + return instance.genClient.extractOther("externalId", java.lang.String.class); + } + }, + tipAmount { + @Override + public Object extractValue(PendingPaymentEntry instance) { + return instance.genClient.extractOther("tipAmount", java.lang.Long.class); + } + }, + ; } private GenericClient genClient; /** - * Constructs a new empty instance. - */ + * Constructs a new empty instance. + */ public PendingPaymentEntry() { genClient = new GenericClient(this); } @@ -86,8 +114,8 @@ protected GenericClient getGenericClient() { } /** - * Constructs a new empty instance. - */ + * Constructs a new empty instance. + */ protected PendingPaymentEntry(boolean noInit) { genClient = null; } @@ -147,6 +175,16 @@ public boolean isNotNullPaymentId() { return genClient.cacheValueIsNotNull(CacheKey.paymentId); } + /** Checks whether the 'externalId' field is set and is not null */ + public boolean isNotNullExternalId() { + return genClient.cacheValueIsNotNull(CacheKey.externalId); + } + + /** Checks whether the 'tipAmount' field is set and is not null */ + public boolean isNotNullTipAmount() { + return genClient.cacheValueIsNotNull(CacheKey.tipAmount); + } + /** Checks whether the 'amount' field has been set, however the value could be null */ @@ -159,6 +197,16 @@ public boolean hasPaymentId() { return genClient.cacheHasKey(CacheKey.paymentId); } + /** Checks whether the 'externalId' field has been set, however the value could be null */ + public boolean hasExternalId() { + return genClient.cacheHasKey(CacheKey.externalId); + } + + /** Checks whether the 'tipAmount' field has been set, however the value could be null */ + public boolean hasTipAmount() { + return genClient.cacheHasKey(CacheKey.tipAmount); + } + /** * Sets the field 'amount'. @@ -174,6 +222,20 @@ public PendingPaymentEntry setPaymentId(java.lang.String paymentId) { return genClient.setOther(paymentId, CacheKey.paymentId); } + /** + * Sets the field 'externalId'. + */ + public PendingPaymentEntry setExternalId(java.lang.String externalId) { + return genClient.setOther(externalId, CacheKey.externalId); + } + + /** + * Sets the field 'tipAmount'. + */ + public PendingPaymentEntry setTipAmount(java.lang.Long tipAmount) { + return genClient.setOther(tipAmount, CacheKey.tipAmount); + } + /** Clears the 'amount' field, the 'has' method for this field will now return false */ public void clearAmount() { @@ -183,6 +245,14 @@ public void clearAmount() { public void clearPaymentId() { genClient.clear(CacheKey.paymentId); } + /** Clears the 'externalId' field, the 'has' method for this field will now return false */ + public void clearExternalId() { + genClient.clear(CacheKey.externalId); + } + /** Clears the 'tipAmount' field, the 'has' method for this field will now return false */ + public void clearTipAmount() { + genClient.clear(CacheKey.tipAmount); + } /** @@ -245,6 +315,8 @@ public interface Constraints { public static final boolean AMOUNT_IS_REQUIRED = false; public static final boolean PAYMENTID_IS_REQUIRED = false; public static final long PAYMENTID_MAX_LEN = 13; + public static final boolean EXTERNALID_IS_REQUIRED = false; + public static final boolean TIPAMOUNT_IS_REQUIRED = false; } diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/AcknowledgementMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/AcknowledgementMessage.java deleted file mode 100644 index 9435881e4..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/AcknowledgementMessage.java +++ /dev/null @@ -1,297 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getSourceMessageId sourceMessageId}
  • - *
- */ -@SuppressWarnings("all") -public class AcknowledgementMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The remote message id that is being acknowledged - */ - public java.lang.String getSourceMessageId() { - return genClient.cacheGet(CacheKey.sourceMessageId); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - sourceMessageId { - @Override - public Object extractValue(AcknowledgementMessage instance) { - return instance.genClient.extractOther("sourceMessageId", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(AcknowledgementMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(AcknowledgementMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public AcknowledgementMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.ACK); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected AcknowledgementMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public AcknowledgementMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public AcknowledgementMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public AcknowledgementMessage(AcknowledgementMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - - genClient.validateLength(getSourceMessageId(), 13); - } - - /** Checks whether the 'sourceMessageId' field is set and is not null */ - public boolean isNotNullSourceMessageId() { - return genClient.cacheValueIsNotNull(CacheKey.sourceMessageId); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'sourceMessageId' field has been set, however the value could be null */ - public boolean hasSourceMessageId() { - return genClient.cacheHasKey(CacheKey.sourceMessageId); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'sourceMessageId'. - */ - public AcknowledgementMessage setSourceMessageId(java.lang.String sourceMessageId) { - return genClient.setOther(sourceMessageId, CacheKey.sourceMessageId); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'sourceMessageId' field, the 'has' method for this field will now return false */ - public void clearSourceMessageId() { - genClient.clear(CacheKey.sourceMessageId); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public AcknowledgementMessage copyChanges() { - AcknowledgementMessage copy = new AcknowledgementMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(AcknowledgementMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new AcknowledgementMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public AcknowledgementMessage createFromParcel(android.os.Parcel in) { - AcknowledgementMessage instance = new AcknowledgementMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public AcknowledgementMessage[] newArray(int size) { - return new AcknowledgementMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public AcknowledgementMessage create(org.json.JSONObject jsonObject) { - return new AcknowledgementMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean SOURCEMESSAGEID_IS_REQUIRED = false; - public static final long SOURCEMESSAGEID_MAX_LEN = 13; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ActivityMessageFromActivity.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ActivityMessageFromActivity.java deleted file mode 100644 index 05b2fa6fd..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ActivityMessageFromActivity.java +++ /dev/null @@ -1,330 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getAction action}
  • - *
  • {@link #getPayload payload}
  • - *
- */ -@SuppressWarnings("all") -public class ActivityMessageFromActivity extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The name of the activity/action being sent from a running custom activity - */ - public java.lang.String getAction() { - return genClient.cacheGet(CacheKey.action); - } - - /** - * Data for this activity - */ - public java.lang.String getPayload() { - return genClient.cacheGet(CacheKey.payload); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - action { - @Override - public Object extractValue(ActivityMessageFromActivity instance) { - return instance.genClient.extractOther("action", java.lang.String.class); - } - }, - payload { - @Override - public Object extractValue(ActivityMessageFromActivity instance) { - return instance.genClient.extractOther("payload", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(ActivityMessageFromActivity instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(ActivityMessageFromActivity instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public ActivityMessageFromActivity() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.ACTIVITY_MESSAGE_FROM_ACTIVITY); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected ActivityMessageFromActivity(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public ActivityMessageFromActivity(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public ActivityMessageFromActivity(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public ActivityMessageFromActivity(ActivityMessageFromActivity src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'action' field is set and is not null */ - public boolean isNotNullAction() { - return genClient.cacheValueIsNotNull(CacheKey.action); - } - - /** Checks whether the 'payload' field is set and is not null */ - public boolean isNotNullPayload() { - return genClient.cacheValueIsNotNull(CacheKey.payload); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'action' field has been set, however the value could be null */ - public boolean hasAction() { - return genClient.cacheHasKey(CacheKey.action); - } - - /** Checks whether the 'payload' field has been set, however the value could be null */ - public boolean hasPayload() { - return genClient.cacheHasKey(CacheKey.payload); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'action'. - */ - public ActivityMessageFromActivity setAction(java.lang.String action) { - return genClient.setOther(action, CacheKey.action); - } - - /** - * Sets the field 'payload'. - */ - public ActivityMessageFromActivity setPayload(java.lang.String payload) { - return genClient.setOther(payload, CacheKey.payload); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'action' field, the 'has' method for this field will now return false */ - public void clearAction() { - genClient.clear(CacheKey.action); - } - /** Clears the 'payload' field, the 'has' method for this field will now return false */ - public void clearPayload() { - genClient.clear(CacheKey.payload); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public ActivityMessageFromActivity copyChanges() { - ActivityMessageFromActivity copy = new ActivityMessageFromActivity(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(ActivityMessageFromActivity src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new ActivityMessageFromActivity(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public ActivityMessageFromActivity createFromParcel(android.os.Parcel in) { - ActivityMessageFromActivity instance = new ActivityMessageFromActivity(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public ActivityMessageFromActivity[] newArray(int size) { - return new ActivityMessageFromActivity[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public ActivityMessageFromActivity create(org.json.JSONObject jsonObject) { - return new ActivityMessageFromActivity(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean ACTION_IS_REQUIRED = false; - public static final boolean PAYLOAD_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ActivityMessageToActivity.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ActivityMessageToActivity.java deleted file mode 100644 index 717c5d27b..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ActivityMessageToActivity.java +++ /dev/null @@ -1,330 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getAction action}
  • - *
  • {@link #getPayload payload}
  • - *
- */ -@SuppressWarnings("all") -public class ActivityMessageToActivity extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The name of the activity/action being sent to a running custom activity - */ - public java.lang.String getAction() { - return genClient.cacheGet(CacheKey.action); - } - - /** - * Data for this activity - */ - public java.lang.String getPayload() { - return genClient.cacheGet(CacheKey.payload); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - action { - @Override - public Object extractValue(ActivityMessageToActivity instance) { - return instance.genClient.extractOther("action", java.lang.String.class); - } - }, - payload { - @Override - public Object extractValue(ActivityMessageToActivity instance) { - return instance.genClient.extractOther("payload", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(ActivityMessageToActivity instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(ActivityMessageToActivity instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public ActivityMessageToActivity() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.ACTIVITY_MESSAGE_TO_ACTIVITY); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected ActivityMessageToActivity(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public ActivityMessageToActivity(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public ActivityMessageToActivity(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public ActivityMessageToActivity(ActivityMessageToActivity src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'action' field is set and is not null */ - public boolean isNotNullAction() { - return genClient.cacheValueIsNotNull(CacheKey.action); - } - - /** Checks whether the 'payload' field is set and is not null */ - public boolean isNotNullPayload() { - return genClient.cacheValueIsNotNull(CacheKey.payload); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'action' field has been set, however the value could be null */ - public boolean hasAction() { - return genClient.cacheHasKey(CacheKey.action); - } - - /** Checks whether the 'payload' field has been set, however the value could be null */ - public boolean hasPayload() { - return genClient.cacheHasKey(CacheKey.payload); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'action'. - */ - public ActivityMessageToActivity setAction(java.lang.String action) { - return genClient.setOther(action, CacheKey.action); - } - - /** - * Sets the field 'payload'. - */ - public ActivityMessageToActivity setPayload(java.lang.String payload) { - return genClient.setOther(payload, CacheKey.payload); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'action' field, the 'has' method for this field will now return false */ - public void clearAction() { - genClient.clear(CacheKey.action); - } - /** Clears the 'payload' field, the 'has' method for this field will now return false */ - public void clearPayload() { - genClient.clear(CacheKey.payload); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public ActivityMessageToActivity copyChanges() { - ActivityMessageToActivity copy = new ActivityMessageToActivity(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(ActivityMessageToActivity src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new ActivityMessageToActivity(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public ActivityMessageToActivity createFromParcel(android.os.Parcel in) { - ActivityMessageToActivity instance = new ActivityMessageToActivity(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public ActivityMessageToActivity[] newArray(int size) { - return new ActivityMessageToActivity[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public ActivityMessageToActivity create(org.json.JSONObject jsonObject) { - return new ActivityMessageToActivity(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean ACTION_IS_REQUIRED = false; - public static final boolean PAYLOAD_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ActivityRequest.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ActivityRequest.java deleted file mode 100644 index 38da55f91..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ActivityRequest.java +++ /dev/null @@ -1,402 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getAction action}
  • - *
  • {@link #getPayload payload}
  • - *
  • {@link #getNonBlocking nonBlocking}
  • - *
  • {@link #getForceLaunch forceLaunch}
  • - *
- */ -@SuppressWarnings("all") -public class ActivityRequest extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The name of the action for this activity - */ - public java.lang.String getAction() { - return genClient.cacheGet(CacheKey.action); - } - - /** - * Data for this activity - */ - public java.lang.String getPayload() { - return genClient.cacheGet(CacheKey.payload); - } - - /** - * If true, then the activity can be stopped in regular execution. - */ - public java.lang.Boolean getNonBlocking() { - return genClient.cacheGet(CacheKey.nonBlocking); - } - - /** - * If true, then the activity will cancel other activity and run. This includes payment activity. - */ - public java.lang.Boolean getForceLaunch() { - return genClient.cacheGet(CacheKey.forceLaunch); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - action { - @Override - public Object extractValue(ActivityRequest instance) { - return instance.genClient.extractOther("action", java.lang.String.class); - } - }, - payload { - @Override - public Object extractValue(ActivityRequest instance) { - return instance.genClient.extractOther("payload", java.lang.String.class); - } - }, - nonBlocking { - @Override - public Object extractValue(ActivityRequest instance) { - return instance.genClient.extractOther("nonBlocking", java.lang.Boolean.class); - } - }, - forceLaunch { - @Override - public Object extractValue(ActivityRequest instance) { - return instance.genClient.extractOther("forceLaunch", java.lang.Boolean.class); - } - }, - method { - @Override - public Object extractValue(ActivityRequest instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(ActivityRequest instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public ActivityRequest() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.ACTIVITY_REQUEST); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected ActivityRequest(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public ActivityRequest(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public ActivityRequest(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public ActivityRequest(ActivityRequest src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'action' field is set and is not null */ - public boolean isNotNullAction() { - return genClient.cacheValueIsNotNull(CacheKey.action); - } - - /** Checks whether the 'payload' field is set and is not null */ - public boolean isNotNullPayload() { - return genClient.cacheValueIsNotNull(CacheKey.payload); - } - - /** Checks whether the 'nonBlocking' field is set and is not null */ - public boolean isNotNullNonBlocking() { - return genClient.cacheValueIsNotNull(CacheKey.nonBlocking); - } - - /** Checks whether the 'forceLaunch' field is set and is not null */ - public boolean isNotNullForceLaunch() { - return genClient.cacheValueIsNotNull(CacheKey.forceLaunch); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'action' field has been set, however the value could be null */ - public boolean hasAction() { - return genClient.cacheHasKey(CacheKey.action); - } - - /** Checks whether the 'payload' field has been set, however the value could be null */ - public boolean hasPayload() { - return genClient.cacheHasKey(CacheKey.payload); - } - - /** Checks whether the 'nonBlocking' field has been set, however the value could be null */ - public boolean hasNonBlocking() { - return genClient.cacheHasKey(CacheKey.nonBlocking); - } - - /** Checks whether the 'forceLaunch' field has been set, however the value could be null */ - public boolean hasForceLaunch() { - return genClient.cacheHasKey(CacheKey.forceLaunch); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'action'. - */ - public ActivityRequest setAction(java.lang.String action) { - return genClient.setOther(action, CacheKey.action); - } - - /** - * Sets the field 'payload'. - */ - public ActivityRequest setPayload(java.lang.String payload) { - return genClient.setOther(payload, CacheKey.payload); - } - - /** - * Sets the field 'nonBlocking'. - */ - public ActivityRequest setNonBlocking(java.lang.Boolean nonBlocking) { - return genClient.setOther(nonBlocking, CacheKey.nonBlocking); - } - - /** - * Sets the field 'forceLaunch'. - */ - public ActivityRequest setForceLaunch(java.lang.Boolean forceLaunch) { - return genClient.setOther(forceLaunch, CacheKey.forceLaunch); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'action' field, the 'has' method for this field will now return false */ - public void clearAction() { - genClient.clear(CacheKey.action); - } - /** Clears the 'payload' field, the 'has' method for this field will now return false */ - public void clearPayload() { - genClient.clear(CacheKey.payload); - } - /** Clears the 'nonBlocking' field, the 'has' method for this field will now return false */ - public void clearNonBlocking() { - genClient.clear(CacheKey.nonBlocking); - } - /** Clears the 'forceLaunch' field, the 'has' method for this field will now return false */ - public void clearForceLaunch() { - genClient.clear(CacheKey.forceLaunch); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public ActivityRequest copyChanges() { - ActivityRequest copy = new ActivityRequest(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(ActivityRequest src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new ActivityRequest(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public ActivityRequest createFromParcel(android.os.Parcel in) { - ActivityRequest instance = new ActivityRequest(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public ActivityRequest[] newArray(int size) { - return new ActivityRequest[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public ActivityRequest create(org.json.JSONObject jsonObject) { - return new ActivityRequest(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean ACTION_IS_REQUIRED = false; - public static final boolean PAYLOAD_IS_REQUIRED = false; - public static final boolean NONBLOCKING_IS_REQUIRED = false; - public static final boolean FORCELAUNCH_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ActivityResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ActivityResponseMessage.java deleted file mode 100644 index 5f2bc843f..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ActivityResponseMessage.java +++ /dev/null @@ -1,402 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getResultCode resultCode}
  • - *
  • {@link #getFailReason failReason}
  • - *
  • {@link #getPayload payload}
  • - *
  • {@link #getAction action}
  • - *
- */ -@SuppressWarnings("all") -public class ActivityResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The result code after running this activity - */ - public java.lang.Long getResultCode() { - return genClient.cacheGet(CacheKey.resultCode); - } - - /** - * If this activity failed, the reason for the failure - */ - public java.lang.String getFailReason() { - return genClient.cacheGet(CacheKey.failReason); - } - - /** - * Response data for this activity - */ - public java.lang.String getPayload() { - return genClient.cacheGet(CacheKey.payload); - } - - /** - * The name of the action for this activity - */ - public java.lang.String getAction() { - return genClient.cacheGet(CacheKey.action); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - resultCode { - @Override - public Object extractValue(ActivityResponseMessage instance) { - return instance.genClient.extractOther("resultCode", java.lang.Long.class); - } - }, - failReason { - @Override - public Object extractValue(ActivityResponseMessage instance) { - return instance.genClient.extractOther("failReason", java.lang.String.class); - } - }, - payload { - @Override - public Object extractValue(ActivityResponseMessage instance) { - return instance.genClient.extractOther("payload", java.lang.String.class); - } - }, - action { - @Override - public Object extractValue(ActivityResponseMessage instance) { - return instance.genClient.extractOther("action", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(ActivityResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(ActivityResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public ActivityResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.ACTIVITY_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected ActivityResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public ActivityResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public ActivityResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public ActivityResponseMessage(ActivityResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'resultCode' field is set and is not null */ - public boolean isNotNullResultCode() { - return genClient.cacheValueIsNotNull(CacheKey.resultCode); - } - - /** Checks whether the 'failReason' field is set and is not null */ - public boolean isNotNullFailReason() { - return genClient.cacheValueIsNotNull(CacheKey.failReason); - } - - /** Checks whether the 'payload' field is set and is not null */ - public boolean isNotNullPayload() { - return genClient.cacheValueIsNotNull(CacheKey.payload); - } - - /** Checks whether the 'action' field is set and is not null */ - public boolean isNotNullAction() { - return genClient.cacheValueIsNotNull(CacheKey.action); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'resultCode' field has been set, however the value could be null */ - public boolean hasResultCode() { - return genClient.cacheHasKey(CacheKey.resultCode); - } - - /** Checks whether the 'failReason' field has been set, however the value could be null */ - public boolean hasFailReason() { - return genClient.cacheHasKey(CacheKey.failReason); - } - - /** Checks whether the 'payload' field has been set, however the value could be null */ - public boolean hasPayload() { - return genClient.cacheHasKey(CacheKey.payload); - } - - /** Checks whether the 'action' field has been set, however the value could be null */ - public boolean hasAction() { - return genClient.cacheHasKey(CacheKey.action); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'resultCode'. - */ - public ActivityResponseMessage setResultCode(java.lang.Long resultCode) { - return genClient.setOther(resultCode, CacheKey.resultCode); - } - - /** - * Sets the field 'failReason'. - */ - public ActivityResponseMessage setFailReason(java.lang.String failReason) { - return genClient.setOther(failReason, CacheKey.failReason); - } - - /** - * Sets the field 'payload'. - */ - public ActivityResponseMessage setPayload(java.lang.String payload) { - return genClient.setOther(payload, CacheKey.payload); - } - - /** - * Sets the field 'action'. - */ - public ActivityResponseMessage setAction(java.lang.String action) { - return genClient.setOther(action, CacheKey.action); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'resultCode' field, the 'has' method for this field will now return false */ - public void clearResultCode() { - genClient.clear(CacheKey.resultCode); - } - /** Clears the 'failReason' field, the 'has' method for this field will now return false */ - public void clearFailReason() { - genClient.clear(CacheKey.failReason); - } - /** Clears the 'payload' field, the 'has' method for this field will now return false */ - public void clearPayload() { - genClient.clear(CacheKey.payload); - } - /** Clears the 'action' field, the 'has' method for this field will now return false */ - public void clearAction() { - genClient.clear(CacheKey.action); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public ActivityResponseMessage copyChanges() { - ActivityResponseMessage copy = new ActivityResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(ActivityResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new ActivityResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public ActivityResponseMessage createFromParcel(android.os.Parcel in) { - ActivityResponseMessage instance = new ActivityResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public ActivityResponseMessage[] newArray(int size) { - return new ActivityResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public ActivityResponseMessage create(org.json.JSONObject jsonObject) { - return new ActivityResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean RESULTCODE_IS_REQUIRED = false; - public static final boolean FAILREASON_IS_REQUIRED = false; - public static final boolean PAYLOAD_IS_REQUIRED = false; - public static final boolean ACTION_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/AddDiscountAction.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/AddDiscountAction.java deleted file mode 100644 index b46d316c1..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/AddDiscountAction.java +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; -import com.clover.sdk.GenericParcelable; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getDiscount discount}
  • - *
- */ -@SuppressWarnings("all") -public class AddDiscountAction extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable { - - public com.clover.sdk.v3.order.DisplayDiscount getDiscount() { - return genClient.cacheGet(CacheKey.discount); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - discount { - @Override - public Object extractValue(AddDiscountAction instance) { - return instance.genClient.extractRecord("discount", com.clover.sdk.v3.order.DisplayDiscount.JSON_CREATOR); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public AddDiscountAction() { - genClient = new GenericClient(this); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected AddDiscountAction(boolean noInit) { - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public AddDiscountAction(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public AddDiscountAction(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public AddDiscountAction(AddDiscountAction src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'discount' field is set and is not null */ - public boolean isNotNullDiscount() { - return genClient.cacheValueIsNotNull(CacheKey.discount); - } - - - - /** Checks whether the 'discount' field has been set, however the value could be null */ - public boolean hasDiscount() { - return genClient.cacheHasKey(CacheKey.discount); - } - - - /** - * Sets the field 'discount'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public AddDiscountAction setDiscount(com.clover.sdk.v3.order.DisplayDiscount discount) { - return genClient.setRecord(discount, CacheKey.discount); - } - - - /** Clears the 'discount' field, the 'has' method for this field will now return false */ - public void clearDiscount() { - genClient.clear(CacheKey.discount); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public AddDiscountAction copyChanges() { - AddDiscountAction copy = new AddDiscountAction(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(AddDiscountAction src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new AddDiscountAction(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public AddDiscountAction createFromParcel(android.os.Parcel in) { - AddDiscountAction instance = new AddDiscountAction(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public AddDiscountAction[] newArray(int size) { - return new AddDiscountAction[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public AddDiscountAction create(org.json.JSONObject jsonObject) { - return new AddDiscountAction(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean DISCOUNT_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/AddLineItemAction.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/AddLineItemAction.java deleted file mode 100644 index 6465bb400..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/AddLineItemAction.java +++ /dev/null @@ -1,244 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; -import com.clover.sdk.GenericParcelable; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getDiscount discount}
  • - *
  • {@link #getTaxable taxable}
  • - *
- */ -@SuppressWarnings("all") -public class AddLineItemAction extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable { - - public com.clover.sdk.v3.order.DisplayLineItem getDiscount() { - return genClient.cacheGet(CacheKey.discount); - } - - public java.lang.Boolean getTaxable() { - return genClient.cacheGet(CacheKey.taxable); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - discount { - @Override - public Object extractValue(AddLineItemAction instance) { - return instance.genClient.extractRecord("discount", com.clover.sdk.v3.order.DisplayLineItem.JSON_CREATOR); - } - }, - taxable { - @Override - public Object extractValue(AddLineItemAction instance) { - return instance.genClient.extractOther("taxable", java.lang.Boolean.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public AddLineItemAction() { - genClient = new GenericClient(this); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected AddLineItemAction(boolean noInit) { - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public AddLineItemAction(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public AddLineItemAction(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public AddLineItemAction(AddLineItemAction src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'discount' field is set and is not null */ - public boolean isNotNullDiscount() { - return genClient.cacheValueIsNotNull(CacheKey.discount); - } - - /** Checks whether the 'taxable' field is set and is not null */ - public boolean isNotNullTaxable() { - return genClient.cacheValueIsNotNull(CacheKey.taxable); - } - - - - /** Checks whether the 'discount' field has been set, however the value could be null */ - public boolean hasDiscount() { - return genClient.cacheHasKey(CacheKey.discount); - } - - /** Checks whether the 'taxable' field has been set, however the value could be null */ - public boolean hasTaxable() { - return genClient.cacheHasKey(CacheKey.taxable); - } - - - /** - * Sets the field 'discount'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public AddLineItemAction setDiscount(com.clover.sdk.v3.order.DisplayLineItem discount) { - return genClient.setRecord(discount, CacheKey.discount); - } - - /** - * Sets the field 'taxable'. - */ - public AddLineItemAction setTaxable(java.lang.Boolean taxable) { - return genClient.setOther(taxable, CacheKey.taxable); - } - - - /** Clears the 'discount' field, the 'has' method for this field will now return false */ - public void clearDiscount() { - genClient.clear(CacheKey.discount); - } - /** Clears the 'taxable' field, the 'has' method for this field will now return false */ - public void clearTaxable() { - genClient.clear(CacheKey.taxable); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public AddLineItemAction copyChanges() { - AddLineItemAction copy = new AddLineItemAction(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(AddLineItemAction src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new AddLineItemAction(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public AddLineItemAction createFromParcel(android.os.Parcel in) { - AddLineItemAction instance = new AddLineItemAction(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public AddLineItemAction[] newArray(int size) { - return new AddLineItemAction[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public AddLineItemAction create(org.json.JSONObject jsonObject) { - return new AddLineItemAction(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean DISCOUNT_IS_REQUIRED = false; - public static final boolean TAXABLE_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/BreakMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/BreakMessage.java deleted file mode 100644 index 66346316c..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/BreakMessage.java +++ /dev/null @@ -1,258 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
- */ -@SuppressWarnings("all") -public class BreakMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - method { - @Override - public Object extractValue(BreakMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(BreakMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public BreakMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.BREAK); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected BreakMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public BreakMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public BreakMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public BreakMessage(BreakMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public BreakMessage copyChanges() { - BreakMessage copy = new BreakMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(BreakMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new BreakMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public BreakMessage createFromParcel(android.os.Parcel in) { - BreakMessage instance = new BreakMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public BreakMessage[] newArray(int size) { - return new BreakMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public BreakMessage create(org.json.JSONObject jsonObject) { - return new BreakMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CapturePreAuthMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CapturePreAuthMessage.java deleted file mode 100644 index 226e76f17..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CapturePreAuthMessage.java +++ /dev/null @@ -1,369 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getAmount amount}
  • - *
  • {@link #getTipAmount tipAmount}
  • - *
  • {@link #getPaymentId paymentId}
  • - *
- */ -@SuppressWarnings("all") -public class CapturePreAuthMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * Total amount paid - */ - public java.lang.Long getAmount() { - return genClient.cacheGet(CacheKey.amount); - } - - /** - * Amount paid in tips - */ - public java.lang.Long getTipAmount() { - return genClient.cacheGet(CacheKey.tipAmount); - } - - /** - * Unique identifier for a payment - */ - public java.lang.String getPaymentId() { - return genClient.cacheGet(CacheKey.paymentId); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - amount { - @Override - public Object extractValue(CapturePreAuthMessage instance) { - return instance.genClient.extractOther("amount", java.lang.Long.class); - } - }, - tipAmount { - @Override - public Object extractValue(CapturePreAuthMessage instance) { - return instance.genClient.extractOther("tipAmount", java.lang.Long.class); - } - }, - paymentId { - @Override - public Object extractValue(CapturePreAuthMessage instance) { - return instance.genClient.extractOther("paymentId", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(CapturePreAuthMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(CapturePreAuthMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public CapturePreAuthMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.CAPTURE_PREAUTH); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected CapturePreAuthMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public CapturePreAuthMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public CapturePreAuthMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public CapturePreAuthMessage(CapturePreAuthMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - - genClient.validateLength(getPaymentId(), 13); - } - - /** Checks whether the 'amount' field is set and is not null */ - public boolean isNotNullAmount() { - return genClient.cacheValueIsNotNull(CacheKey.amount); - } - - /** Checks whether the 'tipAmount' field is set and is not null */ - public boolean isNotNullTipAmount() { - return genClient.cacheValueIsNotNull(CacheKey.tipAmount); - } - - /** Checks whether the 'paymentId' field is set and is not null */ - public boolean isNotNullPaymentId() { - return genClient.cacheValueIsNotNull(CacheKey.paymentId); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'amount' field has been set, however the value could be null */ - public boolean hasAmount() { - return genClient.cacheHasKey(CacheKey.amount); - } - - /** Checks whether the 'tipAmount' field has been set, however the value could be null */ - public boolean hasTipAmount() { - return genClient.cacheHasKey(CacheKey.tipAmount); - } - - /** Checks whether the 'paymentId' field has been set, however the value could be null */ - public boolean hasPaymentId() { - return genClient.cacheHasKey(CacheKey.paymentId); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'amount'. - */ - public CapturePreAuthMessage setAmount(java.lang.Long amount) { - return genClient.setOther(amount, CacheKey.amount); - } - - /** - * Sets the field 'tipAmount'. - */ - public CapturePreAuthMessage setTipAmount(java.lang.Long tipAmount) { - return genClient.setOther(tipAmount, CacheKey.tipAmount); - } - - /** - * Sets the field 'paymentId'. - */ - public CapturePreAuthMessage setPaymentId(java.lang.String paymentId) { - return genClient.setOther(paymentId, CacheKey.paymentId); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'amount' field, the 'has' method for this field will now return false */ - public void clearAmount() { - genClient.clear(CacheKey.amount); - } - /** Clears the 'tipAmount' field, the 'has' method for this field will now return false */ - public void clearTipAmount() { - genClient.clear(CacheKey.tipAmount); - } - /** Clears the 'paymentId' field, the 'has' method for this field will now return false */ - public void clearPaymentId() { - genClient.clear(CacheKey.paymentId); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public CapturePreAuthMessage copyChanges() { - CapturePreAuthMessage copy = new CapturePreAuthMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(CapturePreAuthMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new CapturePreAuthMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public CapturePreAuthMessage createFromParcel(android.os.Parcel in) { - CapturePreAuthMessage instance = new CapturePreAuthMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public CapturePreAuthMessage[] newArray(int size) { - return new CapturePreAuthMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public CapturePreAuthMessage create(org.json.JSONObject jsonObject) { - return new CapturePreAuthMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean AMOUNT_IS_REQUIRED = false; - public static final boolean TIPAMOUNT_IS_REQUIRED = false; - public static final boolean PAYMENTID_IS_REQUIRED = false; - public static final long PAYMENTID_MAX_LEN = 13; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CapturePreAuthResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CapturePreAuthResponseMessage.java deleted file mode 100644 index 696e6ee75..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CapturePreAuthResponseMessage.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getStatus status}
  • - *
  • {@link #getReason reason}
  • - *
  • {@link #getPaymentId paymentId}
  • - *
  • {@link #getAmount amount}
  • - *
  • {@link #getTipAmount tipAmount}
  • - *
- */ -@SuppressWarnings("all") -public class CapturePreAuthResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The status of the request. - */ - public com.clover.sdk.v3.remotemessage.ResultStatus getStatus() { - return genClient.cacheGet(CacheKey.status); - } - - /** - * Detail message from the server. - */ - public java.lang.String getReason() { - return genClient.cacheGet(CacheKey.reason); - } - - /** - * Unique identifier for a payment - */ - public java.lang.String getPaymentId() { - return genClient.cacheGet(CacheKey.paymentId); - } - - /** - * Total amount paid - */ - public java.lang.Long getAmount() { - return genClient.cacheGet(CacheKey.amount); - } - - /** - * Amount paid in tips - */ - public java.lang.Long getTipAmount() { - return genClient.cacheGet(CacheKey.tipAmount); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - status { - @Override - public Object extractValue(CapturePreAuthResponseMessage instance) { - return instance.genClient.extractEnum("status", com.clover.sdk.v3.remotemessage.ResultStatus.class); - } - }, - reason { - @Override - public Object extractValue(CapturePreAuthResponseMessage instance) { - return instance.genClient.extractOther("reason", java.lang.String.class); - } - }, - paymentId { - @Override - public Object extractValue(CapturePreAuthResponseMessage instance) { - return instance.genClient.extractOther("paymentId", java.lang.String.class); - } - }, - amount { - @Override - public Object extractValue(CapturePreAuthResponseMessage instance) { - return instance.genClient.extractOther("amount", java.lang.Long.class); - } - }, - tipAmount { - @Override - public Object extractValue(CapturePreAuthResponseMessage instance) { - return instance.genClient.extractOther("tipAmount", java.lang.Long.class); - } - }, - method { - @Override - public Object extractValue(CapturePreAuthResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(CapturePreAuthResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public CapturePreAuthResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.CAPTURE_PREAUTH_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected CapturePreAuthResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public CapturePreAuthResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public CapturePreAuthResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public CapturePreAuthResponseMessage(CapturePreAuthResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - - genClient.validateLength(getPaymentId(), 13); - } - - /** Checks whether the 'status' field is set and is not null */ - public boolean isNotNullStatus() { - return genClient.cacheValueIsNotNull(CacheKey.status); - } - - /** Checks whether the 'reason' field is set and is not null */ - public boolean isNotNullReason() { - return genClient.cacheValueIsNotNull(CacheKey.reason); - } - - /** Checks whether the 'paymentId' field is set and is not null */ - public boolean isNotNullPaymentId() { - return genClient.cacheValueIsNotNull(CacheKey.paymentId); - } - - /** Checks whether the 'amount' field is set and is not null */ - public boolean isNotNullAmount() { - return genClient.cacheValueIsNotNull(CacheKey.amount); - } - - /** Checks whether the 'tipAmount' field is set and is not null */ - public boolean isNotNullTipAmount() { - return genClient.cacheValueIsNotNull(CacheKey.tipAmount); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'status' field has been set, however the value could be null */ - public boolean hasStatus() { - return genClient.cacheHasKey(CacheKey.status); - } - - /** Checks whether the 'reason' field has been set, however the value could be null */ - public boolean hasReason() { - return genClient.cacheHasKey(CacheKey.reason); - } - - /** Checks whether the 'paymentId' field has been set, however the value could be null */ - public boolean hasPaymentId() { - return genClient.cacheHasKey(CacheKey.paymentId); - } - - /** Checks whether the 'amount' field has been set, however the value could be null */ - public boolean hasAmount() { - return genClient.cacheHasKey(CacheKey.amount); - } - - /** Checks whether the 'tipAmount' field has been set, however the value could be null */ - public boolean hasTipAmount() { - return genClient.cacheHasKey(CacheKey.tipAmount); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'status'. - */ - public CapturePreAuthResponseMessage setStatus(com.clover.sdk.v3.remotemessage.ResultStatus status) { - return genClient.setOther(status, CacheKey.status); - } - - /** - * Sets the field 'reason'. - */ - public CapturePreAuthResponseMessage setReason(java.lang.String reason) { - return genClient.setOther(reason, CacheKey.reason); - } - - /** - * Sets the field 'paymentId'. - */ - public CapturePreAuthResponseMessage setPaymentId(java.lang.String paymentId) { - return genClient.setOther(paymentId, CacheKey.paymentId); - } - - /** - * Sets the field 'amount'. - */ - public CapturePreAuthResponseMessage setAmount(java.lang.Long amount) { - return genClient.setOther(amount, CacheKey.amount); - } - - /** - * Sets the field 'tipAmount'. - */ - public CapturePreAuthResponseMessage setTipAmount(java.lang.Long tipAmount) { - return genClient.setOther(tipAmount, CacheKey.tipAmount); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'status' field, the 'has' method for this field will now return false */ - public void clearStatus() { - genClient.clear(CacheKey.status); - } - /** Clears the 'reason' field, the 'has' method for this field will now return false */ - public void clearReason() { - genClient.clear(CacheKey.reason); - } - /** Clears the 'paymentId' field, the 'has' method for this field will now return false */ - public void clearPaymentId() { - genClient.clear(CacheKey.paymentId); - } - /** Clears the 'amount' field, the 'has' method for this field will now return false */ - public void clearAmount() { - genClient.clear(CacheKey.amount); - } - /** Clears the 'tipAmount' field, the 'has' method for this field will now return false */ - public void clearTipAmount() { - genClient.clear(CacheKey.tipAmount); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public CapturePreAuthResponseMessage copyChanges() { - CapturePreAuthResponseMessage copy = new CapturePreAuthResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(CapturePreAuthResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new CapturePreAuthResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public CapturePreAuthResponseMessage createFromParcel(android.os.Parcel in) { - CapturePreAuthResponseMessage instance = new CapturePreAuthResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public CapturePreAuthResponseMessage[] newArray(int size) { - return new CapturePreAuthResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public CapturePreAuthResponseMessage create(org.json.JSONObject jsonObject) { - return new CapturePreAuthResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean STATUS_IS_REQUIRED = false; - public static final boolean REASON_IS_REQUIRED = false; - public static final boolean PAYMENTID_IS_REQUIRED = false; - public static final long PAYMENTID_MAX_LEN = 13; - public static final boolean AMOUNT_IS_REQUIRED = false; - public static final boolean TIPAMOUNT_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CardDataRequestMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CardDataRequestMessage.java deleted file mode 100644 index 60ba616bc..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CardDataRequestMessage.java +++ /dev/null @@ -1,296 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getPayIntent payIntent}
  • - *
- */ -@SuppressWarnings("all") -public class CardDataRequestMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The payIntent - */ - public com.clover.sdk.v3.remotemessage.PayIntent getPayIntent() { - return genClient.cacheGet(CacheKey.payIntent); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - payIntent { - @Override - public Object extractValue(CardDataRequestMessage instance) { - return instance.genClient.extractRecord("payIntent", com.clover.sdk.v3.remotemessage.PayIntent.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(CardDataRequestMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(CardDataRequestMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public CardDataRequestMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.CARD_DATA); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected CardDataRequestMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public CardDataRequestMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public CardDataRequestMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public CardDataRequestMessage(CardDataRequestMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'payIntent' field is set and is not null */ - public boolean isNotNullPayIntent() { - return genClient.cacheValueIsNotNull(CacheKey.payIntent); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'payIntent' field has been set, however the value could be null */ - public boolean hasPayIntent() { - return genClient.cacheHasKey(CacheKey.payIntent); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'payIntent'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public CardDataRequestMessage setPayIntent(com.clover.sdk.v3.remotemessage.PayIntent payIntent) { - return genClient.setRecord(payIntent, CacheKey.payIntent); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'payIntent' field, the 'has' method for this field will now return false */ - public void clearPayIntent() { - genClient.clear(CacheKey.payIntent); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public CardDataRequestMessage copyChanges() { - CardDataRequestMessage copy = new CardDataRequestMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(CardDataRequestMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new CardDataRequestMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public CardDataRequestMessage createFromParcel(android.os.Parcel in) { - CardDataRequestMessage instance = new CardDataRequestMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public CardDataRequestMessage[] newArray(int size) { - return new CardDataRequestMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public CardDataRequestMessage create(org.json.JSONObject jsonObject) { - return new CardDataRequestMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean PAYINTENT_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CardDataResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CardDataResponseMessage.java deleted file mode 100644 index 73e39390f..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CardDataResponseMessage.java +++ /dev/null @@ -1,365 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getReason reason}
  • - *
  • {@link #getStatus status}
  • - *
  • {@link #getCardData cardData}
  • - *
- */ -@SuppressWarnings("all") -public class CardDataResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * May be populated when the operation fails. - */ - public java.lang.String getReason() { - return genClient.cacheGet(CacheKey.reason); - } - - public com.clover.sdk.v3.remotemessage.ResultStatus getStatus() { - return genClient.cacheGet(CacheKey.status); - } - - /** - * The data for the card - */ - public com.clover.sdk.v3.base.CardData getCardData() { - return genClient.cacheGet(CacheKey.cardData); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - reason { - @Override - public Object extractValue(CardDataResponseMessage instance) { - return instance.genClient.extractOther("reason", java.lang.String.class); - } - }, - status { - @Override - public Object extractValue(CardDataResponseMessage instance) { - return instance.genClient.extractEnum("status", com.clover.sdk.v3.remotemessage.ResultStatus.class); - } - }, - cardData { - @Override - public Object extractValue(CardDataResponseMessage instance) { - return instance.genClient.extractRecord("cardData", com.clover.sdk.v3.base.CardData.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(CardDataResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(CardDataResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public CardDataResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.CARD_DATA_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected CardDataResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public CardDataResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public CardDataResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public CardDataResponseMessage(CardDataResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'reason' field is set and is not null */ - public boolean isNotNullReason() { - return genClient.cacheValueIsNotNull(CacheKey.reason); - } - - /** Checks whether the 'status' field is set and is not null */ - public boolean isNotNullStatus() { - return genClient.cacheValueIsNotNull(CacheKey.status); - } - - /** Checks whether the 'cardData' field is set and is not null */ - public boolean isNotNullCardData() { - return genClient.cacheValueIsNotNull(CacheKey.cardData); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'reason' field has been set, however the value could be null */ - public boolean hasReason() { - return genClient.cacheHasKey(CacheKey.reason); - } - - /** Checks whether the 'status' field has been set, however the value could be null */ - public boolean hasStatus() { - return genClient.cacheHasKey(CacheKey.status); - } - - /** Checks whether the 'cardData' field has been set, however the value could be null */ - public boolean hasCardData() { - return genClient.cacheHasKey(CacheKey.cardData); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'reason'. - */ - public CardDataResponseMessage setReason(java.lang.String reason) { - return genClient.setOther(reason, CacheKey.reason); - } - - /** - * Sets the field 'status'. - */ - public CardDataResponseMessage setStatus(com.clover.sdk.v3.remotemessage.ResultStatus status) { - return genClient.setOther(status, CacheKey.status); - } - - /** - * Sets the field 'cardData'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public CardDataResponseMessage setCardData(com.clover.sdk.v3.base.CardData cardData) { - return genClient.setRecord(cardData, CacheKey.cardData); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'reason' field, the 'has' method for this field will now return false */ - public void clearReason() { - genClient.clear(CacheKey.reason); - } - /** Clears the 'status' field, the 'has' method for this field will now return false */ - public void clearStatus() { - genClient.clear(CacheKey.status); - } - /** Clears the 'cardData' field, the 'has' method for this field will now return false */ - public void clearCardData() { - genClient.clear(CacheKey.cardData); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public CardDataResponseMessage copyChanges() { - CardDataResponseMessage copy = new CardDataResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(CardDataResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new CardDataResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public CardDataResponseMessage createFromParcel(android.os.Parcel in) { - CardDataResponseMessage instance = new CardDataResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public CardDataResponseMessage[] newArray(int size) { - return new CardDataResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public CardDataResponseMessage create(org.json.JSONObject jsonObject) { - return new CardDataResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean REASON_IS_REQUIRED = false; - public static final boolean STATUS_IS_REQUIRED = false; - public static final boolean CARDDATA_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CashbackSelectedMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CashbackSelectedMessage.java deleted file mode 100644 index 09b96c7ea..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CashbackSelectedMessage.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getCashbackAmount cashbackAmount}
  • - *
- */ -@SuppressWarnings("all") -public class CashbackSelectedMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * Amount of cash selected - */ - public java.lang.Long getCashbackAmount() { - return genClient.cacheGet(CacheKey.cashbackAmount); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - cashbackAmount { - @Override - public Object extractValue(CashbackSelectedMessage instance) { - return instance.genClient.extractOther("cashbackAmount", java.lang.Long.class); - } - }, - method { - @Override - public Object extractValue(CashbackSelectedMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(CashbackSelectedMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public CashbackSelectedMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.CASHBACK_SELECTED); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected CashbackSelectedMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public CashbackSelectedMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public CashbackSelectedMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public CashbackSelectedMessage(CashbackSelectedMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'cashbackAmount' field is set and is not null */ - public boolean isNotNullCashbackAmount() { - return genClient.cacheValueIsNotNull(CacheKey.cashbackAmount); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'cashbackAmount' field has been set, however the value could be null */ - public boolean hasCashbackAmount() { - return genClient.cacheHasKey(CacheKey.cashbackAmount); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'cashbackAmount'. - */ - public CashbackSelectedMessage setCashbackAmount(java.lang.Long cashbackAmount) { - return genClient.setOther(cashbackAmount, CacheKey.cashbackAmount); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'cashbackAmount' field, the 'has' method for this field will now return false */ - public void clearCashbackAmount() { - genClient.clear(CacheKey.cashbackAmount); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public CashbackSelectedMessage copyChanges() { - CashbackSelectedMessage copy = new CashbackSelectedMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(CashbackSelectedMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new CashbackSelectedMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public CashbackSelectedMessage createFromParcel(android.os.Parcel in) { - CashbackSelectedMessage instance = new CashbackSelectedMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public CashbackSelectedMessage[] newArray(int size) { - return new CashbackSelectedMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public CashbackSelectedMessage create(org.json.JSONObject jsonObject) { - return new CashbackSelectedMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean CASHBACKAMOUNT_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CloseoutRequestMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CloseoutRequestMessage.java deleted file mode 100644 index c431d82b2..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CloseoutRequestMessage.java +++ /dev/null @@ -1,330 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getAllowOpenTabs allowOpenTabs}
  • - *
  • {@link #getBatchId batchId}
  • - *
- */ -@SuppressWarnings("all") -public class CloseoutRequestMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * If true then open tabs can still be closed out. - */ - public java.lang.Boolean getAllowOpenTabs() { - return genClient.cacheGet(CacheKey.allowOpenTabs); - } - - /** - * Reserved for future use. Specifies the batch to close. - */ - public java.lang.String getBatchId() { - return genClient.cacheGet(CacheKey.batchId); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - allowOpenTabs { - @Override - public Object extractValue(CloseoutRequestMessage instance) { - return instance.genClient.extractOther("allowOpenTabs", java.lang.Boolean.class); - } - }, - batchId { - @Override - public Object extractValue(CloseoutRequestMessage instance) { - return instance.genClient.extractOther("batchId", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(CloseoutRequestMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(CloseoutRequestMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public CloseoutRequestMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.CLOSEOUT_REQUEST); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected CloseoutRequestMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public CloseoutRequestMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public CloseoutRequestMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public CloseoutRequestMessage(CloseoutRequestMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'allowOpenTabs' field is set and is not null */ - public boolean isNotNullAllowOpenTabs() { - return genClient.cacheValueIsNotNull(CacheKey.allowOpenTabs); - } - - /** Checks whether the 'batchId' field is set and is not null */ - public boolean isNotNullBatchId() { - return genClient.cacheValueIsNotNull(CacheKey.batchId); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'allowOpenTabs' field has been set, however the value could be null */ - public boolean hasAllowOpenTabs() { - return genClient.cacheHasKey(CacheKey.allowOpenTabs); - } - - /** Checks whether the 'batchId' field has been set, however the value could be null */ - public boolean hasBatchId() { - return genClient.cacheHasKey(CacheKey.batchId); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'allowOpenTabs'. - */ - public CloseoutRequestMessage setAllowOpenTabs(java.lang.Boolean allowOpenTabs) { - return genClient.setOther(allowOpenTabs, CacheKey.allowOpenTabs); - } - - /** - * Sets the field 'batchId'. - */ - public CloseoutRequestMessage setBatchId(java.lang.String batchId) { - return genClient.setOther(batchId, CacheKey.batchId); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'allowOpenTabs' field, the 'has' method for this field will now return false */ - public void clearAllowOpenTabs() { - genClient.clear(CacheKey.allowOpenTabs); - } - /** Clears the 'batchId' field, the 'has' method for this field will now return false */ - public void clearBatchId() { - genClient.clear(CacheKey.batchId); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public CloseoutRequestMessage copyChanges() { - CloseoutRequestMessage copy = new CloseoutRequestMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(CloseoutRequestMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new CloseoutRequestMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public CloseoutRequestMessage createFromParcel(android.os.Parcel in) { - CloseoutRequestMessage instance = new CloseoutRequestMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public CloseoutRequestMessage[] newArray(int size) { - return new CloseoutRequestMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public CloseoutRequestMessage create(org.json.JSONObject jsonObject) { - return new CloseoutRequestMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean ALLOWOPENTABS_IS_REQUIRED = false; - public static final boolean BATCHID_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CloseoutResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CloseoutResponseMessage.java deleted file mode 100644 index e3dd3b645..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/CloseoutResponseMessage.java +++ /dev/null @@ -1,368 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getReason reason}
  • - *
  • {@link #getStatus status}
  • - *
  • {@link #getBatch batch}
  • - *
- */ -@SuppressWarnings("all") -public class CloseoutResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * Detail information. - */ - public java.lang.String getReason() { - return genClient.cacheGet(CacheKey.reason); - } - - /** - * The status of the request. - */ - public com.clover.sdk.v3.remotemessage.ResultStatus getStatus() { - return genClient.cacheGet(CacheKey.status); - } - - /** - * The closeout info. - */ - public com.clover.sdk.v3.payments.Batch getBatch() { - return genClient.cacheGet(CacheKey.batch); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - reason { - @Override - public Object extractValue(CloseoutResponseMessage instance) { - return instance.genClient.extractOther("reason", java.lang.String.class); - } - }, - status { - @Override - public Object extractValue(CloseoutResponseMessage instance) { - return instance.genClient.extractEnum("status", com.clover.sdk.v3.remotemessage.ResultStatus.class); - } - }, - batch { - @Override - public Object extractValue(CloseoutResponseMessage instance) { - return instance.genClient.extractRecord("batch", com.clover.sdk.v3.payments.Batch.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(CloseoutResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(CloseoutResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public CloseoutResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.CLOSEOUT_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected CloseoutResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public CloseoutResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public CloseoutResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public CloseoutResponseMessage(CloseoutResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'reason' field is set and is not null */ - public boolean isNotNullReason() { - return genClient.cacheValueIsNotNull(CacheKey.reason); - } - - /** Checks whether the 'status' field is set and is not null */ - public boolean isNotNullStatus() { - return genClient.cacheValueIsNotNull(CacheKey.status); - } - - /** Checks whether the 'batch' field is set and is not null */ - public boolean isNotNullBatch() { - return genClient.cacheValueIsNotNull(CacheKey.batch); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'reason' field has been set, however the value could be null */ - public boolean hasReason() { - return genClient.cacheHasKey(CacheKey.reason); - } - - /** Checks whether the 'status' field has been set, however the value could be null */ - public boolean hasStatus() { - return genClient.cacheHasKey(CacheKey.status); - } - - /** Checks whether the 'batch' field has been set, however the value could be null */ - public boolean hasBatch() { - return genClient.cacheHasKey(CacheKey.batch); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'reason'. - */ - public CloseoutResponseMessage setReason(java.lang.String reason) { - return genClient.setOther(reason, CacheKey.reason); - } - - /** - * Sets the field 'status'. - */ - public CloseoutResponseMessage setStatus(com.clover.sdk.v3.remotemessage.ResultStatus status) { - return genClient.setOther(status, CacheKey.status); - } - - /** - * Sets the field 'batch'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public CloseoutResponseMessage setBatch(com.clover.sdk.v3.payments.Batch batch) { - return genClient.setRecord(batch, CacheKey.batch); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'reason' field, the 'has' method for this field will now return false */ - public void clearReason() { - genClient.clear(CacheKey.reason); - } - /** Clears the 'status' field, the 'has' method for this field will now return false */ - public void clearStatus() { - genClient.clear(CacheKey.status); - } - /** Clears the 'batch' field, the 'has' method for this field will now return false */ - public void clearBatch() { - genClient.clear(CacheKey.batch); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public CloseoutResponseMessage copyChanges() { - CloseoutResponseMessage copy = new CloseoutResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(CloseoutResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new CloseoutResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public CloseoutResponseMessage createFromParcel(android.os.Parcel in) { - CloseoutResponseMessage instance = new CloseoutResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public CloseoutResponseMessage[] newArray(int size) { - return new CloseoutResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public CloseoutResponseMessage create(org.json.JSONObject jsonObject) { - return new CloseoutResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean REASON_IS_REQUIRED = false; - public static final boolean STATUS_IS_REQUIRED = false; - public static final boolean BATCH_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ConfirmPaymentMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ConfirmPaymentMessage.java deleted file mode 100644 index 02a138b76..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ConfirmPaymentMessage.java +++ /dev/null @@ -1,337 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getPayment payment}
  • - *
  • {@link #getChallenges challenges}
  • - *
- */ -@SuppressWarnings("all") -public class ConfirmPaymentMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * A payment - */ - public com.clover.sdk.v3.payments.Payment getPayment() { - return genClient.cacheGet(CacheKey.payment); - } - - /** - * The challenges for the payment. - */ - public java.util.List getChallenges() { - return genClient.cacheGet(CacheKey.challenges); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - payment { - @Override - public Object extractValue(ConfirmPaymentMessage instance) { - return instance.genClient.extractRecord("payment", com.clover.sdk.v3.payments.Payment.JSON_CREATOR); - } - }, - challenges { - @Override - public Object extractValue(ConfirmPaymentMessage instance) { - return instance.genClient.extractListRecord("challenges", com.clover.sdk.v3.base.Challenge.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(ConfirmPaymentMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(ConfirmPaymentMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public ConfirmPaymentMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.CONFIRM_PAYMENT_MESSAGE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected ConfirmPaymentMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public ConfirmPaymentMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public ConfirmPaymentMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public ConfirmPaymentMessage(ConfirmPaymentMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'payment' field is set and is not null */ - public boolean isNotNullPayment() { - return genClient.cacheValueIsNotNull(CacheKey.payment); - } - - /** Checks whether the 'challenges' field is set and is not null */ - public boolean isNotNullChallenges() { - return genClient.cacheValueIsNotNull(CacheKey.challenges); - } - - /** Checks whether the 'challenges' field is set and is not null and is not empty */ - public boolean isNotEmptyChallenges() { return isNotNullChallenges() && !getChallenges().isEmpty(); } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'payment' field has been set, however the value could be null */ - public boolean hasPayment() { - return genClient.cacheHasKey(CacheKey.payment); - } - - /** Checks whether the 'challenges' field has been set, however the value could be null */ - public boolean hasChallenges() { - return genClient.cacheHasKey(CacheKey.challenges); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'payment'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public ConfirmPaymentMessage setPayment(com.clover.sdk.v3.payments.Payment payment) { - return genClient.setRecord(payment, CacheKey.payment); - } - - /** - * Sets the field 'challenges'. - * - * Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will. - */ - public ConfirmPaymentMessage setChallenges(java.util.List challenges) { - return genClient.setArrayRecord(challenges, CacheKey.challenges); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'payment' field, the 'has' method for this field will now return false */ - public void clearPayment() { - genClient.clear(CacheKey.payment); - } - /** Clears the 'challenges' field, the 'has' method for this field will now return false */ - public void clearChallenges() { - genClient.clear(CacheKey.challenges); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public ConfirmPaymentMessage copyChanges() { - ConfirmPaymentMessage copy = new ConfirmPaymentMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(ConfirmPaymentMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new ConfirmPaymentMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public ConfirmPaymentMessage createFromParcel(android.os.Parcel in) { - ConfirmPaymentMessage instance = new ConfirmPaymentMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public ConfirmPaymentMessage[] newArray(int size) { - return new ConfirmPaymentMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public ConfirmPaymentMessage create(org.json.JSONObject jsonObject) { - return new ConfirmPaymentMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean PAYMENT_IS_REQUIRED = false; - public static final boolean CHALLENGES_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/DiscoveryRequestMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/DiscoveryRequestMessage.java deleted file mode 100644 index 11afc9886..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/DiscoveryRequestMessage.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getSupportsOrderModification supportsOrderModification}
  • - *
- */ -@SuppressWarnings("all") -public class DiscoveryRequestMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * If true then order modification operations are supported. - */ - public java.lang.Boolean getSupportsOrderModification() { - return genClient.cacheGet(CacheKey.supportsOrderModification); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - supportsOrderModification { - @Override - public Object extractValue(DiscoveryRequestMessage instance) { - return instance.genClient.extractOther("supportsOrderModification", java.lang.Boolean.class); - } - }, - method { - @Override - public Object extractValue(DiscoveryRequestMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(DiscoveryRequestMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public DiscoveryRequestMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.DISCOVERY_REQUEST); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected DiscoveryRequestMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public DiscoveryRequestMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public DiscoveryRequestMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public DiscoveryRequestMessage(DiscoveryRequestMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'supportsOrderModification' field is set and is not null */ - public boolean isNotNullSupportsOrderModification() { - return genClient.cacheValueIsNotNull(CacheKey.supportsOrderModification); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'supportsOrderModification' field has been set, however the value could be null */ - public boolean hasSupportsOrderModification() { - return genClient.cacheHasKey(CacheKey.supportsOrderModification); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'supportsOrderModification'. - */ - public DiscoveryRequestMessage setSupportsOrderModification(java.lang.Boolean supportsOrderModification) { - return genClient.setOther(supportsOrderModification, CacheKey.supportsOrderModification); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'supportsOrderModification' field, the 'has' method for this field will now return false */ - public void clearSupportsOrderModification() { - genClient.clear(CacheKey.supportsOrderModification); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public DiscoveryRequestMessage copyChanges() { - DiscoveryRequestMessage copy = new DiscoveryRequestMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(DiscoveryRequestMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new DiscoveryRequestMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public DiscoveryRequestMessage createFromParcel(android.os.Parcel in) { - DiscoveryRequestMessage instance = new DiscoveryRequestMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public DiscoveryRequestMessage[] newArray(int size) { - return new DiscoveryRequestMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public DiscoveryRequestMessage create(org.json.JSONObject jsonObject) { - return new DiscoveryRequestMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean SUPPORTSORDERMODIFICATION_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/DiscoveryResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/DiscoveryResponseMessage.java deleted file mode 100644 index ee943a648..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/DiscoveryResponseMessage.java +++ /dev/null @@ -1,621 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getMerchantId merchantId}
  • - *
  • {@link #getMerchantName merchantName}
  • - *
  • {@link #getMerchantMId merchantMId}
  • - *
  • {@link #getName name}
  • - *
  • {@link #getSerial serial}
  • - *
  • {@link #getModel model}
  • - *
  • {@link #getReady ready}
  • - *
  • {@link #getSupportsTipAdjust supportsTipAdjust}
  • - *
  • {@link #getSupportsManualRefund supportsManualRefund}
  • - *
  • {@link #getSupportsMultiPayToken supportsMultiPayToken}
  • - *
  • {@link #getSupportsAcknowledgement supportsAcknowledgement}
  • - *
- */ -@SuppressWarnings("all") -public class DiscoveryResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - public java.lang.String getMerchantId() { - return genClient.cacheGet(CacheKey.merchantId); - } - - public java.lang.String getMerchantName() { - return genClient.cacheGet(CacheKey.merchantName); - } - - public java.lang.String getMerchantMId() { - return genClient.cacheGet(CacheKey.merchantMId); - } - - public java.lang.String getName() { - return genClient.cacheGet(CacheKey.name); - } - - public java.lang.String getSerial() { - return genClient.cacheGet(CacheKey.serial); - } - - public java.lang.String getModel() { - return genClient.cacheGet(CacheKey.model); - } - - public java.lang.Boolean getReady() { - return genClient.cacheGet(CacheKey.ready); - } - - public java.lang.Boolean getSupportsTipAdjust() { - return genClient.cacheGet(CacheKey.supportsTipAdjust); - } - - public java.lang.Boolean getSupportsManualRefund() { - return genClient.cacheGet(CacheKey.supportsManualRefund); - } - - public java.lang.Boolean getSupportsMultiPayToken() { - return genClient.cacheGet(CacheKey.supportsMultiPayToken); - } - - public java.lang.Boolean getSupportsAcknowledgement() { - return genClient.cacheGet(CacheKey.supportsAcknowledgement); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - merchantId { - @Override - public Object extractValue(DiscoveryResponseMessage instance) { - return instance.genClient.extractOther("merchantId", java.lang.String.class); - } - }, - merchantName { - @Override - public Object extractValue(DiscoveryResponseMessage instance) { - return instance.genClient.extractOther("merchantName", java.lang.String.class); - } - }, - merchantMId { - @Override - public Object extractValue(DiscoveryResponseMessage instance) { - return instance.genClient.extractOther("merchantMId", java.lang.String.class); - } - }, - name { - @Override - public Object extractValue(DiscoveryResponseMessage instance) { - return instance.genClient.extractOther("name", java.lang.String.class); - } - }, - serial { - @Override - public Object extractValue(DiscoveryResponseMessage instance) { - return instance.genClient.extractOther("serial", java.lang.String.class); - } - }, - model { - @Override - public Object extractValue(DiscoveryResponseMessage instance) { - return instance.genClient.extractOther("model", java.lang.String.class); - } - }, - ready { - @Override - public Object extractValue(DiscoveryResponseMessage instance) { - return instance.genClient.extractOther("ready", java.lang.Boolean.class); - } - }, - supportsTipAdjust { - @Override - public Object extractValue(DiscoveryResponseMessage instance) { - return instance.genClient.extractOther("supportsTipAdjust", java.lang.Boolean.class); - } - }, - supportsManualRefund { - @Override - public Object extractValue(DiscoveryResponseMessage instance) { - return instance.genClient.extractOther("supportsManualRefund", java.lang.Boolean.class); - } - }, - supportsMultiPayToken { - @Override - public Object extractValue(DiscoveryResponseMessage instance) { - return instance.genClient.extractOther("supportsMultiPayToken", java.lang.Boolean.class); - } - }, - supportsAcknowledgement { - @Override - public Object extractValue(DiscoveryResponseMessage instance) { - return instance.genClient.extractOther("supportsAcknowledgement", java.lang.Boolean.class); - } - }, - method { - @Override - public Object extractValue(DiscoveryResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(DiscoveryResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public DiscoveryResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.DISCOVERY_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected DiscoveryResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public DiscoveryResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public DiscoveryResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public DiscoveryResponseMessage(DiscoveryResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'merchantId' field is set and is not null */ - public boolean isNotNullMerchantId() { - return genClient.cacheValueIsNotNull(CacheKey.merchantId); - } - - /** Checks whether the 'merchantName' field is set and is not null */ - public boolean isNotNullMerchantName() { - return genClient.cacheValueIsNotNull(CacheKey.merchantName); - } - - /** Checks whether the 'merchantMId' field is set and is not null */ - public boolean isNotNullMerchantMId() { - return genClient.cacheValueIsNotNull(CacheKey.merchantMId); - } - - /** Checks whether the 'name' field is set and is not null */ - public boolean isNotNullName() { - return genClient.cacheValueIsNotNull(CacheKey.name); - } - - /** Checks whether the 'serial' field is set and is not null */ - public boolean isNotNullSerial() { - return genClient.cacheValueIsNotNull(CacheKey.serial); - } - - /** Checks whether the 'model' field is set and is not null */ - public boolean isNotNullModel() { - return genClient.cacheValueIsNotNull(CacheKey.model); - } - - /** Checks whether the 'ready' field is set and is not null */ - public boolean isNotNullReady() { - return genClient.cacheValueIsNotNull(CacheKey.ready); - } - - /** Checks whether the 'supportsTipAdjust' field is set and is not null */ - public boolean isNotNullSupportsTipAdjust() { - return genClient.cacheValueIsNotNull(CacheKey.supportsTipAdjust); - } - - /** Checks whether the 'supportsManualRefund' field is set and is not null */ - public boolean isNotNullSupportsManualRefund() { - return genClient.cacheValueIsNotNull(CacheKey.supportsManualRefund); - } - - /** Checks whether the 'supportsMultiPayToken' field is set and is not null */ - public boolean isNotNullSupportsMultiPayToken() { - return genClient.cacheValueIsNotNull(CacheKey.supportsMultiPayToken); - } - - /** Checks whether the 'supportsAcknowledgement' field is set and is not null */ - public boolean isNotNullSupportsAcknowledgement() { - return genClient.cacheValueIsNotNull(CacheKey.supportsAcknowledgement); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'merchantId' field has been set, however the value could be null */ - public boolean hasMerchantId() { - return genClient.cacheHasKey(CacheKey.merchantId); - } - - /** Checks whether the 'merchantName' field has been set, however the value could be null */ - public boolean hasMerchantName() { - return genClient.cacheHasKey(CacheKey.merchantName); - } - - /** Checks whether the 'merchantMId' field has been set, however the value could be null */ - public boolean hasMerchantMId() { - return genClient.cacheHasKey(CacheKey.merchantMId); - } - - /** Checks whether the 'name' field has been set, however the value could be null */ - public boolean hasName() { - return genClient.cacheHasKey(CacheKey.name); - } - - /** Checks whether the 'serial' field has been set, however the value could be null */ - public boolean hasSerial() { - return genClient.cacheHasKey(CacheKey.serial); - } - - /** Checks whether the 'model' field has been set, however the value could be null */ - public boolean hasModel() { - return genClient.cacheHasKey(CacheKey.model); - } - - /** Checks whether the 'ready' field has been set, however the value could be null */ - public boolean hasReady() { - return genClient.cacheHasKey(CacheKey.ready); - } - - /** Checks whether the 'supportsTipAdjust' field has been set, however the value could be null */ - public boolean hasSupportsTipAdjust() { - return genClient.cacheHasKey(CacheKey.supportsTipAdjust); - } - - /** Checks whether the 'supportsManualRefund' field has been set, however the value could be null */ - public boolean hasSupportsManualRefund() { - return genClient.cacheHasKey(CacheKey.supportsManualRefund); - } - - /** Checks whether the 'supportsMultiPayToken' field has been set, however the value could be null */ - public boolean hasSupportsMultiPayToken() { - return genClient.cacheHasKey(CacheKey.supportsMultiPayToken); - } - - /** Checks whether the 'supportsAcknowledgement' field has been set, however the value could be null */ - public boolean hasSupportsAcknowledgement() { - return genClient.cacheHasKey(CacheKey.supportsAcknowledgement); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'merchantId'. - */ - public DiscoveryResponseMessage setMerchantId(java.lang.String merchantId) { - return genClient.setOther(merchantId, CacheKey.merchantId); - } - - /** - * Sets the field 'merchantName'. - */ - public DiscoveryResponseMessage setMerchantName(java.lang.String merchantName) { - return genClient.setOther(merchantName, CacheKey.merchantName); - } - - /** - * Sets the field 'merchantMId'. - */ - public DiscoveryResponseMessage setMerchantMId(java.lang.String merchantMId) { - return genClient.setOther(merchantMId, CacheKey.merchantMId); - } - - /** - * Sets the field 'name'. - */ - public DiscoveryResponseMessage setName(java.lang.String name) { - return genClient.setOther(name, CacheKey.name); - } - - /** - * Sets the field 'serial'. - */ - public DiscoveryResponseMessage setSerial(java.lang.String serial) { - return genClient.setOther(serial, CacheKey.serial); - } - - /** - * Sets the field 'model'. - */ - public DiscoveryResponseMessage setModel(java.lang.String model) { - return genClient.setOther(model, CacheKey.model); - } - - /** - * Sets the field 'ready'. - */ - public DiscoveryResponseMessage setReady(java.lang.Boolean ready) { - return genClient.setOther(ready, CacheKey.ready); - } - - /** - * Sets the field 'supportsTipAdjust'. - */ - public DiscoveryResponseMessage setSupportsTipAdjust(java.lang.Boolean supportsTipAdjust) { - return genClient.setOther(supportsTipAdjust, CacheKey.supportsTipAdjust); - } - - /** - * Sets the field 'supportsManualRefund'. - */ - public DiscoveryResponseMessage setSupportsManualRefund(java.lang.Boolean supportsManualRefund) { - return genClient.setOther(supportsManualRefund, CacheKey.supportsManualRefund); - } - - /** - * Sets the field 'supportsMultiPayToken'. - */ - public DiscoveryResponseMessage setSupportsMultiPayToken(java.lang.Boolean supportsMultiPayToken) { - return genClient.setOther(supportsMultiPayToken, CacheKey.supportsMultiPayToken); - } - - /** - * Sets the field 'supportsAcknowledgement'. - */ - public DiscoveryResponseMessage setSupportsAcknowledgement(java.lang.Boolean supportsAcknowledgement) { - return genClient.setOther(supportsAcknowledgement, CacheKey.supportsAcknowledgement); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'merchantId' field, the 'has' method for this field will now return false */ - public void clearMerchantId() { - genClient.clear(CacheKey.merchantId); - } - /** Clears the 'merchantName' field, the 'has' method for this field will now return false */ - public void clearMerchantName() { - genClient.clear(CacheKey.merchantName); - } - /** Clears the 'merchantMId' field, the 'has' method for this field will now return false */ - public void clearMerchantMId() { - genClient.clear(CacheKey.merchantMId); - } - /** Clears the 'name' field, the 'has' method for this field will now return false */ - public void clearName() { - genClient.clear(CacheKey.name); - } - /** Clears the 'serial' field, the 'has' method for this field will now return false */ - public void clearSerial() { - genClient.clear(CacheKey.serial); - } - /** Clears the 'model' field, the 'has' method for this field will now return false */ - public void clearModel() { - genClient.clear(CacheKey.model); - } - /** Clears the 'ready' field, the 'has' method for this field will now return false */ - public void clearReady() { - genClient.clear(CacheKey.ready); - } - /** Clears the 'supportsTipAdjust' field, the 'has' method for this field will now return false */ - public void clearSupportsTipAdjust() { - genClient.clear(CacheKey.supportsTipAdjust); - } - /** Clears the 'supportsManualRefund' field, the 'has' method for this field will now return false */ - public void clearSupportsManualRefund() { - genClient.clear(CacheKey.supportsManualRefund); - } - /** Clears the 'supportsMultiPayToken' field, the 'has' method for this field will now return false */ - public void clearSupportsMultiPayToken() { - genClient.clear(CacheKey.supportsMultiPayToken); - } - /** Clears the 'supportsAcknowledgement' field, the 'has' method for this field will now return false */ - public void clearSupportsAcknowledgement() { - genClient.clear(CacheKey.supportsAcknowledgement); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public DiscoveryResponseMessage copyChanges() { - DiscoveryResponseMessage copy = new DiscoveryResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(DiscoveryResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new DiscoveryResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public DiscoveryResponseMessage createFromParcel(android.os.Parcel in) { - DiscoveryResponseMessage instance = new DiscoveryResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public DiscoveryResponseMessage[] newArray(int size) { - return new DiscoveryResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public DiscoveryResponseMessage create(org.json.JSONObject jsonObject) { - return new DiscoveryResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean MERCHANTID_IS_REQUIRED = false; - public static final boolean MERCHANTNAME_IS_REQUIRED = false; - public static final boolean MERCHANTMID_IS_REQUIRED = false; - public static final boolean NAME_IS_REQUIRED = false; - public static final boolean SERIAL_IS_REQUIRED = false; - public static final boolean MODEL_IS_REQUIRED = false; - public static final boolean READY_IS_REQUIRED = false; - public static final boolean SUPPORTSTIPADJUST_IS_REQUIRED = false; - public static final boolean SUPPORTSMANUALREFUND_IS_REQUIRED = false; - public static final boolean SUPPORTSMULTIPAYTOKEN_IS_REQUIRED = false; - public static final boolean SUPPORTSACKNOWLEDGEMENT_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ErrorCode.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ErrorCode.java deleted file mode 100644 index 8c21d82e7..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ErrorCode.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import android.os.Parcelable; -import android.os.Parcel; - -/** - * This is an auto-generated Clover data enum. - */ -@SuppressWarnings("all") -public enum ErrorCode implements Parcelable { - ORDER_NOT_FOUND, PAYMENT_NOT_FOUND, FAIL; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(final Parcel dest, final int flags) { - dest.writeString(name()); - } - - public static final Creator CREATOR = new Creator() { - @Override - public ErrorCode createFromParcel(final Parcel source) { - return ErrorCode.valueOf(source.readString()); - } - - @Override - public ErrorCode[] newArray(final int size) { - return new ErrorCode[size]; - } - }; -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ErrorCodeEnum.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ErrorCodeEnum.java deleted file mode 100644 index 9f421d5f7..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ErrorCodeEnum.java +++ /dev/null @@ -1,209 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; -import com.clover.sdk.GenericParcelable; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getErrorCode errorCode}
  • - *
- */ -@SuppressWarnings("all") -public class ErrorCodeEnum extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable { - - public com.clover.sdk.v3.remotemessage.ErrorCode getErrorCode() { - return genClient.cacheGet(CacheKey.errorCode); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - errorCode { - @Override - public Object extractValue(ErrorCodeEnum instance) { - return instance.genClient.extractEnum("errorCode", com.clover.sdk.v3.remotemessage.ErrorCode.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public ErrorCodeEnum() { - genClient = new GenericClient(this); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected ErrorCodeEnum(boolean noInit) { - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public ErrorCodeEnum(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public ErrorCodeEnum(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public ErrorCodeEnum(ErrorCodeEnum src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'errorCode' field is set and is not null */ - public boolean isNotNullErrorCode() { - return genClient.cacheValueIsNotNull(CacheKey.errorCode); - } - - - - /** Checks whether the 'errorCode' field has been set, however the value could be null */ - public boolean hasErrorCode() { - return genClient.cacheHasKey(CacheKey.errorCode); - } - - - /** - * Sets the field 'errorCode'. - */ - public ErrorCodeEnum setErrorCode(com.clover.sdk.v3.remotemessage.ErrorCode errorCode) { - return genClient.setOther(errorCode, CacheKey.errorCode); - } - - - /** Clears the 'errorCode' field, the 'has' method for this field will now return false */ - public void clearErrorCode() { - genClient.clear(CacheKey.errorCode); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public ErrorCodeEnum copyChanges() { - ErrorCodeEnum copy = new ErrorCodeEnum(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(ErrorCodeEnum src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new ErrorCodeEnum(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public ErrorCodeEnum createFromParcel(android.os.Parcel in) { - ErrorCodeEnum instance = new ErrorCodeEnum(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public ErrorCodeEnum[] newArray(int size) { - return new ErrorCodeEnum[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public ErrorCodeEnum create(org.json.JSONObject jsonObject) { - return new ErrorCodeEnum(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean ERRORCODE_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ExternalDeviceState.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ExternalDeviceState.java deleted file mode 100644 index e60571b23..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ExternalDeviceState.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import android.os.Parcelable; -import android.os.Parcel; - -/** - * This is an auto-generated Clover data enum. - */ -@SuppressWarnings("all") -public enum ExternalDeviceState implements Parcelable { - IDLE, BUSY, WAITING_FOR_POS, WAITING_FOR_CUSTOMER, UNKNOWN; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(final Parcel dest, final int flags) { - dest.writeString(name()); - } - - public static final Creator CREATOR = new Creator() { - @Override - public ExternalDeviceState createFromParcel(final Parcel source) { - return ExternalDeviceState.valueOf(source.readString()); - } - - @Override - public ExternalDeviceState[] newArray(final int size) { - return new ExternalDeviceState[size]; - } - }; -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ExternalDeviceStateData.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ExternalDeviceStateData.java deleted file mode 100644 index 28f7eb6b7..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ExternalDeviceStateData.java +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; -import com.clover.sdk.GenericParcelable; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getExternalPaymentId externalPaymentId}
  • - *
  • {@link #getCustomActivityId customActivityId}
  • - *
- */ -@SuppressWarnings("all") -public class ExternalDeviceStateData extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable { - - /** - * External Payment Id, if applicable - */ - public java.lang.String getExternalPaymentId() { - return genClient.cacheGet(CacheKey.externalPaymentId); - } - - /** - * Custom Activity Id, if applicable - */ - public java.lang.String getCustomActivityId() { - return genClient.cacheGet(CacheKey.customActivityId); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - externalPaymentId { - @Override - public Object extractValue(ExternalDeviceStateData instance) { - return instance.genClient.extractOther("externalPaymentId", java.lang.String.class); - } - }, - customActivityId { - @Override - public Object extractValue(ExternalDeviceStateData instance) { - return instance.genClient.extractOther("customActivityId", java.lang.String.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public ExternalDeviceStateData() { - genClient = new GenericClient(this); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected ExternalDeviceStateData(boolean noInit) { - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public ExternalDeviceStateData(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public ExternalDeviceStateData(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public ExternalDeviceStateData(ExternalDeviceStateData src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'externalPaymentId' field is set and is not null */ - public boolean isNotNullExternalPaymentId() { - return genClient.cacheValueIsNotNull(CacheKey.externalPaymentId); - } - - /** Checks whether the 'customActivityId' field is set and is not null */ - public boolean isNotNullCustomActivityId() { - return genClient.cacheValueIsNotNull(CacheKey.customActivityId); - } - - - - /** Checks whether the 'externalPaymentId' field has been set, however the value could be null */ - public boolean hasExternalPaymentId() { - return genClient.cacheHasKey(CacheKey.externalPaymentId); - } - - /** Checks whether the 'customActivityId' field has been set, however the value could be null */ - public boolean hasCustomActivityId() { - return genClient.cacheHasKey(CacheKey.customActivityId); - } - - - /** - * Sets the field 'externalPaymentId'. - */ - public ExternalDeviceStateData setExternalPaymentId(java.lang.String externalPaymentId) { - return genClient.setOther(externalPaymentId, CacheKey.externalPaymentId); - } - - /** - * Sets the field 'customActivityId'. - */ - public ExternalDeviceStateData setCustomActivityId(java.lang.String customActivityId) { - return genClient.setOther(customActivityId, CacheKey.customActivityId); - } - - - /** Clears the 'externalPaymentId' field, the 'has' method for this field will now return false */ - public void clearExternalPaymentId() { - genClient.clear(CacheKey.externalPaymentId); - } - /** Clears the 'customActivityId' field, the 'has' method for this field will now return false */ - public void clearCustomActivityId() { - genClient.clear(CacheKey.customActivityId); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public ExternalDeviceStateData copyChanges() { - ExternalDeviceStateData copy = new ExternalDeviceStateData(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(ExternalDeviceStateData src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new ExternalDeviceStateData(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public ExternalDeviceStateData createFromParcel(android.os.Parcel in) { - ExternalDeviceStateData instance = new ExternalDeviceStateData(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public ExternalDeviceStateData[] newArray(int size) { - return new ExternalDeviceStateData[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public ExternalDeviceStateData create(org.json.JSONObject jsonObject) { - return new ExternalDeviceStateData(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean EXTERNALPAYMENTID_IS_REQUIRED = false; - public static final boolean CUSTOMACTIVITYID_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ExternalDeviceSubState.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ExternalDeviceSubState.java deleted file mode 100644 index f32ad3f1d..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ExternalDeviceSubState.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import android.os.Parcelable; -import android.os.Parcel; - -/** - * This is an auto-generated Clover data enum. - */ -@SuppressWarnings("all") -public enum ExternalDeviceSubState implements Parcelable { - CUSTOM_ACTIVITY, STARTING_PAYMENT_FLOW, PROCESSING_PAYMENT, PROCESSING_CARD_DATA, PROCESSING_CREDIT, VERIFY_SIGNATURE, TIP_SCREEN, RECEIPT_SCREEN, CONFIRM_PAYMENT, UNKNOWN; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(final Parcel dest, final int flags) { - dest.writeString(name()); - } - - public static final Creator CREATOR = new Creator() { - @Override - public ExternalDeviceSubState createFromParcel(final Parcel source) { - return ExternalDeviceSubState.valueOf(source.readString()); - } - - @Override - public ExternalDeviceSubState[] newArray(final int size) { - return new ExternalDeviceSubState[size]; - } - }; -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/FinishCancelMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/FinishCancelMessage.java deleted file mode 100644 index 10836a328..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/FinishCancelMessage.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getRequestInfo requestInfo}
  • - *
- */ -@SuppressWarnings("all") -public class FinishCancelMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * Extra information to include with the request, like type of request - */ - public java.lang.String getRequestInfo() { - return genClient.cacheGet(CacheKey.requestInfo); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - requestInfo { - @Override - public Object extractValue(FinishCancelMessage instance) { - return instance.genClient.extractOther("requestInfo", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(FinishCancelMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(FinishCancelMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public FinishCancelMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.FINISH_CANCEL); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected FinishCancelMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public FinishCancelMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public FinishCancelMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public FinishCancelMessage(FinishCancelMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'requestInfo' field is set and is not null */ - public boolean isNotNullRequestInfo() { - return genClient.cacheValueIsNotNull(CacheKey.requestInfo); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'requestInfo' field has been set, however the value could be null */ - public boolean hasRequestInfo() { - return genClient.cacheHasKey(CacheKey.requestInfo); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'requestInfo'. - */ - public FinishCancelMessage setRequestInfo(java.lang.String requestInfo) { - return genClient.setOther(requestInfo, CacheKey.requestInfo); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'requestInfo' field, the 'has' method for this field will now return false */ - public void clearRequestInfo() { - genClient.clear(CacheKey.requestInfo); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public FinishCancelMessage copyChanges() { - FinishCancelMessage copy = new FinishCancelMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(FinishCancelMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new FinishCancelMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public FinishCancelMessage createFromParcel(android.os.Parcel in) { - FinishCancelMessage instance = new FinishCancelMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public FinishCancelMessage[] newArray(int size) { - return new FinishCancelMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public FinishCancelMessage create(org.json.JSONObject jsonObject) { - return new FinishCancelMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean REQUESTINFO_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/FinishOkMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/FinishOkMessage.java deleted file mode 100644 index ef907bfdd..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/FinishOkMessage.java +++ /dev/null @@ -1,446 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getCredit credit}
  • - *
  • {@link #getPayment payment}
  • - *
  • {@link #getRefund refund}
  • - *
  • {@link #getSignature signature}
  • - *
  • {@link #getRequestInfo requestInfo}
  • - *
- */ -@SuppressWarnings("all") -public class FinishOkMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * A credit - */ - public com.clover.sdk.v3.payments.Credit getCredit() { - return genClient.cacheGet(CacheKey.credit); - } - - /** - * A payment - */ - public com.clover.sdk.v3.payments.Payment getPayment() { - return genClient.cacheGet(CacheKey.payment); - } - - /** - * The refund - */ - public com.clover.sdk.v3.payments.Refund getRefund() { - return genClient.cacheGet(CacheKey.refund); - } - - /** - * A signature - */ - public com.clover.sdk.v3.base.Signature getSignature() { - return genClient.cacheGet(CacheKey.signature); - } - - /** - * Extra information to include with the request, like type of request - */ - public java.lang.String getRequestInfo() { - return genClient.cacheGet(CacheKey.requestInfo); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - credit { - @Override - public Object extractValue(FinishOkMessage instance) { - return instance.genClient.extractRecord("credit", com.clover.sdk.v3.payments.Credit.JSON_CREATOR); - } - }, - payment { - @Override - public Object extractValue(FinishOkMessage instance) { - return instance.genClient.extractRecord("payment", com.clover.sdk.v3.payments.Payment.JSON_CREATOR); - } - }, - refund { - @Override - public Object extractValue(FinishOkMessage instance) { - return instance.genClient.extractRecord("refund", com.clover.sdk.v3.payments.Refund.JSON_CREATOR); - } - }, - signature { - @Override - public Object extractValue(FinishOkMessage instance) { - return instance.genClient.extractRecord("signature", com.clover.sdk.v3.base.Signature.JSON_CREATOR); - } - }, - requestInfo { - @Override - public Object extractValue(FinishOkMessage instance) { - return instance.genClient.extractOther("requestInfo", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(FinishOkMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(FinishOkMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public FinishOkMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.FINISH_OK); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected FinishOkMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public FinishOkMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public FinishOkMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public FinishOkMessage(FinishOkMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'credit' field is set and is not null */ - public boolean isNotNullCredit() { - return genClient.cacheValueIsNotNull(CacheKey.credit); - } - - /** Checks whether the 'payment' field is set and is not null */ - public boolean isNotNullPayment() { - return genClient.cacheValueIsNotNull(CacheKey.payment); - } - - /** Checks whether the 'refund' field is set and is not null */ - public boolean isNotNullRefund() { - return genClient.cacheValueIsNotNull(CacheKey.refund); - } - - /** Checks whether the 'signature' field is set and is not null */ - public boolean isNotNullSignature() { - return genClient.cacheValueIsNotNull(CacheKey.signature); - } - - /** Checks whether the 'requestInfo' field is set and is not null */ - public boolean isNotNullRequestInfo() { - return genClient.cacheValueIsNotNull(CacheKey.requestInfo); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'credit' field has been set, however the value could be null */ - public boolean hasCredit() { - return genClient.cacheHasKey(CacheKey.credit); - } - - /** Checks whether the 'payment' field has been set, however the value could be null */ - public boolean hasPayment() { - return genClient.cacheHasKey(CacheKey.payment); - } - - /** Checks whether the 'refund' field has been set, however the value could be null */ - public boolean hasRefund() { - return genClient.cacheHasKey(CacheKey.refund); - } - - /** Checks whether the 'signature' field has been set, however the value could be null */ - public boolean hasSignature() { - return genClient.cacheHasKey(CacheKey.signature); - } - - /** Checks whether the 'requestInfo' field has been set, however the value could be null */ - public boolean hasRequestInfo() { - return genClient.cacheHasKey(CacheKey.requestInfo); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'credit'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public FinishOkMessage setCredit(com.clover.sdk.v3.payments.Credit credit) { - return genClient.setRecord(credit, CacheKey.credit); - } - - /** - * Sets the field 'payment'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public FinishOkMessage setPayment(com.clover.sdk.v3.payments.Payment payment) { - return genClient.setRecord(payment, CacheKey.payment); - } - - /** - * Sets the field 'refund'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public FinishOkMessage setRefund(com.clover.sdk.v3.payments.Refund refund) { - return genClient.setRecord(refund, CacheKey.refund); - } - - /** - * Sets the field 'signature'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public FinishOkMessage setSignature(com.clover.sdk.v3.base.Signature signature) { - return genClient.setRecord(signature, CacheKey.signature); - } - - /** - * Sets the field 'requestInfo'. - */ - public FinishOkMessage setRequestInfo(java.lang.String requestInfo) { - return genClient.setOther(requestInfo, CacheKey.requestInfo); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'credit' field, the 'has' method for this field will now return false */ - public void clearCredit() { - genClient.clear(CacheKey.credit); - } - /** Clears the 'payment' field, the 'has' method for this field will now return false */ - public void clearPayment() { - genClient.clear(CacheKey.payment); - } - /** Clears the 'refund' field, the 'has' method for this field will now return false */ - public void clearRefund() { - genClient.clear(CacheKey.refund); - } - /** Clears the 'signature' field, the 'has' method for this field will now return false */ - public void clearSignature() { - genClient.clear(CacheKey.signature); - } - /** Clears the 'requestInfo' field, the 'has' method for this field will now return false */ - public void clearRequestInfo() { - genClient.clear(CacheKey.requestInfo); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public FinishOkMessage copyChanges() { - FinishOkMessage copy = new FinishOkMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(FinishOkMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new FinishOkMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public FinishOkMessage createFromParcel(android.os.Parcel in) { - FinishOkMessage instance = new FinishOkMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public FinishOkMessage[] newArray(int size) { - return new FinishOkMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public FinishOkMessage create(org.json.JSONObject jsonObject) { - return new FinishOkMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean CREDIT_IS_REQUIRED = false; - public static final boolean PAYMENT_IS_REQUIRED = false; - public static final boolean REFUND_IS_REQUIRED = false; - public static final boolean SIGNATURE_IS_REQUIRED = false; - public static final boolean REQUESTINFO_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ForceConnectMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ForceConnectMessage.java deleted file mode 100644 index bb3edd2ce..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ForceConnectMessage.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getFriendlyId friendlyId}
  • - *
- */ -@SuppressWarnings("all") -public class ForceConnectMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The friendly id of the system that overtook the connection. - */ - public java.lang.String getFriendlyId() { - return genClient.cacheGet(CacheKey.friendlyId); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - friendlyId { - @Override - public Object extractValue(ForceConnectMessage instance) { - return instance.genClient.extractOther("friendlyId", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(ForceConnectMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(ForceConnectMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public ForceConnectMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.FORCECONNECT); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected ForceConnectMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public ForceConnectMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public ForceConnectMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public ForceConnectMessage(ForceConnectMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'friendlyId' field is set and is not null */ - public boolean isNotNullFriendlyId() { - return genClient.cacheValueIsNotNull(CacheKey.friendlyId); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'friendlyId' field has been set, however the value could be null */ - public boolean hasFriendlyId() { - return genClient.cacheHasKey(CacheKey.friendlyId); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'friendlyId'. - */ - public ForceConnectMessage setFriendlyId(java.lang.String friendlyId) { - return genClient.setOther(friendlyId, CacheKey.friendlyId); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'friendlyId' field, the 'has' method for this field will now return false */ - public void clearFriendlyId() { - genClient.clear(CacheKey.friendlyId); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public ForceConnectMessage copyChanges() { - ForceConnectMessage copy = new ForceConnectMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(ForceConnectMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new ForceConnectMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public ForceConnectMessage createFromParcel(android.os.Parcel in) { - ForceConnectMessage instance = new ForceConnectMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public ForceConnectMessage[] newArray(int size) { - return new ForceConnectMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public ForceConnectMessage create(org.json.JSONObject jsonObject) { - return new ForceConnectMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean FRIENDLYID_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/GetPrintersRequestMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/GetPrintersRequestMessage.java deleted file mode 100644 index 3775a5ee6..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/GetPrintersRequestMessage.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getCategory category}
  • - *
- */ -@SuppressWarnings("all") -public class GetPrintersRequestMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * Category of printers to retrieve - */ - public com.clover.sdk.v3.printer.PrintCategory getCategory() { - return genClient.cacheGet(CacheKey.category); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - category { - @Override - public Object extractValue(GetPrintersRequestMessage instance) { - return instance.genClient.extractEnum("category", com.clover.sdk.v3.printer.PrintCategory.class); - } - }, - method { - @Override - public Object extractValue(GetPrintersRequestMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(GetPrintersRequestMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public GetPrintersRequestMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.GET_PRINTERS_REQUEST); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected GetPrintersRequestMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public GetPrintersRequestMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public GetPrintersRequestMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public GetPrintersRequestMessage(GetPrintersRequestMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'category' field is set and is not null */ - public boolean isNotNullCategory() { - return genClient.cacheValueIsNotNull(CacheKey.category); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'category' field has been set, however the value could be null */ - public boolean hasCategory() { - return genClient.cacheHasKey(CacheKey.category); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'category'. - */ - public GetPrintersRequestMessage setCategory(com.clover.sdk.v3.printer.PrintCategory category) { - return genClient.setOther(category, CacheKey.category); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'category' field, the 'has' method for this field will now return false */ - public void clearCategory() { - genClient.clear(CacheKey.category); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public GetPrintersRequestMessage copyChanges() { - GetPrintersRequestMessage copy = new GetPrintersRequestMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(GetPrintersRequestMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new GetPrintersRequestMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public GetPrintersRequestMessage createFromParcel(android.os.Parcel in) { - GetPrintersRequestMessage instance = new GetPrintersRequestMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public GetPrintersRequestMessage[] newArray(int size) { - return new GetPrintersRequestMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public GetPrintersRequestMessage create(org.json.JSONObject jsonObject) { - return new GetPrintersRequestMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean CATEGORY_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/GetPrintersResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/GetPrintersResponseMessage.java deleted file mode 100644 index 7427bf673..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/GetPrintersResponseMessage.java +++ /dev/null @@ -1,299 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getPrinters printers}
  • - *
- */ -@SuppressWarnings("all") -public class GetPrintersResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * List of printers of the requested type. - */ - public java.util.List getPrinters() { - return genClient.cacheGet(CacheKey.printers); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - printers { - @Override - public Object extractValue(GetPrintersResponseMessage instance) { - return instance.genClient.extractListRecord("printers", com.clover.sdk.v3.printer.Printer.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(GetPrintersResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(GetPrintersResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public GetPrintersResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.GET_PRINTERS_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected GetPrintersResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public GetPrintersResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public GetPrintersResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public GetPrintersResponseMessage(GetPrintersResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'printers' field is set and is not null */ - public boolean isNotNullPrinters() { - return genClient.cacheValueIsNotNull(CacheKey.printers); - } - - /** Checks whether the 'printers' field is set and is not null and is not empty */ - public boolean isNotEmptyPrinters() { return isNotNullPrinters() && !getPrinters().isEmpty(); } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'printers' field has been set, however the value could be null */ - public boolean hasPrinters() { - return genClient.cacheHasKey(CacheKey.printers); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'printers'. - * - * Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will. - */ - public GetPrintersResponseMessage setPrinters(java.util.List printers) { - return genClient.setArrayRecord(printers, CacheKey.printers); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'printers' field, the 'has' method for this field will now return false */ - public void clearPrinters() { - genClient.clear(CacheKey.printers); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public GetPrintersResponseMessage copyChanges() { - GetPrintersResponseMessage copy = new GetPrintersResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(GetPrintersResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new GetPrintersResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public GetPrintersResponseMessage createFromParcel(android.os.Parcel in) { - GetPrintersResponseMessage instance = new GetPrintersResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public GetPrintersResponseMessage[] newArray(int size) { - return new GetPrintersResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public GetPrintersResponseMessage create(org.json.JSONObject jsonObject) { - return new GetPrintersResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean PRINTERS_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ImagePrintMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ImagePrintMessage.java deleted file mode 100644 index 3c413737f..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ImagePrintMessage.java +++ /dev/null @@ -1,404 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getPng png}
  • - *
  • {@link #getUrlString urlString}
  • - *
  • {@link #getExternalPrintJobId externalPrintJobId}
  • - *
  • {@link #getPrinter printer}
  • - *
- */ -@SuppressWarnings("all") -public class ImagePrintMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * An image serialized to a base64 encoded byte array - */ - public java.nio.ByteBuffer getPng() { - return genClient.cacheGet(CacheKey.png); - } - - /** - * The url of an image. The url must be accessible from the Clover device. - */ - public java.lang.String getUrlString() { - return genClient.cacheGet(CacheKey.urlString); - } - - /** - * External print job ID assigned to this request - */ - public java.lang.String getExternalPrintJobId() { - return genClient.cacheGet(CacheKey.externalPrintJobId); - } - - /** - * Printer to which the print job should be routed. - */ - public com.clover.sdk.v3.printer.Printer getPrinter() { - return genClient.cacheGet(CacheKey.printer); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - png { - @Override - public Object extractValue(ImagePrintMessage instance) { - return instance.genClient.extractOther("png", java.nio.ByteBuffer.class); - } - }, - urlString { - @Override - public Object extractValue(ImagePrintMessage instance) { - return instance.genClient.extractOther("urlString", java.lang.String.class); - } - }, - externalPrintJobId { - @Override - public Object extractValue(ImagePrintMessage instance) { - return instance.genClient.extractOther("externalPrintJobId", java.lang.String.class); - } - }, - printer { - @Override - public Object extractValue(ImagePrintMessage instance) { - return instance.genClient.extractRecord("printer", com.clover.sdk.v3.printer.Printer.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(ImagePrintMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(ImagePrintMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public ImagePrintMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.PRINT_IMAGE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected ImagePrintMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public ImagePrintMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public ImagePrintMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public ImagePrintMessage(ImagePrintMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'png' field is set and is not null */ - public boolean isNotNullPng() { - return genClient.cacheValueIsNotNull(CacheKey.png); - } - - /** Checks whether the 'urlString' field is set and is not null */ - public boolean isNotNullUrlString() { - return genClient.cacheValueIsNotNull(CacheKey.urlString); - } - - /** Checks whether the 'externalPrintJobId' field is set and is not null */ - public boolean isNotNullExternalPrintJobId() { - return genClient.cacheValueIsNotNull(CacheKey.externalPrintJobId); - } - - /** Checks whether the 'printer' field is set and is not null */ - public boolean isNotNullPrinter() { - return genClient.cacheValueIsNotNull(CacheKey.printer); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'png' field has been set, however the value could be null */ - public boolean hasPng() { - return genClient.cacheHasKey(CacheKey.png); - } - - /** Checks whether the 'urlString' field has been set, however the value could be null */ - public boolean hasUrlString() { - return genClient.cacheHasKey(CacheKey.urlString); - } - - /** Checks whether the 'externalPrintJobId' field has been set, however the value could be null */ - public boolean hasExternalPrintJobId() { - return genClient.cacheHasKey(CacheKey.externalPrintJobId); - } - - /** Checks whether the 'printer' field has been set, however the value could be null */ - public boolean hasPrinter() { - return genClient.cacheHasKey(CacheKey.printer); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'png'. - */ - public ImagePrintMessage setPng(java.nio.ByteBuffer png) { - return genClient.setOther(png, CacheKey.png); - } - - /** - * Sets the field 'urlString'. - */ - public ImagePrintMessage setUrlString(java.lang.String urlString) { - return genClient.setOther(urlString, CacheKey.urlString); - } - - /** - * Sets the field 'externalPrintJobId'. - */ - public ImagePrintMessage setExternalPrintJobId(java.lang.String externalPrintJobId) { - return genClient.setOther(externalPrintJobId, CacheKey.externalPrintJobId); - } - - /** - * Sets the field 'printer'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public ImagePrintMessage setPrinter(com.clover.sdk.v3.printer.Printer printer) { - return genClient.setRecord(printer, CacheKey.printer); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'png' field, the 'has' method for this field will now return false */ - public void clearPng() { - genClient.clear(CacheKey.png); - } - /** Clears the 'urlString' field, the 'has' method for this field will now return false */ - public void clearUrlString() { - genClient.clear(CacheKey.urlString); - } - /** Clears the 'externalPrintJobId' field, the 'has' method for this field will now return false */ - public void clearExternalPrintJobId() { - genClient.clear(CacheKey.externalPrintJobId); - } - /** Clears the 'printer' field, the 'has' method for this field will now return false */ - public void clearPrinter() { - genClient.clear(CacheKey.printer); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public ImagePrintMessage copyChanges() { - ImagePrintMessage copy = new ImagePrintMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(ImagePrintMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new ImagePrintMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public ImagePrintMessage createFromParcel(android.os.Parcel in) { - ImagePrintMessage instance = new ImagePrintMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public ImagePrintMessage[] newArray(int size) { - return new ImagePrintMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public ImagePrintMessage create(org.json.JSONObject jsonObject) { - return new ImagePrintMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean PNG_IS_REQUIRED = false; - public static final boolean URLSTRING_IS_REQUIRED = false; - public static final boolean EXTERNALPRINTJOBID_IS_REQUIRED = false; - public static final boolean PRINTER_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/InputOption.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/InputOption.java deleted file mode 100644 index f382bc811..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/InputOption.java +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; -import com.clover.sdk.GenericParcelable; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getKeyPress keyPress}
  • - *
  • {@link #getDescription description}
  • - *
- */ -@SuppressWarnings("all") -public class InputOption extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable { - - /** - * The keypress this represents - */ - public com.clover.sdk.v3.remotemessage.KeyPress getKeyPress() { - return genClient.cacheGet(CacheKey.keyPress); - } - - /** - * A description of what this input option represents - */ - public java.lang.String getDescription() { - return genClient.cacheGet(CacheKey.description); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - keyPress { - @Override - public Object extractValue(InputOption instance) { - return instance.genClient.extractEnum("keyPress", com.clover.sdk.v3.remotemessage.KeyPress.class); - } - }, - description { - @Override - public Object extractValue(InputOption instance) { - return instance.genClient.extractOther("description", java.lang.String.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public InputOption() { - genClient = new GenericClient(this); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected InputOption(boolean noInit) { - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public InputOption(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public InputOption(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public InputOption(InputOption src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'keyPress' field is set and is not null */ - public boolean isNotNullKeyPress() { - return genClient.cacheValueIsNotNull(CacheKey.keyPress); - } - - /** Checks whether the 'description' field is set and is not null */ - public boolean isNotNullDescription() { - return genClient.cacheValueIsNotNull(CacheKey.description); - } - - - - /** Checks whether the 'keyPress' field has been set, however the value could be null */ - public boolean hasKeyPress() { - return genClient.cacheHasKey(CacheKey.keyPress); - } - - /** Checks whether the 'description' field has been set, however the value could be null */ - public boolean hasDescription() { - return genClient.cacheHasKey(CacheKey.description); - } - - - /** - * Sets the field 'keyPress'. - */ - public InputOption setKeyPress(com.clover.sdk.v3.remotemessage.KeyPress keyPress) { - return genClient.setOther(keyPress, CacheKey.keyPress); - } - - /** - * Sets the field 'description'. - */ - public InputOption setDescription(java.lang.String description) { - return genClient.setOther(description, CacheKey.description); - } - - - /** Clears the 'keyPress' field, the 'has' method for this field will now return false */ - public void clearKeyPress() { - genClient.clear(CacheKey.keyPress); - } - /** Clears the 'description' field, the 'has' method for this field will now return false */ - public void clearDescription() { - genClient.clear(CacheKey.description); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public InputOption copyChanges() { - InputOption copy = new InputOption(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(InputOption src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new InputOption(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public InputOption createFromParcel(android.os.Parcel in) { - InputOption instance = new InputOption(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public InputOption[] newArray(int size) { - return new InputOption[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public InputOption create(org.json.JSONObject jsonObject) { - return new InputOption(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean KEYPRESS_IS_REQUIRED = false; - public static final boolean DESCRIPTION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/KeyPress.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/KeyPress.java deleted file mode 100644 index d57145507..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/KeyPress.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import android.os.Parcelable; -import android.os.Parcel; - -/** - * This is an auto-generated Clover data enum. - */ -@SuppressWarnings("all") -public enum KeyPress implements Parcelable { - NONE, ENTER, ESC, BACKSPACE, TAB, STAR, BUTTON_1, BUTTON_2, BUTTON_3, BUTTON_4, BUTTON_5, BUTTON_6, BUTTON_7, BUTTON_8, DIGIT_1, DIGIT_2, DIGIT_3, DIGIT_4, DIGIT_5, DIGIT_6, DIGIT_7, DIGIT_8, DIGIT_9, DIGIT_0; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(final Parcel dest, final int flags) { - dest.writeString(name()); - } - - public static final Creator CREATOR = new Creator() { - @Override - public KeyPress createFromParcel(final Parcel source) { - return KeyPress.valueOf(source.readString()); - } - - @Override - public KeyPress[] newArray(final int size) { - return new KeyPress[size]; - } - }; -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/KeyPressEnum.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/KeyPressEnum.java deleted file mode 100644 index a7af14a16..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/KeyPressEnum.java +++ /dev/null @@ -1,209 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; -import com.clover.sdk.GenericParcelable; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getStatus status}
  • - *
- */ -@SuppressWarnings("all") -public class KeyPressEnum extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable { - - public com.clover.sdk.v3.remotemessage.KeyPress getStatus() { - return genClient.cacheGet(CacheKey.status); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - status { - @Override - public Object extractValue(KeyPressEnum instance) { - return instance.genClient.extractEnum("status", com.clover.sdk.v3.remotemessage.KeyPress.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public KeyPressEnum() { - genClient = new GenericClient(this); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected KeyPressEnum(boolean noInit) { - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public KeyPressEnum(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public KeyPressEnum(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public KeyPressEnum(KeyPressEnum src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'status' field is set and is not null */ - public boolean isNotNullStatus() { - return genClient.cacheValueIsNotNull(CacheKey.status); - } - - - - /** Checks whether the 'status' field has been set, however the value could be null */ - public boolean hasStatus() { - return genClient.cacheHasKey(CacheKey.status); - } - - - /** - * Sets the field 'status'. - */ - public KeyPressEnum setStatus(com.clover.sdk.v3.remotemessage.KeyPress status) { - return genClient.setOther(status, CacheKey.status); - } - - - /** Clears the 'status' field, the 'has' method for this field will now return false */ - public void clearStatus() { - genClient.clear(CacheKey.status); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public KeyPressEnum copyChanges() { - KeyPressEnum copy = new KeyPressEnum(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(KeyPressEnum src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new KeyPressEnum(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public KeyPressEnum createFromParcel(android.os.Parcel in) { - KeyPressEnum instance = new KeyPressEnum(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public KeyPressEnum[] newArray(int size) { - return new KeyPressEnum[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public KeyPressEnum create(org.json.JSONObject jsonObject) { - return new KeyPressEnum(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean STATUS_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/KeyPressMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/KeyPressMessage.java deleted file mode 100644 index edd47d232..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/KeyPressMessage.java +++ /dev/null @@ -1,291 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getKeyPress keyPress}
  • - *
- */ -@SuppressWarnings("all") -public class KeyPressMessage extends com.clover.sdk.v3.remotemessage.Message { - - public com.clover.sdk.v3.remotemessage.KeyPress getKeyPress() { - return genClient.cacheGet(CacheKey.keyPress); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - keyPress { - @Override - public Object extractValue(KeyPressMessage instance) { - return instance.genClient.extractEnum("keyPress", com.clover.sdk.v3.remotemessage.KeyPress.class); - } - }, - method { - @Override - public Object extractValue(KeyPressMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(KeyPressMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public KeyPressMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.KEY_PRESS); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected KeyPressMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public KeyPressMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public KeyPressMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public KeyPressMessage(KeyPressMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'keyPress' field is set and is not null */ - public boolean isNotNullKeyPress() { - return genClient.cacheValueIsNotNull(CacheKey.keyPress); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'keyPress' field has been set, however the value could be null */ - public boolean hasKeyPress() { - return genClient.cacheHasKey(CacheKey.keyPress); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'keyPress'. - */ - public KeyPressMessage setKeyPress(com.clover.sdk.v3.remotemessage.KeyPress keyPress) { - return genClient.setOther(keyPress, CacheKey.keyPress); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'keyPress' field, the 'has' method for this field will now return false */ - public void clearKeyPress() { - genClient.clear(CacheKey.keyPress); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public KeyPressMessage copyChanges() { - KeyPressMessage copy = new KeyPressMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(KeyPressMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new KeyPressMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public KeyPressMessage createFromParcel(android.os.Parcel in) { - KeyPressMessage instance = new KeyPressMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public KeyPressMessage[] newArray(int size) { - return new KeyPressMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public KeyPressMessage create(org.json.JSONObject jsonObject) { - return new KeyPressMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean KEYPRESS_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/LastMessageRequestMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/LastMessageRequestMessage.java deleted file mode 100644 index c3442dca2..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/LastMessageRequestMessage.java +++ /dev/null @@ -1,258 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
- */ -@SuppressWarnings("all") -public class LastMessageRequestMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - method { - @Override - public Object extractValue(LastMessageRequestMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(LastMessageRequestMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public LastMessageRequestMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.LAST_MSG_REQUEST); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected LastMessageRequestMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public LastMessageRequestMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public LastMessageRequestMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public LastMessageRequestMessage(LastMessageRequestMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public LastMessageRequestMessage copyChanges() { - LastMessageRequestMessage copy = new LastMessageRequestMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(LastMessageRequestMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new LastMessageRequestMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public LastMessageRequestMessage createFromParcel(android.os.Parcel in) { - LastMessageRequestMessage instance = new LastMessageRequestMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public LastMessageRequestMessage[] newArray(int size) { - return new LastMessageRequestMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public LastMessageRequestMessage create(org.json.JSONObject jsonObject) { - return new LastMessageRequestMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/LastMessageResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/LastMessageResponseMessage.java deleted file mode 100644 index 15cd08bd7..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/LastMessageResponseMessage.java +++ /dev/null @@ -1,334 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getRequest request}
  • - *
  • {@link #getResponse response}
  • - *
- */ -@SuppressWarnings("all") -public class LastMessageResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The last transactional request the device recorded - */ - public com.clover.sdk.v3.remotemessage.Message getRequest() { - return genClient.cacheGet(CacheKey.request); - } - - /** - * The last transactional response the device recorded - */ - public com.clover.sdk.v3.remotemessage.Message getResponse() { - return genClient.cacheGet(CacheKey.response); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - request { - @Override - public Object extractValue(LastMessageResponseMessage instance) { - return instance.genClient.extractRecord("request", com.clover.sdk.v3.remotemessage.Message.JSON_CREATOR); - } - }, - response { - @Override - public Object extractValue(LastMessageResponseMessage instance) { - return instance.genClient.extractRecord("response", com.clover.sdk.v3.remotemessage.Message.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(LastMessageResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(LastMessageResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public LastMessageResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.LAST_MSG_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected LastMessageResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public LastMessageResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public LastMessageResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public LastMessageResponseMessage(LastMessageResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'request' field is set and is not null */ - public boolean isNotNullRequest() { - return genClient.cacheValueIsNotNull(CacheKey.request); - } - - /** Checks whether the 'response' field is set and is not null */ - public boolean isNotNullResponse() { - return genClient.cacheValueIsNotNull(CacheKey.response); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'request' field has been set, however the value could be null */ - public boolean hasRequest() { - return genClient.cacheHasKey(CacheKey.request); - } - - /** Checks whether the 'response' field has been set, however the value could be null */ - public boolean hasResponse() { - return genClient.cacheHasKey(CacheKey.response); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'request'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public LastMessageResponseMessage setRequest(com.clover.sdk.v3.remotemessage.Message request) { - return genClient.setRecord(request, CacheKey.request); - } - - /** - * Sets the field 'response'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public LastMessageResponseMessage setResponse(com.clover.sdk.v3.remotemessage.Message response) { - return genClient.setRecord(response, CacheKey.response); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'request' field, the 'has' method for this field will now return false */ - public void clearRequest() { - genClient.clear(CacheKey.request); - } - /** Clears the 'response' field, the 'has' method for this field will now return false */ - public void clearResponse() { - genClient.clear(CacheKey.response); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public LastMessageResponseMessage copyChanges() { - LastMessageResponseMessage copy = new LastMessageResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(LastMessageResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new LastMessageResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public LastMessageResponseMessage createFromParcel(android.os.Parcel in) { - LastMessageResponseMessage instance = new LastMessageResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public LastMessageResponseMessage[] newArray(int size) { - return new LastMessageResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public LastMessageResponseMessage create(org.json.JSONObject jsonObject) { - return new LastMessageResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean REQUEST_IS_REQUIRED = false; - public static final boolean RESPONSE_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/LogLevelEnum.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/LogLevelEnum.java deleted file mode 100644 index 62614e69b..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/LogLevelEnum.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import android.os.Parcelable; -import android.os.Parcel; - -/** - * This is an auto-generated Clover data enum. - */ -@SuppressWarnings("all") -public enum LogLevelEnum implements Parcelable { - VERBOSE, DEBUG, INFO, WARN, ERROR; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(final Parcel dest, final int flags) { - dest.writeString(name()); - } - - public static final Creator CREATOR = new Creator() { - @Override - public LogLevelEnum createFromParcel(final Parcel source) { - return LogLevelEnum.valueOf(source.readString()); - } - - @Override - public LogLevelEnum[] newArray(final int size) { - return new LogLevelEnum[size]; - } - }; -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/LogMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/LogMessage.java deleted file mode 100644 index 18b2d69dc..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/LogMessage.java +++ /dev/null @@ -1,327 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getLogLevel logLevel}
  • - *
  • {@link #getMessages messages}
  • - *
- */ -@SuppressWarnings("all") -public class LogMessage extends com.clover.sdk.v3.remotemessage.Message { - - public com.clover.sdk.v3.remotemessage.LogLevelEnum getLogLevel() { - return genClient.cacheGet(CacheKey.logLevel); - } - - public java.util.Map getMessages() { - return genClient.cacheGet(CacheKey.messages); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - logLevel { - @Override - public Object extractValue(LogMessage instance) { - return instance.genClient.extractEnum("logLevel", com.clover.sdk.v3.remotemessage.LogLevelEnum.class); - } - }, - messages { - @Override - public Object extractValue(LogMessage instance) { - return instance.genClient.extractMap("messages"); - } - }, - method { - @Override - public Object extractValue(LogMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(LogMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public LogMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.LOG_MESSAGE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected LogMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public LogMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public LogMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public LogMessage(LogMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'logLevel' field is set and is not null */ - public boolean isNotNullLogLevel() { - return genClient.cacheValueIsNotNull(CacheKey.logLevel); - } - - /** Checks whether the 'messages' field is set and is not null */ - public boolean isNotNullMessages() { - return genClient.cacheValueIsNotNull(CacheKey.messages); - } - - /** Checks whether the 'messages' field is set and is not null and is not empty */ - public boolean isNotEmptyMessages() { return isNotNullMessages() && !getMessages().isEmpty(); } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'logLevel' field has been set, however the value could be null */ - public boolean hasLogLevel() { - return genClient.cacheHasKey(CacheKey.logLevel); - } - - /** Checks whether the 'messages' field has been set, however the value could be null */ - public boolean hasMessages() { - return genClient.cacheHasKey(CacheKey.messages); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'logLevel'. - */ - public LogMessage setLogLevel(com.clover.sdk.v3.remotemessage.LogLevelEnum logLevel) { - return genClient.setOther(logLevel, CacheKey.logLevel); - } - - /** - * Sets the field 'messages'. - */ - public LogMessage setMessages(java.util.Map messages) { - return genClient.setOther(messages, CacheKey.messages); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'logLevel' field, the 'has' method for this field will now return false */ - public void clearLogLevel() { - genClient.clear(CacheKey.logLevel); - } - /** Clears the 'messages' field, the 'has' method for this field will now return false */ - public void clearMessages() { - genClient.clear(CacheKey.messages); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public LogMessage copyChanges() { - LogMessage copy = new LogMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(LogMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new LogMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public LogMessage createFromParcel(android.os.Parcel in) { - LogMessage instance = new LogMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public LogMessage[] newArray(int size) { - return new LogMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public LogMessage create(org.json.JSONObject jsonObject) { - return new LogMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean LOGLEVEL_IS_REQUIRED = false; - public static final boolean MESSAGES_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/Message.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/Message.java deleted file mode 100644 index 468975518..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/Message.java +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; -import com.clover.sdk.GenericParcelable; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getMethod method}
  • - *
  • {@link #getVersion version}
  • - *
- */ -@SuppressWarnings("all") -public class Message extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable { - - /** - * The list of message types - */ - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - method { - @Override - public Object extractValue(Message instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(Message instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public Message() { - genClient = new GenericClient(this); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected Message(boolean noInit) { - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public Message(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public Message(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public Message(Message src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'method' field is set and is not null */ - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'method' field has been set, however the value could be null */ - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'method'. - */ - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'method' field, the 'has' method for this field will now return false */ - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public Message copyChanges() { - Message copy = new Message(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(Message src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new Message(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public Message createFromParcel(android.os.Parcel in) { - Message instance = new Message(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public Message[] newArray(int size) { - return new Message[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public Message create(org.json.JSONObject jsonObject) { - return new Message(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/Method.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/Method.java deleted file mode 100644 index 768049bb5..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/Method.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import android.os.Parcelable; -import android.os.Parcel; - -/** - * This is an auto-generated Clover data enum. - */ -@SuppressWarnings("all") -public enum Method implements Parcelable { - ACK, CLOSEOUT_RESPONSE, CLOSEOUT_REQUEST, CAPTURE_PREAUTH_RESPONSE, CAPTURE_PREAUTH, CONFIRM_PAYMENT_MESSAGE, LAST_MSG_REQUEST, LAST_MSG_RESPONSE, TIP_ADJUST, TIP_ADJUST_RESPONSE, OPEN_CASH_DRAWER, SHOW_PAYMENT_RECEIPT_OPTIONS, REFUND_RESPONSE, REFUND_REQUEST, TX_START, TX_START_RESPONSE, KEY_PRESS, UI_STATE, TX_STATE, FINISH_OK, FINISH_CANCEL, DISCOVERY_REQUEST, DISCOVERY_RESPONSE, TIP_ADDED, VERIFY_SIGNATURE, SIGNATURE_VERIFIED, PAYMENT_CONFIRMED, PAYMENT_REJECTED, PAYMENT_VOIDED, PRINT_PAYMENT, REFUND_PRINT_PAYMENT, PRINT_PAYMENT_MERCHANT_COPY, PRINT_CREDIT, PRINT_PAYMENT_DECLINE, PRINT_CREDIT_DECLINE, PRINT_TEXT, PRINT_IMAGE, TERMINAL_MESSAGE, SHOW_WELCOME_SCREEN, SHOW_THANK_YOU_SCREEN, SHOW_ORDER_SCREEN, BREAK, CASHBACK_SELECTED, PARTIAL_AUTH, VOID_PAYMENT, ORDER_ACTION_ADD_DISCOUNT, ORDER_ACTION_REMOVE_DISCOUNT, ORDER_ACTION_ADD_LINE_ITEM, ORDER_ACTION_REMOVE_LINE_ITEM, ORDER_ACTION_RESPONSE, VAULT_CARD, VAULT_CARD_RESPONSE, LOG_MESSAGE, RETRIEVE_PENDING_PAYMENTS, RETRIEVE_PENDING_PAYMENTS_RESPONSE, CARD_DATA_RESPONSE, CARD_DATA, PAIRING_REQUEST, PAIRING_RESPONSE, PAIRING_CODE, REMOTE_ERROR, ACTIVITY_REQUEST, ACTIVITY_RESPONSE, SHUTDOWN, RESET, FORCECONNECT, RETRIEVE_DEVICE_STATUS_REQUEST, RETRIEVE_DEVICE_STATUS_RESPONSE, RESET_DEVICE_RESPONSE, ACTIVITY_MESSAGE_TO_ACTIVITY, ACTIVITY_MESSAGE_FROM_ACTIVITY, RETRIEVE_PAYMENT_RESPONSE, RETRIEVE_PAYMENT_REQUEST, PRINT_JOB_STATUS_REQUEST, PRINT_JOB_STATUS_RESPONSE, GET_PRINTERS_REQUEST, GET_PRINTERS_RESPONSE, RETRIEVE_CUSTOM_ACTIVITIES_REQUEST, RETRIEVE_CUSTOM_ACTIVITIES_RESPONSE; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(final Parcel dest, final int flags) { - dest.writeString(name()); - } - - public static final Creator CREATOR = new Creator() { - @Override - public Method createFromParcel(final Parcel source) { - return Method.valueOf(source.readString()); - } - - @Override - public Method[] newArray(final int size) { - return new Method[size]; - } - }; -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OpenCashDrawerMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OpenCashDrawerMessage.java deleted file mode 100644 index 44b0283f0..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OpenCashDrawerMessage.java +++ /dev/null @@ -1,332 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getReason reason}
  • - *
  • {@link #getPrinter printer}
  • - *
- */ -@SuppressWarnings("all") -public class OpenCashDrawerMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The reason the cash drawer was opened. - */ - public java.lang.String getReason() { - return genClient.cacheGet(CacheKey.reason); - } - - /** - * The ID of the specific drawer to open. - */ - public com.clover.sdk.v3.printer.Printer getPrinter() { - return genClient.cacheGet(CacheKey.printer); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - reason { - @Override - public Object extractValue(OpenCashDrawerMessage instance) { - return instance.genClient.extractOther("reason", java.lang.String.class); - } - }, - printer { - @Override - public Object extractValue(OpenCashDrawerMessage instance) { - return instance.genClient.extractRecord("printer", com.clover.sdk.v3.printer.Printer.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(OpenCashDrawerMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(OpenCashDrawerMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public OpenCashDrawerMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.OPEN_CASH_DRAWER); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected OpenCashDrawerMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public OpenCashDrawerMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public OpenCashDrawerMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public OpenCashDrawerMessage(OpenCashDrawerMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'reason' field is set and is not null */ - public boolean isNotNullReason() { - return genClient.cacheValueIsNotNull(CacheKey.reason); - } - - /** Checks whether the 'printer' field is set and is not null */ - public boolean isNotNullPrinter() { - return genClient.cacheValueIsNotNull(CacheKey.printer); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'reason' field has been set, however the value could be null */ - public boolean hasReason() { - return genClient.cacheHasKey(CacheKey.reason); - } - - /** Checks whether the 'printer' field has been set, however the value could be null */ - public boolean hasPrinter() { - return genClient.cacheHasKey(CacheKey.printer); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'reason'. - */ - public OpenCashDrawerMessage setReason(java.lang.String reason) { - return genClient.setOther(reason, CacheKey.reason); - } - - /** - * Sets the field 'printer'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public OpenCashDrawerMessage setPrinter(com.clover.sdk.v3.printer.Printer printer) { - return genClient.setRecord(printer, CacheKey.printer); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'reason' field, the 'has' method for this field will now return false */ - public void clearReason() { - genClient.clear(CacheKey.reason); - } - /** Clears the 'printer' field, the 'has' method for this field will now return false */ - public void clearPrinter() { - genClient.clear(CacheKey.printer); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public OpenCashDrawerMessage copyChanges() { - OpenCashDrawerMessage copy = new OpenCashDrawerMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(OpenCashDrawerMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new OpenCashDrawerMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public OpenCashDrawerMessage createFromParcel(android.os.Parcel in) { - OpenCashDrawerMessage instance = new OpenCashDrawerMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public OpenCashDrawerMessage[] newArray(int size) { - return new OpenCashDrawerMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public OpenCashDrawerMessage create(org.json.JSONObject jsonObject) { - return new OpenCashDrawerMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean REASON_IS_REQUIRED = false; - public static final boolean PRINTER_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionAddDiscountMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionAddDiscountMessage.java deleted file mode 100644 index 6514f9832..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionAddDiscountMessage.java +++ /dev/null @@ -1,293 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getAddDiscountAction addDiscountAction}
  • - *
- */ -@SuppressWarnings("all") -public class OrderActionAddDiscountMessage extends com.clover.sdk.v3.remotemessage.Message { - - public com.clover.sdk.v3.remotemessage.AddDiscountAction getAddDiscountAction() { - return genClient.cacheGet(CacheKey.addDiscountAction); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - addDiscountAction { - @Override - public Object extractValue(OrderActionAddDiscountMessage instance) { - return instance.genClient.extractRecord("addDiscountAction", com.clover.sdk.v3.remotemessage.AddDiscountAction.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(OrderActionAddDiscountMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(OrderActionAddDiscountMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public OrderActionAddDiscountMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.ORDER_ACTION_ADD_DISCOUNT); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected OrderActionAddDiscountMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public OrderActionAddDiscountMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public OrderActionAddDiscountMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public OrderActionAddDiscountMessage(OrderActionAddDiscountMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'addDiscountAction' field is set and is not null */ - public boolean isNotNullAddDiscountAction() { - return genClient.cacheValueIsNotNull(CacheKey.addDiscountAction); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'addDiscountAction' field has been set, however the value could be null */ - public boolean hasAddDiscountAction() { - return genClient.cacheHasKey(CacheKey.addDiscountAction); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'addDiscountAction'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public OrderActionAddDiscountMessage setAddDiscountAction(com.clover.sdk.v3.remotemessage.AddDiscountAction addDiscountAction) { - return genClient.setRecord(addDiscountAction, CacheKey.addDiscountAction); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'addDiscountAction' field, the 'has' method for this field will now return false */ - public void clearAddDiscountAction() { - genClient.clear(CacheKey.addDiscountAction); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public OrderActionAddDiscountMessage copyChanges() { - OrderActionAddDiscountMessage copy = new OrderActionAddDiscountMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(OrderActionAddDiscountMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new OrderActionAddDiscountMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public OrderActionAddDiscountMessage createFromParcel(android.os.Parcel in) { - OrderActionAddDiscountMessage instance = new OrderActionAddDiscountMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public OrderActionAddDiscountMessage[] newArray(int size) { - return new OrderActionAddDiscountMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public OrderActionAddDiscountMessage create(org.json.JSONObject jsonObject) { - return new OrderActionAddDiscountMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean ADDDISCOUNTACTION_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionAddLineItemMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionAddLineItemMessage.java deleted file mode 100644 index 4d984b225..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionAddLineItemMessage.java +++ /dev/null @@ -1,293 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getAddLineItemAction addLineItemAction}
  • - *
- */ -@SuppressWarnings("all") -public class OrderActionAddLineItemMessage extends com.clover.sdk.v3.remotemessage.Message { - - public com.clover.sdk.v3.remotemessage.AddLineItemAction getAddLineItemAction() { - return genClient.cacheGet(CacheKey.addLineItemAction); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - addLineItemAction { - @Override - public Object extractValue(OrderActionAddLineItemMessage instance) { - return instance.genClient.extractRecord("addLineItemAction", com.clover.sdk.v3.remotemessage.AddLineItemAction.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(OrderActionAddLineItemMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(OrderActionAddLineItemMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public OrderActionAddLineItemMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.ORDER_ACTION_ADD_LINE_ITEM); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected OrderActionAddLineItemMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public OrderActionAddLineItemMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public OrderActionAddLineItemMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public OrderActionAddLineItemMessage(OrderActionAddLineItemMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'addLineItemAction' field is set and is not null */ - public boolean isNotNullAddLineItemAction() { - return genClient.cacheValueIsNotNull(CacheKey.addLineItemAction); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'addLineItemAction' field has been set, however the value could be null */ - public boolean hasAddLineItemAction() { - return genClient.cacheHasKey(CacheKey.addLineItemAction); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'addLineItemAction'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public OrderActionAddLineItemMessage setAddLineItemAction(com.clover.sdk.v3.remotemessage.AddLineItemAction addLineItemAction) { - return genClient.setRecord(addLineItemAction, CacheKey.addLineItemAction); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'addLineItemAction' field, the 'has' method for this field will now return false */ - public void clearAddLineItemAction() { - genClient.clear(CacheKey.addLineItemAction); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public OrderActionAddLineItemMessage copyChanges() { - OrderActionAddLineItemMessage copy = new OrderActionAddLineItemMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(OrderActionAddLineItemMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new OrderActionAddLineItemMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public OrderActionAddLineItemMessage createFromParcel(android.os.Parcel in) { - OrderActionAddLineItemMessage instance = new OrderActionAddLineItemMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public OrderActionAddLineItemMessage[] newArray(int size) { - return new OrderActionAddLineItemMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public OrderActionAddLineItemMessage create(org.json.JSONObject jsonObject) { - return new OrderActionAddLineItemMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean ADDLINEITEMACTION_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionRemoveDiscountMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionRemoveDiscountMessage.java deleted file mode 100644 index 2be35430f..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionRemoveDiscountMessage.java +++ /dev/null @@ -1,293 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getRemoveDiscountAction removeDiscountAction}
  • - *
- */ -@SuppressWarnings("all") -public class OrderActionRemoveDiscountMessage extends com.clover.sdk.v3.remotemessage.Message { - - public com.clover.sdk.v3.remotemessage.RemoveDiscountAction getRemoveDiscountAction() { - return genClient.cacheGet(CacheKey.removeDiscountAction); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - removeDiscountAction { - @Override - public Object extractValue(OrderActionRemoveDiscountMessage instance) { - return instance.genClient.extractRecord("removeDiscountAction", com.clover.sdk.v3.remotemessage.RemoveDiscountAction.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(OrderActionRemoveDiscountMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(OrderActionRemoveDiscountMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public OrderActionRemoveDiscountMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.ORDER_ACTION_REMOVE_DISCOUNT); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected OrderActionRemoveDiscountMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public OrderActionRemoveDiscountMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public OrderActionRemoveDiscountMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public OrderActionRemoveDiscountMessage(OrderActionRemoveDiscountMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'removeDiscountAction' field is set and is not null */ - public boolean isNotNullRemoveDiscountAction() { - return genClient.cacheValueIsNotNull(CacheKey.removeDiscountAction); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'removeDiscountAction' field has been set, however the value could be null */ - public boolean hasRemoveDiscountAction() { - return genClient.cacheHasKey(CacheKey.removeDiscountAction); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'removeDiscountAction'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public OrderActionRemoveDiscountMessage setRemoveDiscountAction(com.clover.sdk.v3.remotemessage.RemoveDiscountAction removeDiscountAction) { - return genClient.setRecord(removeDiscountAction, CacheKey.removeDiscountAction); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'removeDiscountAction' field, the 'has' method for this field will now return false */ - public void clearRemoveDiscountAction() { - genClient.clear(CacheKey.removeDiscountAction); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public OrderActionRemoveDiscountMessage copyChanges() { - OrderActionRemoveDiscountMessage copy = new OrderActionRemoveDiscountMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(OrderActionRemoveDiscountMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new OrderActionRemoveDiscountMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public OrderActionRemoveDiscountMessage createFromParcel(android.os.Parcel in) { - OrderActionRemoveDiscountMessage instance = new OrderActionRemoveDiscountMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public OrderActionRemoveDiscountMessage[] newArray(int size) { - return new OrderActionRemoveDiscountMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public OrderActionRemoveDiscountMessage create(org.json.JSONObject jsonObject) { - return new OrderActionRemoveDiscountMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean REMOVEDISCOUNTACTION_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionRemoveLineItemMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionRemoveLineItemMessage.java deleted file mode 100644 index 50975f026..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionRemoveLineItemMessage.java +++ /dev/null @@ -1,293 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getRemoveLineItemAction removeLineItemAction}
  • - *
- */ -@SuppressWarnings("all") -public class OrderActionRemoveLineItemMessage extends com.clover.sdk.v3.remotemessage.Message { - - public com.clover.sdk.v3.remotemessage.RemoveLineItemAction getRemoveLineItemAction() { - return genClient.cacheGet(CacheKey.removeLineItemAction); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - removeLineItemAction { - @Override - public Object extractValue(OrderActionRemoveLineItemMessage instance) { - return instance.genClient.extractRecord("removeLineItemAction", com.clover.sdk.v3.remotemessage.RemoveLineItemAction.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(OrderActionRemoveLineItemMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(OrderActionRemoveLineItemMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public OrderActionRemoveLineItemMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.ORDER_ACTION_REMOVE_LINE_ITEM); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected OrderActionRemoveLineItemMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public OrderActionRemoveLineItemMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public OrderActionRemoveLineItemMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public OrderActionRemoveLineItemMessage(OrderActionRemoveLineItemMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'removeLineItemAction' field is set and is not null */ - public boolean isNotNullRemoveLineItemAction() { - return genClient.cacheValueIsNotNull(CacheKey.removeLineItemAction); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'removeLineItemAction' field has been set, however the value could be null */ - public boolean hasRemoveLineItemAction() { - return genClient.cacheHasKey(CacheKey.removeLineItemAction); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'removeLineItemAction'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public OrderActionRemoveLineItemMessage setRemoveLineItemAction(com.clover.sdk.v3.remotemessage.RemoveLineItemAction removeLineItemAction) { - return genClient.setRecord(removeLineItemAction, CacheKey.removeLineItemAction); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'removeLineItemAction' field, the 'has' method for this field will now return false */ - public void clearRemoveLineItemAction() { - genClient.clear(CacheKey.removeLineItemAction); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public OrderActionRemoveLineItemMessage copyChanges() { - OrderActionRemoveLineItemMessage copy = new OrderActionRemoveLineItemMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(OrderActionRemoveLineItemMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new OrderActionRemoveLineItemMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public OrderActionRemoveLineItemMessage createFromParcel(android.os.Parcel in) { - OrderActionRemoveLineItemMessage instance = new OrderActionRemoveLineItemMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public OrderActionRemoveLineItemMessage[] newArray(int size) { - return new OrderActionRemoveLineItemMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public OrderActionRemoveLineItemMessage create(org.json.JSONObject jsonObject) { - return new OrderActionRemoveLineItemMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean REMOVELINEITEMACTION_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionResponseMessage.java deleted file mode 100644 index a9d5ce9af..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderActionResponseMessage.java +++ /dev/null @@ -1,293 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getOrderActionResponse orderActionResponse}
  • - *
- */ -@SuppressWarnings("all") -public class OrderActionResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - public com.clover.sdk.v3.remotemessage.OrderActionResponse getOrderActionResponse() { - return genClient.cacheGet(CacheKey.orderActionResponse); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - orderActionResponse { - @Override - public Object extractValue(OrderActionResponseMessage instance) { - return instance.genClient.extractRecord("orderActionResponse", com.clover.sdk.v3.remotemessage.OrderActionResponse.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(OrderActionResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(OrderActionResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public OrderActionResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.ORDER_ACTION_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected OrderActionResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public OrderActionResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public OrderActionResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public OrderActionResponseMessage(OrderActionResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'orderActionResponse' field is set and is not null */ - public boolean isNotNullOrderActionResponse() { - return genClient.cacheValueIsNotNull(CacheKey.orderActionResponse); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'orderActionResponse' field has been set, however the value could be null */ - public boolean hasOrderActionResponse() { - return genClient.cacheHasKey(CacheKey.orderActionResponse); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'orderActionResponse'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public OrderActionResponseMessage setOrderActionResponse(com.clover.sdk.v3.remotemessage.OrderActionResponse orderActionResponse) { - return genClient.setRecord(orderActionResponse, CacheKey.orderActionResponse); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'orderActionResponse' field, the 'has' method for this field will now return false */ - public void clearOrderActionResponse() { - genClient.clear(CacheKey.orderActionResponse); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public OrderActionResponseMessage copyChanges() { - OrderActionResponseMessage copy = new OrderActionResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(OrderActionResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new OrderActionResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public OrderActionResponseMessage createFromParcel(android.os.Parcel in) { - OrderActionResponseMessage instance = new OrderActionResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public OrderActionResponseMessage[] newArray(int size) { - return new OrderActionResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public OrderActionResponseMessage create(org.json.JSONObject jsonObject) { - return new OrderActionResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean ORDERACTIONRESPONSE_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderUpdateMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderUpdateMessage.java deleted file mode 100644 index b7460f900..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/OrderUpdateMessage.java +++ /dev/null @@ -1,486 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getOrder order}
  • - *
  • {@link #getLineItemsAddedOperation lineItemsAddedOperation}
  • - *
  • {@link #getLineItemsDeletedOperation lineItemsDeletedOperation}
  • - *
  • {@link #getDiscountsAddedOperation discountsAddedOperation}
  • - *
  • {@link #getDiscountsDeletedOperation discountsDeletedOperation}
  • - *
  • {@link #getOrderDeletedOperation orderDeletedOperation}
  • - *
- */ -@SuppressWarnings("all") -public class OrderUpdateMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The order that is to be displayed. - */ - public com.clover.sdk.v3.order.DisplayOrder getOrder() { - return genClient.cacheGet(CacheKey.order); - } - - /** - * Items that were added to the display order. - */ - public com.clover.sdk.v3.order.operation.LineItemsAddedOperation getLineItemsAddedOperation() { - return genClient.cacheGet(CacheKey.lineItemsAddedOperation); - } - - /** - * Items that were added to the display order. - */ - public com.clover.sdk.v3.order.operation.LineItemsDeletedOperation getLineItemsDeletedOperation() { - return genClient.cacheGet(CacheKey.lineItemsDeletedOperation); - } - - /** - * Items that were added to the display order. - */ - public com.clover.sdk.v3.order.operation.DiscountsAddedOperation getDiscountsAddedOperation() { - return genClient.cacheGet(CacheKey.discountsAddedOperation); - } - - /** - * Items that were added to the display order. - */ - public com.clover.sdk.v3.order.operation.DiscountsDeletedOperation getDiscountsDeletedOperation() { - return genClient.cacheGet(CacheKey.discountsDeletedOperation); - } - - /** - * Items that were added to the display order. - */ - public com.clover.sdk.v3.order.operation.OrderDeletedOperation getOrderDeletedOperation() { - return genClient.cacheGet(CacheKey.orderDeletedOperation); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - order { - @Override - public Object extractValue(OrderUpdateMessage instance) { - return instance.genClient.extractRecord("order", com.clover.sdk.v3.order.DisplayOrder.JSON_CREATOR); - } - }, - lineItemsAddedOperation { - @Override - public Object extractValue(OrderUpdateMessage instance) { - return instance.genClient.extractRecord("lineItemsAddedOperation", com.clover.sdk.v3.order.operation.LineItemsAddedOperation.JSON_CREATOR); - } - }, - lineItemsDeletedOperation { - @Override - public Object extractValue(OrderUpdateMessage instance) { - return instance.genClient.extractRecord("lineItemsDeletedOperation", com.clover.sdk.v3.order.operation.LineItemsDeletedOperation.JSON_CREATOR); - } - }, - discountsAddedOperation { - @Override - public Object extractValue(OrderUpdateMessage instance) { - return instance.genClient.extractRecord("discountsAddedOperation", com.clover.sdk.v3.order.operation.DiscountsAddedOperation.JSON_CREATOR); - } - }, - discountsDeletedOperation { - @Override - public Object extractValue(OrderUpdateMessage instance) { - return instance.genClient.extractRecord("discountsDeletedOperation", com.clover.sdk.v3.order.operation.DiscountsDeletedOperation.JSON_CREATOR); - } - }, - orderDeletedOperation { - @Override - public Object extractValue(OrderUpdateMessage instance) { - return instance.genClient.extractRecord("orderDeletedOperation", com.clover.sdk.v3.order.operation.OrderDeletedOperation.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(OrderUpdateMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(OrderUpdateMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public OrderUpdateMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.SHOW_ORDER_SCREEN); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected OrderUpdateMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public OrderUpdateMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public OrderUpdateMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public OrderUpdateMessage(OrderUpdateMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'order' field is set and is not null */ - public boolean isNotNullOrder() { - return genClient.cacheValueIsNotNull(CacheKey.order); - } - - /** Checks whether the 'lineItemsAddedOperation' field is set and is not null */ - public boolean isNotNullLineItemsAddedOperation() { - return genClient.cacheValueIsNotNull(CacheKey.lineItemsAddedOperation); - } - - /** Checks whether the 'lineItemsDeletedOperation' field is set and is not null */ - public boolean isNotNullLineItemsDeletedOperation() { - return genClient.cacheValueIsNotNull(CacheKey.lineItemsDeletedOperation); - } - - /** Checks whether the 'discountsAddedOperation' field is set and is not null */ - public boolean isNotNullDiscountsAddedOperation() { - return genClient.cacheValueIsNotNull(CacheKey.discountsAddedOperation); - } - - /** Checks whether the 'discountsDeletedOperation' field is set and is not null */ - public boolean isNotNullDiscountsDeletedOperation() { - return genClient.cacheValueIsNotNull(CacheKey.discountsDeletedOperation); - } - - /** Checks whether the 'orderDeletedOperation' field is set and is not null */ - public boolean isNotNullOrderDeletedOperation() { - return genClient.cacheValueIsNotNull(CacheKey.orderDeletedOperation); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'order' field has been set, however the value could be null */ - public boolean hasOrder() { - return genClient.cacheHasKey(CacheKey.order); - } - - /** Checks whether the 'lineItemsAddedOperation' field has been set, however the value could be null */ - public boolean hasLineItemsAddedOperation() { - return genClient.cacheHasKey(CacheKey.lineItemsAddedOperation); - } - - /** Checks whether the 'lineItemsDeletedOperation' field has been set, however the value could be null */ - public boolean hasLineItemsDeletedOperation() { - return genClient.cacheHasKey(CacheKey.lineItemsDeletedOperation); - } - - /** Checks whether the 'discountsAddedOperation' field has been set, however the value could be null */ - public boolean hasDiscountsAddedOperation() { - return genClient.cacheHasKey(CacheKey.discountsAddedOperation); - } - - /** Checks whether the 'discountsDeletedOperation' field has been set, however the value could be null */ - public boolean hasDiscountsDeletedOperation() { - return genClient.cacheHasKey(CacheKey.discountsDeletedOperation); - } - - /** Checks whether the 'orderDeletedOperation' field has been set, however the value could be null */ - public boolean hasOrderDeletedOperation() { - return genClient.cacheHasKey(CacheKey.orderDeletedOperation); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'order'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public OrderUpdateMessage setOrder(com.clover.sdk.v3.order.DisplayOrder order) { - return genClient.setRecord(order, CacheKey.order); - } - - /** - * Sets the field 'lineItemsAddedOperation'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public OrderUpdateMessage setLineItemsAddedOperation(com.clover.sdk.v3.order.operation.LineItemsAddedOperation lineItemsAddedOperation) { - return genClient.setRecord(lineItemsAddedOperation, CacheKey.lineItemsAddedOperation); - } - - /** - * Sets the field 'lineItemsDeletedOperation'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public OrderUpdateMessage setLineItemsDeletedOperation(com.clover.sdk.v3.order.operation.LineItemsDeletedOperation lineItemsDeletedOperation) { - return genClient.setRecord(lineItemsDeletedOperation, CacheKey.lineItemsDeletedOperation); - } - - /** - * Sets the field 'discountsAddedOperation'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public OrderUpdateMessage setDiscountsAddedOperation(com.clover.sdk.v3.order.operation.DiscountsAddedOperation discountsAddedOperation) { - return genClient.setRecord(discountsAddedOperation, CacheKey.discountsAddedOperation); - } - - /** - * Sets the field 'discountsDeletedOperation'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public OrderUpdateMessage setDiscountsDeletedOperation(com.clover.sdk.v3.order.operation.DiscountsDeletedOperation discountsDeletedOperation) { - return genClient.setRecord(discountsDeletedOperation, CacheKey.discountsDeletedOperation); - } - - /** - * Sets the field 'orderDeletedOperation'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public OrderUpdateMessage setOrderDeletedOperation(com.clover.sdk.v3.order.operation.OrderDeletedOperation orderDeletedOperation) { - return genClient.setRecord(orderDeletedOperation, CacheKey.orderDeletedOperation); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'order' field, the 'has' method for this field will now return false */ - public void clearOrder() { - genClient.clear(CacheKey.order); - } - /** Clears the 'lineItemsAddedOperation' field, the 'has' method for this field will now return false */ - public void clearLineItemsAddedOperation() { - genClient.clear(CacheKey.lineItemsAddedOperation); - } - /** Clears the 'lineItemsDeletedOperation' field, the 'has' method for this field will now return false */ - public void clearLineItemsDeletedOperation() { - genClient.clear(CacheKey.lineItemsDeletedOperation); - } - /** Clears the 'discountsAddedOperation' field, the 'has' method for this field will now return false */ - public void clearDiscountsAddedOperation() { - genClient.clear(CacheKey.discountsAddedOperation); - } - /** Clears the 'discountsDeletedOperation' field, the 'has' method for this field will now return false */ - public void clearDiscountsDeletedOperation() { - genClient.clear(CacheKey.discountsDeletedOperation); - } - /** Clears the 'orderDeletedOperation' field, the 'has' method for this field will now return false */ - public void clearOrderDeletedOperation() { - genClient.clear(CacheKey.orderDeletedOperation); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public OrderUpdateMessage copyChanges() { - OrderUpdateMessage copy = new OrderUpdateMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(OrderUpdateMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new OrderUpdateMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public OrderUpdateMessage createFromParcel(android.os.Parcel in) { - OrderUpdateMessage instance = new OrderUpdateMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public OrderUpdateMessage[] newArray(int size) { - return new OrderUpdateMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public OrderUpdateMessage create(org.json.JSONObject jsonObject) { - return new OrderUpdateMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean ORDER_IS_REQUIRED = false; - public static final boolean LINEITEMSADDEDOPERATION_IS_REQUIRED = false; - public static final boolean LINEITEMSDELETEDOPERATION_IS_REQUIRED = false; - public static final boolean DISCOUNTSADDEDOPERATION_IS_REQUIRED = false; - public static final boolean DISCOUNTSDELETEDOPERATION_IS_REQUIRED = false; - public static final boolean ORDERDELETEDOPERATION_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PairingCodeMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PairingCodeMessage.java deleted file mode 100644 index 57f2d436a..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PairingCodeMessage.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getPairingCode pairingCode}
  • - *
- */ -@SuppressWarnings("all") -public class PairingCodeMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The pairing code to display. - */ - public java.lang.String getPairingCode() { - return genClient.cacheGet(CacheKey.pairingCode); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - pairingCode { - @Override - public Object extractValue(PairingCodeMessage instance) { - return instance.genClient.extractOther("pairingCode", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(PairingCodeMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(PairingCodeMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public PairingCodeMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.PAIRING_CODE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected PairingCodeMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public PairingCodeMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public PairingCodeMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public PairingCodeMessage(PairingCodeMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'pairingCode' field is set and is not null */ - public boolean isNotNullPairingCode() { - return genClient.cacheValueIsNotNull(CacheKey.pairingCode); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'pairingCode' field has been set, however the value could be null */ - public boolean hasPairingCode() { - return genClient.cacheHasKey(CacheKey.pairingCode); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'pairingCode'. - */ - public PairingCodeMessage setPairingCode(java.lang.String pairingCode) { - return genClient.setOther(pairingCode, CacheKey.pairingCode); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'pairingCode' field, the 'has' method for this field will now return false */ - public void clearPairingCode() { - genClient.clear(CacheKey.pairingCode); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public PairingCodeMessage copyChanges() { - PairingCodeMessage copy = new PairingCodeMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(PairingCodeMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new PairingCodeMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public PairingCodeMessage createFromParcel(android.os.Parcel in) { - PairingCodeMessage instance = new PairingCodeMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public PairingCodeMessage[] newArray(int size) { - return new PairingCodeMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public PairingCodeMessage create(org.json.JSONObject jsonObject) { - return new PairingCodeMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean PAIRINGCODE_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PairingRequestMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PairingRequestMessage.java deleted file mode 100644 index 380c8bf0b..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PairingRequestMessage.java +++ /dev/null @@ -1,402 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getName name}
  • - *
  • {@link #getSerialNumber serialNumber}
  • - *
  • {@link #getApplicationName applicationName}
  • - *
  • {@link #getAuthenticationToken authenticationToken}
  • - *
- */ -@SuppressWarnings("all") -public class PairingRequestMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The peripheral sends a pairing request containing the peripheral name - */ - public java.lang.String getName() { - return genClient.cacheGet(CacheKey.name); - } - - /** - * The peripheral serial number - */ - public java.lang.String getSerialNumber() { - return genClient.cacheGet(CacheKey.serialNumber); - } - - /** - * The name of the application the peripheral is associated with. This is the "resourceDescriptor" in the handshake - */ - public java.lang.String getApplicationName() { - return genClient.cacheGet(CacheKey.applicationName); - } - - /** - * The token, recognized by the specific device. - */ - public java.lang.String getAuthenticationToken() { - return genClient.cacheGet(CacheKey.authenticationToken); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - name { - @Override - public Object extractValue(PairingRequestMessage instance) { - return instance.genClient.extractOther("name", java.lang.String.class); - } - }, - serialNumber { - @Override - public Object extractValue(PairingRequestMessage instance) { - return instance.genClient.extractOther("serialNumber", java.lang.String.class); - } - }, - applicationName { - @Override - public Object extractValue(PairingRequestMessage instance) { - return instance.genClient.extractOther("applicationName", java.lang.String.class); - } - }, - authenticationToken { - @Override - public Object extractValue(PairingRequestMessage instance) { - return instance.genClient.extractOther("authenticationToken", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(PairingRequestMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(PairingRequestMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public PairingRequestMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.PAIRING_REQUEST); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected PairingRequestMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public PairingRequestMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public PairingRequestMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public PairingRequestMessage(PairingRequestMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'name' field is set and is not null */ - public boolean isNotNullName() { - return genClient.cacheValueIsNotNull(CacheKey.name); - } - - /** Checks whether the 'serialNumber' field is set and is not null */ - public boolean isNotNullSerialNumber() { - return genClient.cacheValueIsNotNull(CacheKey.serialNumber); - } - - /** Checks whether the 'applicationName' field is set and is not null */ - public boolean isNotNullApplicationName() { - return genClient.cacheValueIsNotNull(CacheKey.applicationName); - } - - /** Checks whether the 'authenticationToken' field is set and is not null */ - public boolean isNotNullAuthenticationToken() { - return genClient.cacheValueIsNotNull(CacheKey.authenticationToken); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'name' field has been set, however the value could be null */ - public boolean hasName() { - return genClient.cacheHasKey(CacheKey.name); - } - - /** Checks whether the 'serialNumber' field has been set, however the value could be null */ - public boolean hasSerialNumber() { - return genClient.cacheHasKey(CacheKey.serialNumber); - } - - /** Checks whether the 'applicationName' field has been set, however the value could be null */ - public boolean hasApplicationName() { - return genClient.cacheHasKey(CacheKey.applicationName); - } - - /** Checks whether the 'authenticationToken' field has been set, however the value could be null */ - public boolean hasAuthenticationToken() { - return genClient.cacheHasKey(CacheKey.authenticationToken); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'name'. - */ - public PairingRequestMessage setName(java.lang.String name) { - return genClient.setOther(name, CacheKey.name); - } - - /** - * Sets the field 'serialNumber'. - */ - public PairingRequestMessage setSerialNumber(java.lang.String serialNumber) { - return genClient.setOther(serialNumber, CacheKey.serialNumber); - } - - /** - * Sets the field 'applicationName'. - */ - public PairingRequestMessage setApplicationName(java.lang.String applicationName) { - return genClient.setOther(applicationName, CacheKey.applicationName); - } - - /** - * Sets the field 'authenticationToken'. - */ - public PairingRequestMessage setAuthenticationToken(java.lang.String authenticationToken) { - return genClient.setOther(authenticationToken, CacheKey.authenticationToken); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'name' field, the 'has' method for this field will now return false */ - public void clearName() { - genClient.clear(CacheKey.name); - } - /** Clears the 'serialNumber' field, the 'has' method for this field will now return false */ - public void clearSerialNumber() { - genClient.clear(CacheKey.serialNumber); - } - /** Clears the 'applicationName' field, the 'has' method for this field will now return false */ - public void clearApplicationName() { - genClient.clear(CacheKey.applicationName); - } - /** Clears the 'authenticationToken' field, the 'has' method for this field will now return false */ - public void clearAuthenticationToken() { - genClient.clear(CacheKey.authenticationToken); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public PairingRequestMessage copyChanges() { - PairingRequestMessage copy = new PairingRequestMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(PairingRequestMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new PairingRequestMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public PairingRequestMessage createFromParcel(android.os.Parcel in) { - PairingRequestMessage instance = new PairingRequestMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public PairingRequestMessage[] newArray(int size) { - return new PairingRequestMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public PairingRequestMessage create(org.json.JSONObject jsonObject) { - return new PairingRequestMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean NAME_IS_REQUIRED = false; - public static final boolean SERIALNUMBER_IS_REQUIRED = false; - public static final boolean APPLICATIONNAME_IS_REQUIRED = false; - public static final boolean AUTHENTICATIONTOKEN_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PairingResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PairingResponseMessage.java deleted file mode 100644 index d33c7df61..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PairingResponseMessage.java +++ /dev/null @@ -1,490 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getPairingState pairingState}
  • - *
  • {@link #getMillis millis}
  • - *
- */ -@SuppressWarnings("all") -public class PairingResponseMessage extends com.clover.sdk.v3.remotemessage.PairingRequestMessage { - - /** - * The state of the pairing flow - */ - public com.clover.sdk.v3.remotemessage.PairingState getPairingState() { - return genClient.cacheGet(CacheKey.pairingState); - } - - /** - * A timestamp of when the authentication token was obtained - */ - public java.lang.Long getMillis() { - return genClient.cacheGet(CacheKey.millis); - } - - /** - * The peripheral sends a pairing request containing the peripheral name - */ - @Override - public java.lang.String getName() { - return genClient.cacheGet(CacheKey.name); - } - - /** - * The peripheral serial number - */ - @Override - public java.lang.String getSerialNumber() { - return genClient.cacheGet(CacheKey.serialNumber); - } - - /** - * The name of the application the peripheral is associated with. This is the "resourceDescriptor" in the handshake - */ - @Override - public java.lang.String getApplicationName() { - return genClient.cacheGet(CacheKey.applicationName); - } - - /** - * The token, recognized by the specific device. - */ - @Override - public java.lang.String getAuthenticationToken() { - return genClient.cacheGet(CacheKey.authenticationToken); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - pairingState { - @Override - public Object extractValue(PairingResponseMessage instance) { - return instance.genClient.extractEnum("pairingState", com.clover.sdk.v3.remotemessage.PairingState.class); - } - }, - millis { - @Override - public Object extractValue(PairingResponseMessage instance) { - return instance.genClient.extractOther("millis", java.lang.Long.class); - } - }, - name { - @Override - public Object extractValue(PairingResponseMessage instance) { - return instance.genClient.extractOther("name", java.lang.String.class); - } - }, - serialNumber { - @Override - public Object extractValue(PairingResponseMessage instance) { - return instance.genClient.extractOther("serialNumber", java.lang.String.class); - } - }, - applicationName { - @Override - public Object extractValue(PairingResponseMessage instance) { - return instance.genClient.extractOther("applicationName", java.lang.String.class); - } - }, - authenticationToken { - @Override - public Object extractValue(PairingResponseMessage instance) { - return instance.genClient.extractOther("authenticationToken", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(PairingResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(PairingResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public PairingResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.PAIRING_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected PairingResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public PairingResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public PairingResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public PairingResponseMessage(PairingResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'pairingState' field is set and is not null */ - public boolean isNotNullPairingState() { - return genClient.cacheValueIsNotNull(CacheKey.pairingState); - } - - /** Checks whether the 'millis' field is set and is not null */ - public boolean isNotNullMillis() { - return genClient.cacheValueIsNotNull(CacheKey.millis); - } - - /** Checks whether the 'name' field is set and is not null */ - @Override - public boolean isNotNullName() { - return genClient.cacheValueIsNotNull(CacheKey.name); - } - - /** Checks whether the 'serialNumber' field is set and is not null */ - @Override - public boolean isNotNullSerialNumber() { - return genClient.cacheValueIsNotNull(CacheKey.serialNumber); - } - - /** Checks whether the 'applicationName' field is set and is not null */ - @Override - public boolean isNotNullApplicationName() { - return genClient.cacheValueIsNotNull(CacheKey.applicationName); - } - - /** Checks whether the 'authenticationToken' field is set and is not null */ - @Override - public boolean isNotNullAuthenticationToken() { - return genClient.cacheValueIsNotNull(CacheKey.authenticationToken); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'pairingState' field has been set, however the value could be null */ - public boolean hasPairingState() { - return genClient.cacheHasKey(CacheKey.pairingState); - } - - /** Checks whether the 'millis' field has been set, however the value could be null */ - public boolean hasMillis() { - return genClient.cacheHasKey(CacheKey.millis); - } - - /** Checks whether the 'name' field has been set, however the value could be null */ - @Override - public boolean hasName() { - return genClient.cacheHasKey(CacheKey.name); - } - - /** Checks whether the 'serialNumber' field has been set, however the value could be null */ - @Override - public boolean hasSerialNumber() { - return genClient.cacheHasKey(CacheKey.serialNumber); - } - - /** Checks whether the 'applicationName' field has been set, however the value could be null */ - @Override - public boolean hasApplicationName() { - return genClient.cacheHasKey(CacheKey.applicationName); - } - - /** Checks whether the 'authenticationToken' field has been set, however the value could be null */ - @Override - public boolean hasAuthenticationToken() { - return genClient.cacheHasKey(CacheKey.authenticationToken); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'pairingState'. - */ - public PairingResponseMessage setPairingState(com.clover.sdk.v3.remotemessage.PairingState pairingState) { - return genClient.setOther(pairingState, CacheKey.pairingState); - } - - /** - * Sets the field 'millis'. - */ - public PairingResponseMessage setMillis(java.lang.Long millis) { - return genClient.setOther(millis, CacheKey.millis); - } - - /** - * Sets the field 'name'. - */ - @Override - public PairingRequestMessage setName(java.lang.String name) { - return genClient.setOther(name, CacheKey.name); - } - - /** - * Sets the field 'serialNumber'. - */ - @Override - public PairingRequestMessage setSerialNumber(java.lang.String serialNumber) { - return genClient.setOther(serialNumber, CacheKey.serialNumber); - } - - /** - * Sets the field 'applicationName'. - */ - @Override - public PairingRequestMessage setApplicationName(java.lang.String applicationName) { - return genClient.setOther(applicationName, CacheKey.applicationName); - } - - /** - * Sets the field 'authenticationToken'. - */ - @Override - public PairingRequestMessage setAuthenticationToken(java.lang.String authenticationToken) { - return genClient.setOther(authenticationToken, CacheKey.authenticationToken); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'pairingState' field, the 'has' method for this field will now return false */ - public void clearPairingState() { - genClient.clear(CacheKey.pairingState); - } - /** Clears the 'millis' field, the 'has' method for this field will now return false */ - public void clearMillis() { - genClient.clear(CacheKey.millis); - } - /** Clears the 'name' field, the 'has' method for this field will now return false */ - @Override - public void clearName() { - genClient.clear(CacheKey.name); - } - /** Clears the 'serialNumber' field, the 'has' method for this field will now return false */ - @Override - public void clearSerialNumber() { - genClient.clear(CacheKey.serialNumber); - } - /** Clears the 'applicationName' field, the 'has' method for this field will now return false */ - @Override - public void clearApplicationName() { - genClient.clear(CacheKey.applicationName); - } - /** Clears the 'authenticationToken' field, the 'has' method for this field will now return false */ - @Override - public void clearAuthenticationToken() { - genClient.clear(CacheKey.authenticationToken); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public PairingResponseMessage copyChanges() { - PairingResponseMessage copy = new PairingResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(PairingResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new PairingResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public PairingResponseMessage createFromParcel(android.os.Parcel in) { - PairingResponseMessage instance = new PairingResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public PairingResponseMessage[] newArray(int size) { - return new PairingResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public PairingResponseMessage create(org.json.JSONObject jsonObject) { - return new PairingResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean PAIRINGSTATE_IS_REQUIRED = false; - public static final boolean MILLIS_IS_REQUIRED = false; - public static final boolean NAME_IS_REQUIRED = false; - public static final boolean SERIALNUMBER_IS_REQUIRED = false; - public static final boolean APPLICATIONNAME_IS_REQUIRED = false; - public static final boolean AUTHENTICATIONTOKEN_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PairingState.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PairingState.java deleted file mode 100644 index 83aa2898d..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PairingState.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import android.os.Parcelable; -import android.os.Parcel; - -/** - * This is an auto-generated Clover data enum. - */ -@SuppressWarnings("all") -public enum PairingState implements Parcelable { - UNINITIALIZED, PAIRED, FAILED, INITIAL; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(final Parcel dest, final int flags) { - dest.writeString(name()); - } - - public static final Creator CREATOR = new Creator() { - @Override - public PairingState createFromParcel(final Parcel source) { - return PairingState.valueOf(source.readString()); - } - - @Override - public PairingState[] newArray(final int size) { - return new PairingState[size]; - } - }; -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PartialAuthMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PartialAuthMessage.java deleted file mode 100644 index f30da5d9e..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PartialAuthMessage.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getPartialAuthAmount partialAuthAmount}
  • - *
- */ -@SuppressWarnings("all") -public class PartialAuthMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * Amount authorized - */ - public java.lang.Long getPartialAuthAmount() { - return genClient.cacheGet(CacheKey.partialAuthAmount); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - partialAuthAmount { - @Override - public Object extractValue(PartialAuthMessage instance) { - return instance.genClient.extractOther("partialAuthAmount", java.lang.Long.class); - } - }, - method { - @Override - public Object extractValue(PartialAuthMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(PartialAuthMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public PartialAuthMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.PARTIAL_AUTH); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected PartialAuthMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public PartialAuthMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public PartialAuthMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public PartialAuthMessage(PartialAuthMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'partialAuthAmount' field is set and is not null */ - public boolean isNotNullPartialAuthAmount() { - return genClient.cacheValueIsNotNull(CacheKey.partialAuthAmount); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'partialAuthAmount' field has been set, however the value could be null */ - public boolean hasPartialAuthAmount() { - return genClient.cacheHasKey(CacheKey.partialAuthAmount); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'partialAuthAmount'. - */ - public PartialAuthMessage setPartialAuthAmount(java.lang.Long partialAuthAmount) { - return genClient.setOther(partialAuthAmount, CacheKey.partialAuthAmount); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'partialAuthAmount' field, the 'has' method for this field will now return false */ - public void clearPartialAuthAmount() { - genClient.clear(CacheKey.partialAuthAmount); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public PartialAuthMessage copyChanges() { - PartialAuthMessage copy = new PartialAuthMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(PartialAuthMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new PartialAuthMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public PartialAuthMessage createFromParcel(android.os.Parcel in) { - PartialAuthMessage instance = new PartialAuthMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public PartialAuthMessage[] newArray(int size) { - return new PartialAuthMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public PartialAuthMessage create(org.json.JSONObject jsonObject) { - return new PartialAuthMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean PARTIALAUTHAMOUNT_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PayIntent.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PayIntent.java deleted file mode 100644 index ff5cdfb76..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PayIntent.java +++ /dev/null @@ -1,1327 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; -import com.clover.sdk.GenericParcelable; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getAction action}
  • - *
  • {@link #getAmount amount}
  • - *
  • {@link #getTippableAmount tippableAmount}
  • - *
  • {@link #getTipAmount tipAmount}
  • - *
  • {@link #getTaxAmount taxAmount}
  • - *
  • {@link #getOrderId orderId}
  • - *
  • {@link #getPaymentId paymentId}
  • - *
  • {@link #getEmployeeId employeeId}
  • - *
  • {@link #getTransactionType transactionType}
  • - *
  • {@link #getTaxableAmountRates taxableAmountRates}
  • - *
  • {@link #getServiceChargeAmount serviceChargeAmount}
  • - *
  • {@link #getIsDisableCashBack isDisableCashBack}
  • - *
  • {@link #getIsTesting isTesting}
  • - *
  • {@link #getCardEntryMethods cardEntryMethods}
  • - *
  • {@link #getVoiceAuthCode voiceAuthCode}
  • - *
  • {@link #getStreetAddress streetAddress}
  • - *
  • {@link #getPostalCode postalCode}
  • - *
  • {@link #getIsCardNotPresent isCardNotPresent}
  • - *
  • {@link #getCardDataMessage cardDataMessage}
  • - *
  • {@link #getRemotePrint remotePrint}
  • - *
  • {@link #getTransactionNo transactionNo}
  • - *
  • {@link #getIsForceSwipePinEntry isForceSwipePinEntry}
  • - *
  • {@link #getDisableRestartTransactionWhenFailed disableRestartTransactionWhenFailed}
  • - *
  • {@link #getExternalPaymentId externalPaymentId}
  • - *
  • {@link #getVaultedCard vaultedCard}
  • - *
  • {@link #getAllowOfflinePayment allowOfflinePayment}
  • - *
  • {@link #getApproveOfflinePaymentWithoutPrompt approveOfflinePaymentWithoutPrompt}
  • - *
  • {@link #getRequiresRemoteConfirmation requiresRemoteConfirmation}
  • - *
  • {@link #getApplicationTracking applicationTracking}
  • - *
  • {@link #getAllowPartialAuth allowPartialAuth}
  • - *
  • {@link #getGermanInfo germanInfo}
  • - *
  • {@link #getCashAdvanceCustomerIdentification cashAdvanceCustomerIdentification}
  • - *
  • {@link #getTransactionSettings transactionSettings}
  • - *
- */ -@SuppressWarnings("all") -public class PayIntent extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable { - - /** - * The action to fire in the device (com.clover.remote.protocol.action.START_REMOTE_PROTOCOL_PAY) - */ - public java.lang.String getAction() { - return genClient.cacheGet(CacheKey.action); - } - - /** - * Amount for transaction - */ - public java.lang.Long getAmount() { - return genClient.cacheGet(CacheKey.amount); - } - - /** - * Amount used when calculating on screen tips - */ - public java.lang.Long getTippableAmount() { - return genClient.cacheGet(CacheKey.tippableAmount); - } - - /** - * Amount paid in tips - */ - public java.lang.Long getTipAmount() { - return genClient.cacheGet(CacheKey.tipAmount); - } - - public java.lang.Long getTaxAmount() { - return genClient.cacheGet(CacheKey.taxAmount); - } - - /** - * Unique identifier for a order - */ - public java.lang.String getOrderId() { - return genClient.cacheGet(CacheKey.orderId); - } - - /** - * Unique identifier for a payment - */ - public java.lang.String getPaymentId() { - return genClient.cacheGet(CacheKey.paymentId); - } - - /** - * Unique identifier for a employee - */ - public java.lang.String getEmployeeId() { - return genClient.cacheGet(CacheKey.employeeId); - } - - public com.clover.sdk.v3.remotemessage.TransactionType getTransactionType() { - return genClient.cacheGet(CacheKey.transactionType); - } - - public java.util.List getTaxableAmountRates() { - return genClient.cacheGet(CacheKey.taxableAmountRates); - } - - public java.util.List getServiceChargeAmount() { - return genClient.cacheGet(CacheKey.serviceChargeAmount); - } - - /** - * If true, then cash back will not be offered. - */ - public java.lang.Boolean getIsDisableCashBack() { - return genClient.cacheGet(CacheKey.isDisableCashBack); - } - - public java.lang.Boolean getIsTesting() { - return genClient.cacheGet(CacheKey.isTesting); - } - - /** - * Allowed entry methods - */ - public java.lang.Integer getCardEntryMethods() { - return genClient.cacheGet(CacheKey.cardEntryMethods); - } - - public java.lang.String getVoiceAuthCode() { - return genClient.cacheGet(CacheKey.voiceAuthCode); - } - - public java.lang.String getStreetAddress() { - return genClient.cacheGet(CacheKey.streetAddress); - } - - public java.lang.String getPostalCode() { - return genClient.cacheGet(CacheKey.postalCode); - } - - public java.lang.Boolean getIsCardNotPresent() { - return genClient.cacheGet(CacheKey.isCardNotPresent); - } - - public java.lang.String getCardDataMessage() { - return genClient.cacheGet(CacheKey.cardDataMessage); - } - - /** - * If true, then the receiver of this message does NOT print - */ - public java.lang.Boolean getRemotePrint() { - return genClient.cacheGet(CacheKey.remotePrint); - } - - public java.lang.String getTransactionNo() { - return genClient.cacheGet(CacheKey.transactionNo); - } - - public java.lang.Boolean getIsForceSwipePinEntry() { - return genClient.cacheGet(CacheKey.isForceSwipePinEntry); - } - - public java.lang.Boolean getDisableRestartTransactionWhenFailed() { - return genClient.cacheGet(CacheKey.disableRestartTransactionWhenFailed); - } - - /** - * An id that allows an external system to link to a payment. - */ - public java.lang.String getExternalPaymentId() { - return genClient.cacheGet(CacheKey.externalPaymentId); - } - - public com.clover.sdk.v3.payments.VaultedCard getVaultedCard() { - return genClient.cacheGet(CacheKey.vaultedCard); - } - - public java.lang.Boolean getAllowOfflinePayment() { - return genClient.cacheGet(CacheKey.allowOfflinePayment); - } - - public java.lang.Boolean getApproveOfflinePaymentWithoutPrompt() { - return genClient.cacheGet(CacheKey.approveOfflinePaymentWithoutPrompt); - } - - public java.lang.Boolean getRequiresRemoteConfirmation() { - return genClient.cacheGet(CacheKey.requiresRemoteConfirmation); - } - - public com.clover.sdk.v3.apps.AppTracking getApplicationTracking() { - return genClient.cacheGet(CacheKey.applicationTracking); - } - - public java.lang.Boolean getAllowPartialAuth() { - return genClient.cacheGet(CacheKey.allowPartialAuth); - } - - public com.clover.sdk.v3.payments.GermanInfo getGermanInfo() { - return genClient.cacheGet(CacheKey.germanInfo); - } - - public com.clover.sdk.v3.payments.CashAdvanceCustomerIdentification getCashAdvanceCustomerIdentification() { - return genClient.cacheGet(CacheKey.cashAdvanceCustomerIdentification); - } - - public com.clover.sdk.v3.payments.TransactionSettings getTransactionSettings() { - return genClient.cacheGet(CacheKey.transactionSettings); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - action { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("action", java.lang.String.class); - } - }, - amount { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("amount", java.lang.Long.class); - } - }, - tippableAmount { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("tippableAmount", java.lang.Long.class); - } - }, - tipAmount { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("tipAmount", java.lang.Long.class); - } - }, - taxAmount { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("taxAmount", java.lang.Long.class); - } - }, - orderId { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("orderId", java.lang.String.class); - } - }, - paymentId { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("paymentId", java.lang.String.class); - } - }, - employeeId { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("employeeId", java.lang.String.class); - } - }, - transactionType { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractEnum("transactionType", com.clover.sdk.v3.remotemessage.TransactionType.class); - } - }, - taxableAmountRates { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractListRecord("taxableAmountRates", com.clover.sdk.v3.payments.TaxableAmountRate.JSON_CREATOR); - } - }, - serviceChargeAmount { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractListRecord("serviceChargeAmount", com.clover.sdk.v3.payments.ServiceChargeAmount.JSON_CREATOR); - } - }, - isDisableCashBack { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("isDisableCashBack", java.lang.Boolean.class); - } - }, - isTesting { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("isTesting", java.lang.Boolean.class); - } - }, - cardEntryMethods { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("cardEntryMethods", java.lang.Integer.class); - } - }, - voiceAuthCode { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("voiceAuthCode", java.lang.String.class); - } - }, - streetAddress { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("streetAddress", java.lang.String.class); - } - }, - postalCode { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("postalCode", java.lang.String.class); - } - }, - isCardNotPresent { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("isCardNotPresent", java.lang.Boolean.class); - } - }, - cardDataMessage { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("cardDataMessage", java.lang.String.class); - } - }, - remotePrint { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("remotePrint", java.lang.Boolean.class); - } - }, - transactionNo { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("transactionNo", java.lang.String.class); - } - }, - isForceSwipePinEntry { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("isForceSwipePinEntry", java.lang.Boolean.class); - } - }, - disableRestartTransactionWhenFailed { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("disableRestartTransactionWhenFailed", java.lang.Boolean.class); - } - }, - externalPaymentId { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("externalPaymentId", java.lang.String.class); - } - }, - vaultedCard { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractRecord("vaultedCard", com.clover.sdk.v3.payments.VaultedCard.JSON_CREATOR); - } - }, - allowOfflinePayment { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("allowOfflinePayment", java.lang.Boolean.class); - } - }, - approveOfflinePaymentWithoutPrompt { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("approveOfflinePaymentWithoutPrompt", java.lang.Boolean.class); - } - }, - requiresRemoteConfirmation { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("requiresRemoteConfirmation", java.lang.Boolean.class); - } - }, - applicationTracking { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractRecord("applicationTracking", com.clover.sdk.v3.apps.AppTracking.JSON_CREATOR); - } - }, - allowPartialAuth { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractOther("allowPartialAuth", java.lang.Boolean.class); - } - }, - germanInfo { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractRecord("germanInfo", com.clover.sdk.v3.payments.GermanInfo.JSON_CREATOR); - } - }, - cashAdvanceCustomerIdentification { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractRecord("cashAdvanceCustomerIdentification", com.clover.sdk.v3.payments.CashAdvanceCustomerIdentification.JSON_CREATOR); - } - }, - transactionSettings { - @Override - public Object extractValue(PayIntent instance) { - return instance.genClient.extractRecord("transactionSettings", com.clover.sdk.v3.payments.TransactionSettings.JSON_CREATOR); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public PayIntent() { - genClient = new GenericClient(this); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected PayIntent(boolean noInit) { - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public PayIntent(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public PayIntent(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public PayIntent(PayIntent src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - - genClient.validateLength(getOrderId(), 13); - - genClient.validateLength(getPaymentId(), 13); - - genClient.validateLength(getEmployeeId(), 13); - } - - /** Checks whether the 'action' field is set and is not null */ - public boolean isNotNullAction() { - return genClient.cacheValueIsNotNull(CacheKey.action); - } - - /** Checks whether the 'amount' field is set and is not null */ - public boolean isNotNullAmount() { - return genClient.cacheValueIsNotNull(CacheKey.amount); - } - - /** Checks whether the 'tippableAmount' field is set and is not null */ - public boolean isNotNullTippableAmount() { - return genClient.cacheValueIsNotNull(CacheKey.tippableAmount); - } - - /** Checks whether the 'tipAmount' field is set and is not null */ - public boolean isNotNullTipAmount() { - return genClient.cacheValueIsNotNull(CacheKey.tipAmount); - } - - /** Checks whether the 'taxAmount' field is set and is not null */ - public boolean isNotNullTaxAmount() { - return genClient.cacheValueIsNotNull(CacheKey.taxAmount); - } - - /** Checks whether the 'orderId' field is set and is not null */ - public boolean isNotNullOrderId() { - return genClient.cacheValueIsNotNull(CacheKey.orderId); - } - - /** Checks whether the 'paymentId' field is set and is not null */ - public boolean isNotNullPaymentId() { - return genClient.cacheValueIsNotNull(CacheKey.paymentId); - } - - /** Checks whether the 'employeeId' field is set and is not null */ - public boolean isNotNullEmployeeId() { - return genClient.cacheValueIsNotNull(CacheKey.employeeId); - } - - /** Checks whether the 'transactionType' field is set and is not null */ - public boolean isNotNullTransactionType() { - return genClient.cacheValueIsNotNull(CacheKey.transactionType); - } - - /** Checks whether the 'taxableAmountRates' field is set and is not null */ - public boolean isNotNullTaxableAmountRates() { - return genClient.cacheValueIsNotNull(CacheKey.taxableAmountRates); - } - - /** Checks whether the 'taxableAmountRates' field is set and is not null and is not empty */ - public boolean isNotEmptyTaxableAmountRates() { return isNotNullTaxableAmountRates() && !getTaxableAmountRates().isEmpty(); } - - /** Checks whether the 'serviceChargeAmount' field is set and is not null */ - public boolean isNotNullServiceChargeAmount() { - return genClient.cacheValueIsNotNull(CacheKey.serviceChargeAmount); - } - - /** Checks whether the 'serviceChargeAmount' field is set and is not null and is not empty */ - public boolean isNotEmptyServiceChargeAmount() { return isNotNullServiceChargeAmount() && !getServiceChargeAmount().isEmpty(); } - - /** Checks whether the 'isDisableCashBack' field is set and is not null */ - public boolean isNotNullIsDisableCashBack() { - return genClient.cacheValueIsNotNull(CacheKey.isDisableCashBack); - } - - /** Checks whether the 'isTesting' field is set and is not null */ - public boolean isNotNullIsTesting() { - return genClient.cacheValueIsNotNull(CacheKey.isTesting); - } - - /** Checks whether the 'cardEntryMethods' field is set and is not null */ - public boolean isNotNullCardEntryMethods() { - return genClient.cacheValueIsNotNull(CacheKey.cardEntryMethods); - } - - /** Checks whether the 'voiceAuthCode' field is set and is not null */ - public boolean isNotNullVoiceAuthCode() { - return genClient.cacheValueIsNotNull(CacheKey.voiceAuthCode); - } - - /** Checks whether the 'streetAddress' field is set and is not null */ - public boolean isNotNullStreetAddress() { - return genClient.cacheValueIsNotNull(CacheKey.streetAddress); - } - - /** Checks whether the 'postalCode' field is set and is not null */ - public boolean isNotNullPostalCode() { - return genClient.cacheValueIsNotNull(CacheKey.postalCode); - } - - /** Checks whether the 'isCardNotPresent' field is set and is not null */ - public boolean isNotNullIsCardNotPresent() { - return genClient.cacheValueIsNotNull(CacheKey.isCardNotPresent); - } - - /** Checks whether the 'cardDataMessage' field is set and is not null */ - public boolean isNotNullCardDataMessage() { - return genClient.cacheValueIsNotNull(CacheKey.cardDataMessage); - } - - /** Checks whether the 'remotePrint' field is set and is not null */ - public boolean isNotNullRemotePrint() { - return genClient.cacheValueIsNotNull(CacheKey.remotePrint); - } - - /** Checks whether the 'transactionNo' field is set and is not null */ - public boolean isNotNullTransactionNo() { - return genClient.cacheValueIsNotNull(CacheKey.transactionNo); - } - - /** Checks whether the 'isForceSwipePinEntry' field is set and is not null */ - public boolean isNotNullIsForceSwipePinEntry() { - return genClient.cacheValueIsNotNull(CacheKey.isForceSwipePinEntry); - } - - /** Checks whether the 'disableRestartTransactionWhenFailed' field is set and is not null */ - public boolean isNotNullDisableRestartTransactionWhenFailed() { - return genClient.cacheValueIsNotNull(CacheKey.disableRestartTransactionWhenFailed); - } - - /** Checks whether the 'externalPaymentId' field is set and is not null */ - public boolean isNotNullExternalPaymentId() { - return genClient.cacheValueIsNotNull(CacheKey.externalPaymentId); - } - - /** Checks whether the 'vaultedCard' field is set and is not null */ - public boolean isNotNullVaultedCard() { - return genClient.cacheValueIsNotNull(CacheKey.vaultedCard); - } - - /** Checks whether the 'allowOfflinePayment' field is set and is not null */ - public boolean isNotNullAllowOfflinePayment() { - return genClient.cacheValueIsNotNull(CacheKey.allowOfflinePayment); - } - - /** Checks whether the 'approveOfflinePaymentWithoutPrompt' field is set and is not null */ - public boolean isNotNullApproveOfflinePaymentWithoutPrompt() { - return genClient.cacheValueIsNotNull(CacheKey.approveOfflinePaymentWithoutPrompt); - } - - /** Checks whether the 'requiresRemoteConfirmation' field is set and is not null */ - public boolean isNotNullRequiresRemoteConfirmation() { - return genClient.cacheValueIsNotNull(CacheKey.requiresRemoteConfirmation); - } - - /** Checks whether the 'applicationTracking' field is set and is not null */ - public boolean isNotNullApplicationTracking() { - return genClient.cacheValueIsNotNull(CacheKey.applicationTracking); - } - - /** Checks whether the 'allowPartialAuth' field is set and is not null */ - public boolean isNotNullAllowPartialAuth() { - return genClient.cacheValueIsNotNull(CacheKey.allowPartialAuth); - } - - /** Checks whether the 'germanInfo' field is set and is not null */ - public boolean isNotNullGermanInfo() { - return genClient.cacheValueIsNotNull(CacheKey.germanInfo); - } - - /** Checks whether the 'cashAdvanceCustomerIdentification' field is set and is not null */ - public boolean isNotNullCashAdvanceCustomerIdentification() { - return genClient.cacheValueIsNotNull(CacheKey.cashAdvanceCustomerIdentification); - } - - /** Checks whether the 'transactionSettings' field is set and is not null */ - public boolean isNotNullTransactionSettings() { - return genClient.cacheValueIsNotNull(CacheKey.transactionSettings); - } - - - - /** Checks whether the 'action' field has been set, however the value could be null */ - public boolean hasAction() { - return genClient.cacheHasKey(CacheKey.action); - } - - /** Checks whether the 'amount' field has been set, however the value could be null */ - public boolean hasAmount() { - return genClient.cacheHasKey(CacheKey.amount); - } - - /** Checks whether the 'tippableAmount' field has been set, however the value could be null */ - public boolean hasTippableAmount() { - return genClient.cacheHasKey(CacheKey.tippableAmount); - } - - /** Checks whether the 'tipAmount' field has been set, however the value could be null */ - public boolean hasTipAmount() { - return genClient.cacheHasKey(CacheKey.tipAmount); - } - - /** Checks whether the 'taxAmount' field has been set, however the value could be null */ - public boolean hasTaxAmount() { - return genClient.cacheHasKey(CacheKey.taxAmount); - } - - /** Checks whether the 'orderId' field has been set, however the value could be null */ - public boolean hasOrderId() { - return genClient.cacheHasKey(CacheKey.orderId); - } - - /** Checks whether the 'paymentId' field has been set, however the value could be null */ - public boolean hasPaymentId() { - return genClient.cacheHasKey(CacheKey.paymentId); - } - - /** Checks whether the 'employeeId' field has been set, however the value could be null */ - public boolean hasEmployeeId() { - return genClient.cacheHasKey(CacheKey.employeeId); - } - - /** Checks whether the 'transactionType' field has been set, however the value could be null */ - public boolean hasTransactionType() { - return genClient.cacheHasKey(CacheKey.transactionType); - } - - /** Checks whether the 'taxableAmountRates' field has been set, however the value could be null */ - public boolean hasTaxableAmountRates() { - return genClient.cacheHasKey(CacheKey.taxableAmountRates); - } - - /** Checks whether the 'serviceChargeAmount' field has been set, however the value could be null */ - public boolean hasServiceChargeAmount() { - return genClient.cacheHasKey(CacheKey.serviceChargeAmount); - } - - /** Checks whether the 'isDisableCashBack' field has been set, however the value could be null */ - public boolean hasIsDisableCashBack() { - return genClient.cacheHasKey(CacheKey.isDisableCashBack); - } - - /** Checks whether the 'isTesting' field has been set, however the value could be null */ - public boolean hasIsTesting() { - return genClient.cacheHasKey(CacheKey.isTesting); - } - - /** Checks whether the 'cardEntryMethods' field has been set, however the value could be null */ - public boolean hasCardEntryMethods() { - return genClient.cacheHasKey(CacheKey.cardEntryMethods); - } - - /** Checks whether the 'voiceAuthCode' field has been set, however the value could be null */ - public boolean hasVoiceAuthCode() { - return genClient.cacheHasKey(CacheKey.voiceAuthCode); - } - - /** Checks whether the 'streetAddress' field has been set, however the value could be null */ - public boolean hasStreetAddress() { - return genClient.cacheHasKey(CacheKey.streetAddress); - } - - /** Checks whether the 'postalCode' field has been set, however the value could be null */ - public boolean hasPostalCode() { - return genClient.cacheHasKey(CacheKey.postalCode); - } - - /** Checks whether the 'isCardNotPresent' field has been set, however the value could be null */ - public boolean hasIsCardNotPresent() { - return genClient.cacheHasKey(CacheKey.isCardNotPresent); - } - - /** Checks whether the 'cardDataMessage' field has been set, however the value could be null */ - public boolean hasCardDataMessage() { - return genClient.cacheHasKey(CacheKey.cardDataMessage); - } - - /** Checks whether the 'remotePrint' field has been set, however the value could be null */ - public boolean hasRemotePrint() { - return genClient.cacheHasKey(CacheKey.remotePrint); - } - - /** Checks whether the 'transactionNo' field has been set, however the value could be null */ - public boolean hasTransactionNo() { - return genClient.cacheHasKey(CacheKey.transactionNo); - } - - /** Checks whether the 'isForceSwipePinEntry' field has been set, however the value could be null */ - public boolean hasIsForceSwipePinEntry() { - return genClient.cacheHasKey(CacheKey.isForceSwipePinEntry); - } - - /** Checks whether the 'disableRestartTransactionWhenFailed' field has been set, however the value could be null */ - public boolean hasDisableRestartTransactionWhenFailed() { - return genClient.cacheHasKey(CacheKey.disableRestartTransactionWhenFailed); - } - - /** Checks whether the 'externalPaymentId' field has been set, however the value could be null */ - public boolean hasExternalPaymentId() { - return genClient.cacheHasKey(CacheKey.externalPaymentId); - } - - /** Checks whether the 'vaultedCard' field has been set, however the value could be null */ - public boolean hasVaultedCard() { - return genClient.cacheHasKey(CacheKey.vaultedCard); - } - - /** Checks whether the 'allowOfflinePayment' field has been set, however the value could be null */ - public boolean hasAllowOfflinePayment() { - return genClient.cacheHasKey(CacheKey.allowOfflinePayment); - } - - /** Checks whether the 'approveOfflinePaymentWithoutPrompt' field has been set, however the value could be null */ - public boolean hasApproveOfflinePaymentWithoutPrompt() { - return genClient.cacheHasKey(CacheKey.approveOfflinePaymentWithoutPrompt); - } - - /** Checks whether the 'requiresRemoteConfirmation' field has been set, however the value could be null */ - public boolean hasRequiresRemoteConfirmation() { - return genClient.cacheHasKey(CacheKey.requiresRemoteConfirmation); - } - - /** Checks whether the 'applicationTracking' field has been set, however the value could be null */ - public boolean hasApplicationTracking() { - return genClient.cacheHasKey(CacheKey.applicationTracking); - } - - /** Checks whether the 'allowPartialAuth' field has been set, however the value could be null */ - public boolean hasAllowPartialAuth() { - return genClient.cacheHasKey(CacheKey.allowPartialAuth); - } - - /** Checks whether the 'germanInfo' field has been set, however the value could be null */ - public boolean hasGermanInfo() { - return genClient.cacheHasKey(CacheKey.germanInfo); - } - - /** Checks whether the 'cashAdvanceCustomerIdentification' field has been set, however the value could be null */ - public boolean hasCashAdvanceCustomerIdentification() { - return genClient.cacheHasKey(CacheKey.cashAdvanceCustomerIdentification); - } - - /** Checks whether the 'transactionSettings' field has been set, however the value could be null */ - public boolean hasTransactionSettings() { - return genClient.cacheHasKey(CacheKey.transactionSettings); - } - - - /** - * Sets the field 'action'. - */ - public PayIntent setAction(java.lang.String action) { - return genClient.setOther(action, CacheKey.action); - } - - /** - * Sets the field 'amount'. - */ - public PayIntent setAmount(java.lang.Long amount) { - return genClient.setOther(amount, CacheKey.amount); - } - - /** - * Sets the field 'tippableAmount'. - */ - public PayIntent setTippableAmount(java.lang.Long tippableAmount) { - return genClient.setOther(tippableAmount, CacheKey.tippableAmount); - } - - /** - * Sets the field 'tipAmount'. - */ - public PayIntent setTipAmount(java.lang.Long tipAmount) { - return genClient.setOther(tipAmount, CacheKey.tipAmount); - } - - /** - * Sets the field 'taxAmount'. - */ - public PayIntent setTaxAmount(java.lang.Long taxAmount) { - return genClient.setOther(taxAmount, CacheKey.taxAmount); - } - - /** - * Sets the field 'orderId'. - */ - public PayIntent setOrderId(java.lang.String orderId) { - return genClient.setOther(orderId, CacheKey.orderId); - } - - /** - * Sets the field 'paymentId'. - */ - public PayIntent setPaymentId(java.lang.String paymentId) { - return genClient.setOther(paymentId, CacheKey.paymentId); - } - - /** - * Sets the field 'employeeId'. - */ - public PayIntent setEmployeeId(java.lang.String employeeId) { - return genClient.setOther(employeeId, CacheKey.employeeId); - } - - /** - * Sets the field 'transactionType'. - */ - public PayIntent setTransactionType(com.clover.sdk.v3.remotemessage.TransactionType transactionType) { - return genClient.setOther(transactionType, CacheKey.transactionType); - } - - /** - * Sets the field 'taxableAmountRates'. - * - * Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will. - */ - public PayIntent setTaxableAmountRates(java.util.List taxableAmountRates) { - return genClient.setArrayRecord(taxableAmountRates, CacheKey.taxableAmountRates); - } - - /** - * Sets the field 'serviceChargeAmount'. - * - * Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will. - */ - public PayIntent setServiceChargeAmount(java.util.List serviceChargeAmount) { - return genClient.setArrayRecord(serviceChargeAmount, CacheKey.serviceChargeAmount); - } - - /** - * Sets the field 'isDisableCashBack'. - */ - public PayIntent setIsDisableCashBack(java.lang.Boolean isDisableCashBack) { - return genClient.setOther(isDisableCashBack, CacheKey.isDisableCashBack); - } - - /** - * Sets the field 'isTesting'. - */ - public PayIntent setIsTesting(java.lang.Boolean isTesting) { - return genClient.setOther(isTesting, CacheKey.isTesting); - } - - /** - * Sets the field 'cardEntryMethods'. - */ - public PayIntent setCardEntryMethods(java.lang.Integer cardEntryMethods) { - return genClient.setOther(cardEntryMethods, CacheKey.cardEntryMethods); - } - - /** - * Sets the field 'voiceAuthCode'. - */ - public PayIntent setVoiceAuthCode(java.lang.String voiceAuthCode) { - return genClient.setOther(voiceAuthCode, CacheKey.voiceAuthCode); - } - - /** - * Sets the field 'streetAddress'. - */ - public PayIntent setStreetAddress(java.lang.String streetAddress) { - return genClient.setOther(streetAddress, CacheKey.streetAddress); - } - - /** - * Sets the field 'postalCode'. - */ - public PayIntent setPostalCode(java.lang.String postalCode) { - return genClient.setOther(postalCode, CacheKey.postalCode); - } - - /** - * Sets the field 'isCardNotPresent'. - */ - public PayIntent setIsCardNotPresent(java.lang.Boolean isCardNotPresent) { - return genClient.setOther(isCardNotPresent, CacheKey.isCardNotPresent); - } - - /** - * Sets the field 'cardDataMessage'. - */ - public PayIntent setCardDataMessage(java.lang.String cardDataMessage) { - return genClient.setOther(cardDataMessage, CacheKey.cardDataMessage); - } - - /** - * Sets the field 'remotePrint'. - */ - public PayIntent setRemotePrint(java.lang.Boolean remotePrint) { - return genClient.setOther(remotePrint, CacheKey.remotePrint); - } - - /** - * Sets the field 'transactionNo'. - */ - public PayIntent setTransactionNo(java.lang.String transactionNo) { - return genClient.setOther(transactionNo, CacheKey.transactionNo); - } - - /** - * Sets the field 'isForceSwipePinEntry'. - */ - public PayIntent setIsForceSwipePinEntry(java.lang.Boolean isForceSwipePinEntry) { - return genClient.setOther(isForceSwipePinEntry, CacheKey.isForceSwipePinEntry); - } - - /** - * Sets the field 'disableRestartTransactionWhenFailed'. - */ - public PayIntent setDisableRestartTransactionWhenFailed(java.lang.Boolean disableRestartTransactionWhenFailed) { - return genClient.setOther(disableRestartTransactionWhenFailed, CacheKey.disableRestartTransactionWhenFailed); - } - - /** - * Sets the field 'externalPaymentId'. - */ - public PayIntent setExternalPaymentId(java.lang.String externalPaymentId) { - return genClient.setOther(externalPaymentId, CacheKey.externalPaymentId); - } - - /** - * Sets the field 'vaultedCard'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public PayIntent setVaultedCard(com.clover.sdk.v3.payments.VaultedCard vaultedCard) { - return genClient.setRecord(vaultedCard, CacheKey.vaultedCard); - } - - /** - * Sets the field 'allowOfflinePayment'. - */ - public PayIntent setAllowOfflinePayment(java.lang.Boolean allowOfflinePayment) { - return genClient.setOther(allowOfflinePayment, CacheKey.allowOfflinePayment); - } - - /** - * Sets the field 'approveOfflinePaymentWithoutPrompt'. - */ - public PayIntent setApproveOfflinePaymentWithoutPrompt(java.lang.Boolean approveOfflinePaymentWithoutPrompt) { - return genClient.setOther(approveOfflinePaymentWithoutPrompt, CacheKey.approveOfflinePaymentWithoutPrompt); - } - - /** - * Sets the field 'requiresRemoteConfirmation'. - */ - public PayIntent setRequiresRemoteConfirmation(java.lang.Boolean requiresRemoteConfirmation) { - return genClient.setOther(requiresRemoteConfirmation, CacheKey.requiresRemoteConfirmation); - } - - /** - * Sets the field 'applicationTracking'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public PayIntent setApplicationTracking(com.clover.sdk.v3.apps.AppTracking applicationTracking) { - return genClient.setRecord(applicationTracking, CacheKey.applicationTracking); - } - - /** - * Sets the field 'allowPartialAuth'. - */ - public PayIntent setAllowPartialAuth(java.lang.Boolean allowPartialAuth) { - return genClient.setOther(allowPartialAuth, CacheKey.allowPartialAuth); - } - - /** - * Sets the field 'germanInfo'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public PayIntent setGermanInfo(com.clover.sdk.v3.payments.GermanInfo germanInfo) { - return genClient.setRecord(germanInfo, CacheKey.germanInfo); - } - - /** - * Sets the field 'cashAdvanceCustomerIdentification'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public PayIntent setCashAdvanceCustomerIdentification(com.clover.sdk.v3.payments.CashAdvanceCustomerIdentification cashAdvanceCustomerIdentification) { - return genClient.setRecord(cashAdvanceCustomerIdentification, CacheKey.cashAdvanceCustomerIdentification); - } - - /** - * Sets the field 'transactionSettings'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public PayIntent setTransactionSettings(com.clover.sdk.v3.payments.TransactionSettings transactionSettings) { - return genClient.setRecord(transactionSettings, CacheKey.transactionSettings); - } - - - /** Clears the 'action' field, the 'has' method for this field will now return false */ - public void clearAction() { - genClient.clear(CacheKey.action); - } - /** Clears the 'amount' field, the 'has' method for this field will now return false */ - public void clearAmount() { - genClient.clear(CacheKey.amount); - } - /** Clears the 'tippableAmount' field, the 'has' method for this field will now return false */ - public void clearTippableAmount() { - genClient.clear(CacheKey.tippableAmount); - } - /** Clears the 'tipAmount' field, the 'has' method for this field will now return false */ - public void clearTipAmount() { - genClient.clear(CacheKey.tipAmount); - } - /** Clears the 'taxAmount' field, the 'has' method for this field will now return false */ - public void clearTaxAmount() { - genClient.clear(CacheKey.taxAmount); - } - /** Clears the 'orderId' field, the 'has' method for this field will now return false */ - public void clearOrderId() { - genClient.clear(CacheKey.orderId); - } - /** Clears the 'paymentId' field, the 'has' method for this field will now return false */ - public void clearPaymentId() { - genClient.clear(CacheKey.paymentId); - } - /** Clears the 'employeeId' field, the 'has' method for this field will now return false */ - public void clearEmployeeId() { - genClient.clear(CacheKey.employeeId); - } - /** Clears the 'transactionType' field, the 'has' method for this field will now return false */ - public void clearTransactionType() { - genClient.clear(CacheKey.transactionType); - } - /** Clears the 'taxableAmountRates' field, the 'has' method for this field will now return false */ - public void clearTaxableAmountRates() { - genClient.clear(CacheKey.taxableAmountRates); - } - /** Clears the 'serviceChargeAmount' field, the 'has' method for this field will now return false */ - public void clearServiceChargeAmount() { - genClient.clear(CacheKey.serviceChargeAmount); - } - /** Clears the 'isDisableCashBack' field, the 'has' method for this field will now return false */ - public void clearIsDisableCashBack() { - genClient.clear(CacheKey.isDisableCashBack); - } - /** Clears the 'isTesting' field, the 'has' method for this field will now return false */ - public void clearIsTesting() { - genClient.clear(CacheKey.isTesting); - } - /** Clears the 'cardEntryMethods' field, the 'has' method for this field will now return false */ - public void clearCardEntryMethods() { - genClient.clear(CacheKey.cardEntryMethods); - } - /** Clears the 'voiceAuthCode' field, the 'has' method for this field will now return false */ - public void clearVoiceAuthCode() { - genClient.clear(CacheKey.voiceAuthCode); - } - /** Clears the 'streetAddress' field, the 'has' method for this field will now return false */ - public void clearStreetAddress() { - genClient.clear(CacheKey.streetAddress); - } - /** Clears the 'postalCode' field, the 'has' method for this field will now return false */ - public void clearPostalCode() { - genClient.clear(CacheKey.postalCode); - } - /** Clears the 'isCardNotPresent' field, the 'has' method for this field will now return false */ - public void clearIsCardNotPresent() { - genClient.clear(CacheKey.isCardNotPresent); - } - /** Clears the 'cardDataMessage' field, the 'has' method for this field will now return false */ - public void clearCardDataMessage() { - genClient.clear(CacheKey.cardDataMessage); - } - /** Clears the 'remotePrint' field, the 'has' method for this field will now return false */ - public void clearRemotePrint() { - genClient.clear(CacheKey.remotePrint); - } - /** Clears the 'transactionNo' field, the 'has' method for this field will now return false */ - public void clearTransactionNo() { - genClient.clear(CacheKey.transactionNo); - } - /** Clears the 'isForceSwipePinEntry' field, the 'has' method for this field will now return false */ - public void clearIsForceSwipePinEntry() { - genClient.clear(CacheKey.isForceSwipePinEntry); - } - /** Clears the 'disableRestartTransactionWhenFailed' field, the 'has' method for this field will now return false */ - public void clearDisableRestartTransactionWhenFailed() { - genClient.clear(CacheKey.disableRestartTransactionWhenFailed); - } - /** Clears the 'externalPaymentId' field, the 'has' method for this field will now return false */ - public void clearExternalPaymentId() { - genClient.clear(CacheKey.externalPaymentId); - } - /** Clears the 'vaultedCard' field, the 'has' method for this field will now return false */ - public void clearVaultedCard() { - genClient.clear(CacheKey.vaultedCard); - } - /** Clears the 'allowOfflinePayment' field, the 'has' method for this field will now return false */ - public void clearAllowOfflinePayment() { - genClient.clear(CacheKey.allowOfflinePayment); - } - /** Clears the 'approveOfflinePaymentWithoutPrompt' field, the 'has' method for this field will now return false */ - public void clearApproveOfflinePaymentWithoutPrompt() { - genClient.clear(CacheKey.approveOfflinePaymentWithoutPrompt); - } - /** Clears the 'requiresRemoteConfirmation' field, the 'has' method for this field will now return false */ - public void clearRequiresRemoteConfirmation() { - genClient.clear(CacheKey.requiresRemoteConfirmation); - } - /** Clears the 'applicationTracking' field, the 'has' method for this field will now return false */ - public void clearApplicationTracking() { - genClient.clear(CacheKey.applicationTracking); - } - /** Clears the 'allowPartialAuth' field, the 'has' method for this field will now return false */ - public void clearAllowPartialAuth() { - genClient.clear(CacheKey.allowPartialAuth); - } - /** Clears the 'germanInfo' field, the 'has' method for this field will now return false */ - public void clearGermanInfo() { - genClient.clear(CacheKey.germanInfo); - } - /** Clears the 'cashAdvanceCustomerIdentification' field, the 'has' method for this field will now return false */ - public void clearCashAdvanceCustomerIdentification() { - genClient.clear(CacheKey.cashAdvanceCustomerIdentification); - } - /** Clears the 'transactionSettings' field, the 'has' method for this field will now return false */ - public void clearTransactionSettings() { - genClient.clear(CacheKey.transactionSettings); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public PayIntent copyChanges() { - PayIntent copy = new PayIntent(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(PayIntent src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new PayIntent(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public PayIntent createFromParcel(android.os.Parcel in) { - PayIntent instance = new PayIntent(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public PayIntent[] newArray(int size) { - return new PayIntent[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public PayIntent create(org.json.JSONObject jsonObject) { - return new PayIntent(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean ACTION_IS_REQUIRED = false; - public static final boolean AMOUNT_IS_REQUIRED = false; - public static final boolean TIPPABLEAMOUNT_IS_REQUIRED = false; - public static final boolean TIPAMOUNT_IS_REQUIRED = false; - public static final boolean TAXAMOUNT_IS_REQUIRED = false; - public static final boolean ORDERID_IS_REQUIRED = false; - public static final long ORDERID_MAX_LEN = 13; - public static final boolean PAYMENTID_IS_REQUIRED = false; - public static final long PAYMENTID_MAX_LEN = 13; - public static final boolean EMPLOYEEID_IS_REQUIRED = false; - public static final long EMPLOYEEID_MAX_LEN = 13; - public static final boolean TRANSACTIONTYPE_IS_REQUIRED = false; - public static final boolean TAXABLEAMOUNTRATES_IS_REQUIRED = false; - public static final boolean SERVICECHARGEAMOUNT_IS_REQUIRED = false; - public static final boolean ISDISABLECASHBACK_IS_REQUIRED = false; - public static final boolean ISTESTING_IS_REQUIRED = false; - public static final boolean CARDENTRYMETHODS_IS_REQUIRED = false; - public static final boolean VOICEAUTHCODE_IS_REQUIRED = false; - public static final boolean STREETADDRESS_IS_REQUIRED = false; - public static final boolean POSTALCODE_IS_REQUIRED = false; - public static final boolean ISCARDNOTPRESENT_IS_REQUIRED = false; - public static final boolean CARDDATAMESSAGE_IS_REQUIRED = false; - public static final boolean REMOTEPRINT_IS_REQUIRED = false; - public static final boolean TRANSACTIONNO_IS_REQUIRED = false; - public static final boolean ISFORCESWIPEPINENTRY_IS_REQUIRED = false; - public static final boolean DISABLERESTARTTRANSACTIONWHENFAILED_IS_REQUIRED = false; - public static final boolean EXTERNALPAYMENTID_IS_REQUIRED = false; - public static final boolean VAULTEDCARD_IS_REQUIRED = false; - public static final boolean ALLOWOFFLINEPAYMENT_IS_REQUIRED = false; - public static final boolean APPROVEOFFLINEPAYMENTWITHOUTPROMPT_IS_REQUIRED = false; - public static final boolean REQUIRESREMOTECONFIRMATION_IS_REQUIRED = false; - public static final boolean APPLICATIONTRACKING_IS_REQUIRED = false; - public static final boolean ALLOWPARTIALAUTH_IS_REQUIRED = false; - public static final boolean GERMANINFO_IS_REQUIRED = false; - public static final boolean CASHADVANCECUSTOMERIDENTIFICATION_IS_REQUIRED = false; - public static final boolean TRANSACTIONSETTINGS_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PaymentConfirmedMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PaymentConfirmedMessage.java deleted file mode 100644 index fc72c185f..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PaymentConfirmedMessage.java +++ /dev/null @@ -1,296 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getPayment payment}
  • - *
- */ -@SuppressWarnings("all") -public class PaymentConfirmedMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * A payment - */ - public com.clover.sdk.v3.payments.Payment getPayment() { - return genClient.cacheGet(CacheKey.payment); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - payment { - @Override - public Object extractValue(PaymentConfirmedMessage instance) { - return instance.genClient.extractRecord("payment", com.clover.sdk.v3.payments.Payment.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(PaymentConfirmedMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(PaymentConfirmedMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public PaymentConfirmedMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.PAYMENT_CONFIRMED); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected PaymentConfirmedMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public PaymentConfirmedMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public PaymentConfirmedMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public PaymentConfirmedMessage(PaymentConfirmedMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'payment' field is set and is not null */ - public boolean isNotNullPayment() { - return genClient.cacheValueIsNotNull(CacheKey.payment); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'payment' field has been set, however the value could be null */ - public boolean hasPayment() { - return genClient.cacheHasKey(CacheKey.payment); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'payment'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public PaymentConfirmedMessage setPayment(com.clover.sdk.v3.payments.Payment payment) { - return genClient.setRecord(payment, CacheKey.payment); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'payment' field, the 'has' method for this field will now return false */ - public void clearPayment() { - genClient.clear(CacheKey.payment); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public PaymentConfirmedMessage copyChanges() { - PaymentConfirmedMessage copy = new PaymentConfirmedMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(PaymentConfirmedMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new PaymentConfirmedMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public PaymentConfirmedMessage createFromParcel(android.os.Parcel in) { - PaymentConfirmedMessage instance = new PaymentConfirmedMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public PaymentConfirmedMessage[] newArray(int size) { - return new PaymentConfirmedMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public PaymentConfirmedMessage create(org.json.JSONObject jsonObject) { - return new PaymentConfirmedMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean PAYMENT_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PaymentRejectedMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PaymentRejectedMessage.java deleted file mode 100644 index 6b2b09794..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PaymentRejectedMessage.java +++ /dev/null @@ -1,332 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getPayment payment}
  • - *
  • {@link #getVoidReason voidReason}
  • - *
- */ -@SuppressWarnings("all") -public class PaymentRejectedMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * A payment - */ - public com.clover.sdk.v3.payments.Payment getPayment() { - return genClient.cacheGet(CacheKey.payment); - } - - /** - * The reason the payment is being rejected - */ - public com.clover.sdk.v3.order.VoidReason getVoidReason() { - return genClient.cacheGet(CacheKey.voidReason); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - payment { - @Override - public Object extractValue(PaymentRejectedMessage instance) { - return instance.genClient.extractRecord("payment", com.clover.sdk.v3.payments.Payment.JSON_CREATOR); - } - }, - voidReason { - @Override - public Object extractValue(PaymentRejectedMessage instance) { - return instance.genClient.extractEnum("voidReason", com.clover.sdk.v3.order.VoidReason.class); - } - }, - method { - @Override - public Object extractValue(PaymentRejectedMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(PaymentRejectedMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public PaymentRejectedMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.PAYMENT_REJECTED); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected PaymentRejectedMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public PaymentRejectedMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public PaymentRejectedMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public PaymentRejectedMessage(PaymentRejectedMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'payment' field is set and is not null */ - public boolean isNotNullPayment() { - return genClient.cacheValueIsNotNull(CacheKey.payment); - } - - /** Checks whether the 'voidReason' field is set and is not null */ - public boolean isNotNullVoidReason() { - return genClient.cacheValueIsNotNull(CacheKey.voidReason); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'payment' field has been set, however the value could be null */ - public boolean hasPayment() { - return genClient.cacheHasKey(CacheKey.payment); - } - - /** Checks whether the 'voidReason' field has been set, however the value could be null */ - public boolean hasVoidReason() { - return genClient.cacheHasKey(CacheKey.voidReason); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'payment'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public PaymentRejectedMessage setPayment(com.clover.sdk.v3.payments.Payment payment) { - return genClient.setRecord(payment, CacheKey.payment); - } - - /** - * Sets the field 'voidReason'. - */ - public PaymentRejectedMessage setVoidReason(com.clover.sdk.v3.order.VoidReason voidReason) { - return genClient.setOther(voidReason, CacheKey.voidReason); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'payment' field, the 'has' method for this field will now return false */ - public void clearPayment() { - genClient.clear(CacheKey.payment); - } - /** Clears the 'voidReason' field, the 'has' method for this field will now return false */ - public void clearVoidReason() { - genClient.clear(CacheKey.voidReason); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public PaymentRejectedMessage copyChanges() { - PaymentRejectedMessage copy = new PaymentRejectedMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(PaymentRejectedMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new PaymentRejectedMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public PaymentRejectedMessage createFromParcel(android.os.Parcel in) { - PaymentRejectedMessage instance = new PaymentRejectedMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public PaymentRejectedMessage[] newArray(int size) { - return new PaymentRejectedMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public PaymentRejectedMessage create(org.json.JSONObject jsonObject) { - return new PaymentRejectedMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean PAYMENT_IS_REQUIRED = false; - public static final boolean VOIDREASON_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PaymentVoidedMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PaymentVoidedMessage.java deleted file mode 100644 index ecd3c92e6..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PaymentVoidedMessage.java +++ /dev/null @@ -1,329 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getPayment payment}
  • - *
  • {@link #getVoidReason voidReason}
  • - *
- */ -@SuppressWarnings("all") -public class PaymentVoidedMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * A payment - */ - public com.clover.sdk.v3.payments.Payment getPayment() { - return genClient.cacheGet(CacheKey.payment); - } - - public com.clover.sdk.v3.order.VoidReason getVoidReason() { - return genClient.cacheGet(CacheKey.voidReason); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - payment { - @Override - public Object extractValue(PaymentVoidedMessage instance) { - return instance.genClient.extractRecord("payment", com.clover.sdk.v3.payments.Payment.JSON_CREATOR); - } - }, - voidReason { - @Override - public Object extractValue(PaymentVoidedMessage instance) { - return instance.genClient.extractEnum("voidReason", com.clover.sdk.v3.order.VoidReason.class); - } - }, - method { - @Override - public Object extractValue(PaymentVoidedMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(PaymentVoidedMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public PaymentVoidedMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.PAYMENT_VOIDED); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected PaymentVoidedMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public PaymentVoidedMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public PaymentVoidedMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public PaymentVoidedMessage(PaymentVoidedMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'payment' field is set and is not null */ - public boolean isNotNullPayment() { - return genClient.cacheValueIsNotNull(CacheKey.payment); - } - - /** Checks whether the 'voidReason' field is set and is not null */ - public boolean isNotNullVoidReason() { - return genClient.cacheValueIsNotNull(CacheKey.voidReason); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'payment' field has been set, however the value could be null */ - public boolean hasPayment() { - return genClient.cacheHasKey(CacheKey.payment); - } - - /** Checks whether the 'voidReason' field has been set, however the value could be null */ - public boolean hasVoidReason() { - return genClient.cacheHasKey(CacheKey.voidReason); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'payment'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public PaymentVoidedMessage setPayment(com.clover.sdk.v3.payments.Payment payment) { - return genClient.setRecord(payment, CacheKey.payment); - } - - /** - * Sets the field 'voidReason'. - */ - public PaymentVoidedMessage setVoidReason(com.clover.sdk.v3.order.VoidReason voidReason) { - return genClient.setOther(voidReason, CacheKey.voidReason); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'payment' field, the 'has' method for this field will now return false */ - public void clearPayment() { - genClient.clear(CacheKey.payment); - } - /** Clears the 'voidReason' field, the 'has' method for this field will now return false */ - public void clearVoidReason() { - genClient.clear(CacheKey.voidReason); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public PaymentVoidedMessage copyChanges() { - PaymentVoidedMessage copy = new PaymentVoidedMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(PaymentVoidedMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new PaymentVoidedMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public PaymentVoidedMessage createFromParcel(android.os.Parcel in) { - PaymentVoidedMessage instance = new PaymentVoidedMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public PaymentVoidedMessage[] newArray(int size) { - return new PaymentVoidedMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public PaymentVoidedMessage create(org.json.JSONObject jsonObject) { - return new PaymentVoidedMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean PAYMENT_IS_REQUIRED = false; - public static final boolean VOIDREASON_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PrintJobStatusRequestMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PrintJobStatusRequestMessage.java deleted file mode 100644 index e33936bd3..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PrintJobStatusRequestMessage.java +++ /dev/null @@ -1,296 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- * Request to get the status of a print job. - *

- *

Fields

- *
    - *
  • {@link #getExternalPrintJobId externalPrintJobId}
  • - *
- */ -@SuppressWarnings("all") -public class PrintJobStatusRequestMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * External print job ID to retrieve status for - */ - public java.lang.String getExternalPrintJobId() { - return genClient.cacheGet(CacheKey.externalPrintJobId); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - externalPrintJobId { - @Override - public Object extractValue(PrintJobStatusRequestMessage instance) { - return instance.genClient.extractOther("externalPrintJobId", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(PrintJobStatusRequestMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(PrintJobStatusRequestMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public PrintJobStatusRequestMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.PRINT_JOB_STATUS_REQUEST); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected PrintJobStatusRequestMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public PrintJobStatusRequestMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public PrintJobStatusRequestMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public PrintJobStatusRequestMessage(PrintJobStatusRequestMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'externalPrintJobId' field is set and is not null */ - public boolean isNotNullExternalPrintJobId() { - return genClient.cacheValueIsNotNull(CacheKey.externalPrintJobId); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'externalPrintJobId' field has been set, however the value could be null */ - public boolean hasExternalPrintJobId() { - return genClient.cacheHasKey(CacheKey.externalPrintJobId); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'externalPrintJobId'. - */ - public PrintJobStatusRequestMessage setExternalPrintJobId(java.lang.String externalPrintJobId) { - return genClient.setOther(externalPrintJobId, CacheKey.externalPrintJobId); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'externalPrintJobId' field, the 'has' method for this field will now return false */ - public void clearExternalPrintJobId() { - genClient.clear(CacheKey.externalPrintJobId); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public PrintJobStatusRequestMessage copyChanges() { - PrintJobStatusRequestMessage copy = new PrintJobStatusRequestMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(PrintJobStatusRequestMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new PrintJobStatusRequestMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public PrintJobStatusRequestMessage createFromParcel(android.os.Parcel in) { - PrintJobStatusRequestMessage instance = new PrintJobStatusRequestMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public PrintJobStatusRequestMessage[] newArray(int size) { - return new PrintJobStatusRequestMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public PrintJobStatusRequestMessage create(org.json.JSONObject jsonObject) { - return new PrintJobStatusRequestMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean EXTERNALPRINTJOBID_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PrintJobStatusResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PrintJobStatusResponseMessage.java deleted file mode 100644 index 8885c3f96..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/PrintJobStatusResponseMessage.java +++ /dev/null @@ -1,332 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- * contains the status of the requested print job. - *

- *

Fields

- *
    - *
  • {@link #getExternalPrintJobId externalPrintJobId}
  • - *
  • {@link #getStatus status}
  • - *
- */ -@SuppressWarnings("all") -public class PrintJobStatusResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * External print job ID that status was retrieved for - */ - public java.lang.String getExternalPrintJobId() { - return genClient.cacheGet(CacheKey.externalPrintJobId); - } - - /** - * The current status of the requested print job - */ - public com.clover.sdk.v3.printer.PrintJobStatus getStatus() { - return genClient.cacheGet(CacheKey.status); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - externalPrintJobId { - @Override - public Object extractValue(PrintJobStatusResponseMessage instance) { - return instance.genClient.extractOther("externalPrintJobId", java.lang.String.class); - } - }, - status { - @Override - public Object extractValue(PrintJobStatusResponseMessage instance) { - return instance.genClient.extractEnum("status", com.clover.sdk.v3.printer.PrintJobStatus.class); - } - }, - method { - @Override - public Object extractValue(PrintJobStatusResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(PrintJobStatusResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public PrintJobStatusResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.PRINT_JOB_STATUS_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected PrintJobStatusResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public PrintJobStatusResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public PrintJobStatusResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public PrintJobStatusResponseMessage(PrintJobStatusResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'externalPrintJobId' field is set and is not null */ - public boolean isNotNullExternalPrintJobId() { - return genClient.cacheValueIsNotNull(CacheKey.externalPrintJobId); - } - - /** Checks whether the 'status' field is set and is not null */ - public boolean isNotNullStatus() { - return genClient.cacheValueIsNotNull(CacheKey.status); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'externalPrintJobId' field has been set, however the value could be null */ - public boolean hasExternalPrintJobId() { - return genClient.cacheHasKey(CacheKey.externalPrintJobId); - } - - /** Checks whether the 'status' field has been set, however the value could be null */ - public boolean hasStatus() { - return genClient.cacheHasKey(CacheKey.status); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'externalPrintJobId'. - */ - public PrintJobStatusResponseMessage setExternalPrintJobId(java.lang.String externalPrintJobId) { - return genClient.setOther(externalPrintJobId, CacheKey.externalPrintJobId); - } - - /** - * Sets the field 'status'. - */ - public PrintJobStatusResponseMessage setStatus(com.clover.sdk.v3.printer.PrintJobStatus status) { - return genClient.setOther(status, CacheKey.status); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'externalPrintJobId' field, the 'has' method for this field will now return false */ - public void clearExternalPrintJobId() { - genClient.clear(CacheKey.externalPrintJobId); - } - /** Clears the 'status' field, the 'has' method for this field will now return false */ - public void clearStatus() { - genClient.clear(CacheKey.status); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public PrintJobStatusResponseMessage copyChanges() { - PrintJobStatusResponseMessage copy = new PrintJobStatusResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(PrintJobStatusResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new PrintJobStatusResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public PrintJobStatusResponseMessage createFromParcel(android.os.Parcel in) { - PrintJobStatusResponseMessage instance = new PrintJobStatusResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public PrintJobStatusResponseMessage[] newArray(int size) { - return new PrintJobStatusResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public PrintJobStatusResponseMessage create(org.json.JSONObject jsonObject) { - return new PrintJobStatusResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean EXTERNALPRINTJOBID_IS_REQUIRED = false; - public static final boolean STATUS_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/QueryStatus.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/QueryStatus.java deleted file mode 100644 index af72baa16..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/QueryStatus.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import android.os.Parcelable; -import android.os.Parcel; - -/** - * This is an auto-generated Clover data enum. - */ -@SuppressWarnings("all") -public enum QueryStatus implements Parcelable { - FOUND, NOT_FOUND, IN_PROGRESS; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(final Parcel dest, final int flags) { - dest.writeString(name()); - } - - public static final Creator CREATOR = new Creator() { - @Override - public QueryStatus createFromParcel(final Parcel source) { - return QueryStatus.valueOf(source.readString()); - } - - @Override - public QueryStatus[] newArray(final int size) { - return new QueryStatus[size]; - } - }; -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/QueryStatusEnum.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/QueryStatusEnum.java deleted file mode 100644 index 3c03c2630..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/QueryStatusEnum.java +++ /dev/null @@ -1,209 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; -import com.clover.sdk.GenericParcelable; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getQueryStatus queryStatus}
  • - *
- */ -@SuppressWarnings("all") -public class QueryStatusEnum extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable { - - public com.clover.sdk.v3.remotemessage.QueryStatus getQueryStatus() { - return genClient.cacheGet(CacheKey.queryStatus); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - queryStatus { - @Override - public Object extractValue(QueryStatusEnum instance) { - return instance.genClient.extractEnum("queryStatus", com.clover.sdk.v3.remotemessage.QueryStatus.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public QueryStatusEnum() { - genClient = new GenericClient(this); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected QueryStatusEnum(boolean noInit) { - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public QueryStatusEnum(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public QueryStatusEnum(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public QueryStatusEnum(QueryStatusEnum src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'queryStatus' field is set and is not null */ - public boolean isNotNullQueryStatus() { - return genClient.cacheValueIsNotNull(CacheKey.queryStatus); - } - - - - /** Checks whether the 'queryStatus' field has been set, however the value could be null */ - public boolean hasQueryStatus() { - return genClient.cacheHasKey(CacheKey.queryStatus); - } - - - /** - * Sets the field 'queryStatus'. - */ - public QueryStatusEnum setQueryStatus(com.clover.sdk.v3.remotemessage.QueryStatus queryStatus) { - return genClient.setOther(queryStatus, CacheKey.queryStatus); - } - - - /** Clears the 'queryStatus' field, the 'has' method for this field will now return false */ - public void clearQueryStatus() { - genClient.clear(CacheKey.queryStatus); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public QueryStatusEnum copyChanges() { - QueryStatusEnum copy = new QueryStatusEnum(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(QueryStatusEnum src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new QueryStatusEnum(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public QueryStatusEnum createFromParcel(android.os.Parcel in) { - QueryStatusEnum instance = new QueryStatusEnum(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public QueryStatusEnum[] newArray(int size) { - return new QueryStatusEnum[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public QueryStatusEnum create(org.json.JSONObject jsonObject) { - return new QueryStatusEnum(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean QUERYSTATUS_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RefundRequestMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RefundRequestMessage.java deleted file mode 100644 index 4fff4bc9f..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RefundRequestMessage.java +++ /dev/null @@ -1,474 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getFullRefund fullRefund}
  • - *
  • {@link #getAmount amount}
  • - *
  • {@link #getOrderId orderId}
  • - *
  • {@link #getPaymentId paymentId}
  • - *
  • {@link #getDisableCloverPrinting disableCloverPrinting}
  • - *
  • {@link #getDisableReceiptSelection disableReceiptSelection}
  • - *
- */ -@SuppressWarnings("all") -public class RefundRequestMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * If true, then it is a full refund. The amount will be ignored. - */ - public java.lang.Boolean getFullRefund() { - return genClient.cacheGet(CacheKey.fullRefund); - } - - /** - * Amount of refund. Used in partial refunds. - */ - public java.lang.Long getAmount() { - return genClient.cacheGet(CacheKey.amount); - } - - /** - * Unique identifier for a order - */ - public java.lang.String getOrderId() { - return genClient.cacheGet(CacheKey.orderId); - } - - /** - * Unique identifier for a payment - */ - public java.lang.String getPaymentId() { - return genClient.cacheGet(CacheKey.paymentId); - } - - public java.lang.Boolean getDisableCloverPrinting() { - return genClient.cacheGet(CacheKey.disableCloverPrinting); - } - - public java.lang.Boolean getDisableReceiptSelection() { - return genClient.cacheGet(CacheKey.disableReceiptSelection); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - fullRefund { - @Override - public Object extractValue(RefundRequestMessage instance) { - return instance.genClient.extractOther("fullRefund", java.lang.Boolean.class); - } - }, - amount { - @Override - public Object extractValue(RefundRequestMessage instance) { - return instance.genClient.extractOther("amount", java.lang.Long.class); - } - }, - orderId { - @Override - public Object extractValue(RefundRequestMessage instance) { - return instance.genClient.extractOther("orderId", java.lang.String.class); - } - }, - paymentId { - @Override - public Object extractValue(RefundRequestMessage instance) { - return instance.genClient.extractOther("paymentId", java.lang.String.class); - } - }, - disableCloverPrinting { - @Override - public Object extractValue(RefundRequestMessage instance) { - return instance.genClient.extractOther("disableCloverPrinting", java.lang.Boolean.class); - } - }, - disableReceiptSelection { - @Override - public Object extractValue(RefundRequestMessage instance) { - return instance.genClient.extractOther("disableReceiptSelection", java.lang.Boolean.class); - } - }, - method { - @Override - public Object extractValue(RefundRequestMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(RefundRequestMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public RefundRequestMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.REFUND_REQUEST); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected RefundRequestMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public RefundRequestMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public RefundRequestMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public RefundRequestMessage(RefundRequestMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - - genClient.validateLength(getOrderId(), 13); - - genClient.validateLength(getPaymentId(), 13); - } - - /** Checks whether the 'fullRefund' field is set and is not null */ - public boolean isNotNullFullRefund() { - return genClient.cacheValueIsNotNull(CacheKey.fullRefund); - } - - /** Checks whether the 'amount' field is set and is not null */ - public boolean isNotNullAmount() { - return genClient.cacheValueIsNotNull(CacheKey.amount); - } - - /** Checks whether the 'orderId' field is set and is not null */ - public boolean isNotNullOrderId() { - return genClient.cacheValueIsNotNull(CacheKey.orderId); - } - - /** Checks whether the 'paymentId' field is set and is not null */ - public boolean isNotNullPaymentId() { - return genClient.cacheValueIsNotNull(CacheKey.paymentId); - } - - /** Checks whether the 'disableCloverPrinting' field is set and is not null */ - public boolean isNotNullDisableCloverPrinting() { - return genClient.cacheValueIsNotNull(CacheKey.disableCloverPrinting); - } - - /** Checks whether the 'disableReceiptSelection' field is set and is not null */ - public boolean isNotNullDisableReceiptSelection() { - return genClient.cacheValueIsNotNull(CacheKey.disableReceiptSelection); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'fullRefund' field has been set, however the value could be null */ - public boolean hasFullRefund() { - return genClient.cacheHasKey(CacheKey.fullRefund); - } - - /** Checks whether the 'amount' field has been set, however the value could be null */ - public boolean hasAmount() { - return genClient.cacheHasKey(CacheKey.amount); - } - - /** Checks whether the 'orderId' field has been set, however the value could be null */ - public boolean hasOrderId() { - return genClient.cacheHasKey(CacheKey.orderId); - } - - /** Checks whether the 'paymentId' field has been set, however the value could be null */ - public boolean hasPaymentId() { - return genClient.cacheHasKey(CacheKey.paymentId); - } - - /** Checks whether the 'disableCloverPrinting' field has been set, however the value could be null */ - public boolean hasDisableCloverPrinting() { - return genClient.cacheHasKey(CacheKey.disableCloverPrinting); - } - - /** Checks whether the 'disableReceiptSelection' field has been set, however the value could be null */ - public boolean hasDisableReceiptSelection() { - return genClient.cacheHasKey(CacheKey.disableReceiptSelection); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'fullRefund'. - */ - public RefundRequestMessage setFullRefund(java.lang.Boolean fullRefund) { - return genClient.setOther(fullRefund, CacheKey.fullRefund); - } - - /** - * Sets the field 'amount'. - */ - public RefundRequestMessage setAmount(java.lang.Long amount) { - return genClient.setOther(amount, CacheKey.amount); - } - - /** - * Sets the field 'orderId'. - */ - public RefundRequestMessage setOrderId(java.lang.String orderId) { - return genClient.setOther(orderId, CacheKey.orderId); - } - - /** - * Sets the field 'paymentId'. - */ - public RefundRequestMessage setPaymentId(java.lang.String paymentId) { - return genClient.setOther(paymentId, CacheKey.paymentId); - } - - /** - * Sets the field 'disableCloverPrinting'. - */ - public RefundRequestMessage setDisableCloverPrinting(java.lang.Boolean disableCloverPrinting) { - return genClient.setOther(disableCloverPrinting, CacheKey.disableCloverPrinting); - } - - /** - * Sets the field 'disableReceiptSelection'. - */ - public RefundRequestMessage setDisableReceiptSelection(java.lang.Boolean disableReceiptSelection) { - return genClient.setOther(disableReceiptSelection, CacheKey.disableReceiptSelection); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'fullRefund' field, the 'has' method for this field will now return false */ - public void clearFullRefund() { - genClient.clear(CacheKey.fullRefund); - } - /** Clears the 'amount' field, the 'has' method for this field will now return false */ - public void clearAmount() { - genClient.clear(CacheKey.amount); - } - /** Clears the 'orderId' field, the 'has' method for this field will now return false */ - public void clearOrderId() { - genClient.clear(CacheKey.orderId); - } - /** Clears the 'paymentId' field, the 'has' method for this field will now return false */ - public void clearPaymentId() { - genClient.clear(CacheKey.paymentId); - } - /** Clears the 'disableCloverPrinting' field, the 'has' method for this field will now return false */ - public void clearDisableCloverPrinting() { - genClient.clear(CacheKey.disableCloverPrinting); - } - /** Clears the 'disableReceiptSelection' field, the 'has' method for this field will now return false */ - public void clearDisableReceiptSelection() { - genClient.clear(CacheKey.disableReceiptSelection); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public RefundRequestMessage copyChanges() { - RefundRequestMessage copy = new RefundRequestMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(RefundRequestMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new RefundRequestMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public RefundRequestMessage createFromParcel(android.os.Parcel in) { - RefundRequestMessage instance = new RefundRequestMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public RefundRequestMessage[] newArray(int size) { - return new RefundRequestMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public RefundRequestMessage create(org.json.JSONObject jsonObject) { - return new RefundRequestMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean FULLREFUND_IS_REQUIRED = false; - public static final boolean AMOUNT_IS_REQUIRED = false; - public static final boolean ORDERID_IS_REQUIRED = false; - public static final long ORDERID_MAX_LEN = 13; - public static final boolean PAYMENTID_IS_REQUIRED = false; - public static final long PAYMENTID_MAX_LEN = 13; - public static final boolean DISABLECLOVERPRINTING_IS_REQUIRED = false; - public static final boolean DISABLERECEIPTSELECTION_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RefundResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RefundResponseMessage.java deleted file mode 100644 index f918c0254..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RefundResponseMessage.java +++ /dev/null @@ -1,482 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getOrderId orderId}
  • - *
  • {@link #getPaymentId paymentId}
  • - *
  • {@link #getRefund refund}
  • - *
  • {@link #getReason reason}
  • - *
  • {@link #getMessage message}
  • - *
  • {@link #getCode code}
  • - *
- */ -@SuppressWarnings("all") -public class RefundResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * Unique identifier for a order - */ - public java.lang.String getOrderId() { - return genClient.cacheGet(CacheKey.orderId); - } - - /** - * Unique identifier for a payment - */ - public java.lang.String getPaymentId() { - return genClient.cacheGet(CacheKey.paymentId); - } - - /** - * The refund - */ - public com.clover.sdk.v3.payments.Refund getRefund() { - return genClient.cacheGet(CacheKey.refund); - } - - /** - * Detail code if an error is encountered - */ - public com.clover.sdk.v3.remotemessage.ErrorCode getReason() { - return genClient.cacheGet(CacheKey.reason); - } - - /** - * Detail message - */ - public java.lang.String getMessage() { - return genClient.cacheGet(CacheKey.message); - } - - /** - * Transaction state (success|fail) - */ - public com.clover.sdk.v3.remotemessage.TxState getCode() { - return genClient.cacheGet(CacheKey.code); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - orderId { - @Override - public Object extractValue(RefundResponseMessage instance) { - return instance.genClient.extractOther("orderId", java.lang.String.class); - } - }, - paymentId { - @Override - public Object extractValue(RefundResponseMessage instance) { - return instance.genClient.extractOther("paymentId", java.lang.String.class); - } - }, - refund { - @Override - public Object extractValue(RefundResponseMessage instance) { - return instance.genClient.extractRecord("refund", com.clover.sdk.v3.payments.Refund.JSON_CREATOR); - } - }, - reason { - @Override - public Object extractValue(RefundResponseMessage instance) { - return instance.genClient.extractEnum("reason", com.clover.sdk.v3.remotemessage.ErrorCode.class); - } - }, - message { - @Override - public Object extractValue(RefundResponseMessage instance) { - return instance.genClient.extractOther("message", java.lang.String.class); - } - }, - code { - @Override - public Object extractValue(RefundResponseMessage instance) { - return instance.genClient.extractEnum("code", com.clover.sdk.v3.remotemessage.TxState.class); - } - }, - method { - @Override - public Object extractValue(RefundResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(RefundResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public RefundResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.REFUND_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected RefundResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public RefundResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public RefundResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public RefundResponseMessage(RefundResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - - genClient.validateLength(getOrderId(), 13); - - genClient.validateLength(getPaymentId(), 13); - } - - /** Checks whether the 'orderId' field is set and is not null */ - public boolean isNotNullOrderId() { - return genClient.cacheValueIsNotNull(CacheKey.orderId); - } - - /** Checks whether the 'paymentId' field is set and is not null */ - public boolean isNotNullPaymentId() { - return genClient.cacheValueIsNotNull(CacheKey.paymentId); - } - - /** Checks whether the 'refund' field is set and is not null */ - public boolean isNotNullRefund() { - return genClient.cacheValueIsNotNull(CacheKey.refund); - } - - /** Checks whether the 'reason' field is set and is not null */ - public boolean isNotNullReason() { - return genClient.cacheValueIsNotNull(CacheKey.reason); - } - - /** Checks whether the 'message' field is set and is not null */ - public boolean isNotNullMessage() { - return genClient.cacheValueIsNotNull(CacheKey.message); - } - - /** Checks whether the 'code' field is set and is not null */ - public boolean isNotNullCode() { - return genClient.cacheValueIsNotNull(CacheKey.code); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'orderId' field has been set, however the value could be null */ - public boolean hasOrderId() { - return genClient.cacheHasKey(CacheKey.orderId); - } - - /** Checks whether the 'paymentId' field has been set, however the value could be null */ - public boolean hasPaymentId() { - return genClient.cacheHasKey(CacheKey.paymentId); - } - - /** Checks whether the 'refund' field has been set, however the value could be null */ - public boolean hasRefund() { - return genClient.cacheHasKey(CacheKey.refund); - } - - /** Checks whether the 'reason' field has been set, however the value could be null */ - public boolean hasReason() { - return genClient.cacheHasKey(CacheKey.reason); - } - - /** Checks whether the 'message' field has been set, however the value could be null */ - public boolean hasMessage() { - return genClient.cacheHasKey(CacheKey.message); - } - - /** Checks whether the 'code' field has been set, however the value could be null */ - public boolean hasCode() { - return genClient.cacheHasKey(CacheKey.code); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'orderId'. - */ - public RefundResponseMessage setOrderId(java.lang.String orderId) { - return genClient.setOther(orderId, CacheKey.orderId); - } - - /** - * Sets the field 'paymentId'. - */ - public RefundResponseMessage setPaymentId(java.lang.String paymentId) { - return genClient.setOther(paymentId, CacheKey.paymentId); - } - - /** - * Sets the field 'refund'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public RefundResponseMessage setRefund(com.clover.sdk.v3.payments.Refund refund) { - return genClient.setRecord(refund, CacheKey.refund); - } - - /** - * Sets the field 'reason'. - */ - public RefundResponseMessage setReason(com.clover.sdk.v3.remotemessage.ErrorCode reason) { - return genClient.setOther(reason, CacheKey.reason); - } - - /** - * Sets the field 'message'. - */ - public RefundResponseMessage setMessage(java.lang.String message) { - return genClient.setOther(message, CacheKey.message); - } - - /** - * Sets the field 'code'. - */ - public RefundResponseMessage setCode(com.clover.sdk.v3.remotemessage.TxState code) { - return genClient.setOther(code, CacheKey.code); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'orderId' field, the 'has' method for this field will now return false */ - public void clearOrderId() { - genClient.clear(CacheKey.orderId); - } - /** Clears the 'paymentId' field, the 'has' method for this field will now return false */ - public void clearPaymentId() { - genClient.clear(CacheKey.paymentId); - } - /** Clears the 'refund' field, the 'has' method for this field will now return false */ - public void clearRefund() { - genClient.clear(CacheKey.refund); - } - /** Clears the 'reason' field, the 'has' method for this field will now return false */ - public void clearReason() { - genClient.clear(CacheKey.reason); - } - /** Clears the 'message' field, the 'has' method for this field will now return false */ - public void clearMessage() { - genClient.clear(CacheKey.message); - } - /** Clears the 'code' field, the 'has' method for this field will now return false */ - public void clearCode() { - genClient.clear(CacheKey.code); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public RefundResponseMessage copyChanges() { - RefundResponseMessage copy = new RefundResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(RefundResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new RefundResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public RefundResponseMessage createFromParcel(android.os.Parcel in) { - RefundResponseMessage instance = new RefundResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public RefundResponseMessage[] newArray(int size) { - return new RefundResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public RefundResponseMessage create(org.json.JSONObject jsonObject) { - return new RefundResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean ORDERID_IS_REQUIRED = false; - public static final long ORDERID_MAX_LEN = 13; - public static final boolean PAYMENTID_IS_REQUIRED = false; - public static final long PAYMENTID_MAX_LEN = 13; - public static final boolean REFUND_IS_REQUIRED = false; - public static final boolean REASON_IS_REQUIRED = false; - public static final boolean MESSAGE_IS_REQUIRED = false; - public static final boolean CODE_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoteError.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoteError.java deleted file mode 100644 index eca3e2003..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoteError.java +++ /dev/null @@ -1,371 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- * Errors that are encountered that cannot be recovered from are passed using this class. This is intended to be used to aid integrators and Clover support in troubleshooting systems integration with devices. - *

- *

Fields

- *
    - *
  • {@link #getErrorDetail errorDetail}
  • - *
  • {@link #getErrorMessage errorMessage}
  • - *
  • {@link #getErrorCode errorCode}
  • - *
- */ -@SuppressWarnings("all") -public class RemoteError extends com.clover.sdk.v3.remotemessage.Message { - - /** - * Detailed information on the error. This is engineering information for troubleshooting. - */ - public java.lang.String getErrorDetail() { - return genClient.cacheGet(CacheKey.errorDetail); - } - - /** - * A concise description of the error - */ - public java.lang.String getErrorMessage() { - return genClient.cacheGet(CacheKey.errorMessage); - } - - /** - * If available, the code for the error encountered. - */ - public java.lang.Long getErrorCode() { - return genClient.cacheGet(CacheKey.errorCode); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - errorDetail { - @Override - public Object extractValue(RemoteError instance) { - return instance.genClient.extractOther("errorDetail", java.lang.String.class); - } - }, - errorMessage { - @Override - public Object extractValue(RemoteError instance) { - return instance.genClient.extractOther("errorMessage", java.lang.String.class); - } - }, - errorCode { - @Override - public Object extractValue(RemoteError instance) { - return instance.genClient.extractOther("errorCode", java.lang.Long.class); - } - }, - method { - @Override - public Object extractValue(RemoteError instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(RemoteError instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public RemoteError() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.REMOTE_ERROR); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected RemoteError(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public RemoteError(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public RemoteError(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public RemoteError(RemoteError src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - - genClient.validateLength(getErrorMessage(), 13); - } - - /** Checks whether the 'errorDetail' field is set and is not null */ - public boolean isNotNullErrorDetail() { - return genClient.cacheValueIsNotNull(CacheKey.errorDetail); - } - - /** Checks whether the 'errorMessage' field is set and is not null */ - public boolean isNotNullErrorMessage() { - return genClient.cacheValueIsNotNull(CacheKey.errorMessage); - } - - /** Checks whether the 'errorCode' field is set and is not null */ - public boolean isNotNullErrorCode() { - return genClient.cacheValueIsNotNull(CacheKey.errorCode); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'errorDetail' field has been set, however the value could be null */ - public boolean hasErrorDetail() { - return genClient.cacheHasKey(CacheKey.errorDetail); - } - - /** Checks whether the 'errorMessage' field has been set, however the value could be null */ - public boolean hasErrorMessage() { - return genClient.cacheHasKey(CacheKey.errorMessage); - } - - /** Checks whether the 'errorCode' field has been set, however the value could be null */ - public boolean hasErrorCode() { - return genClient.cacheHasKey(CacheKey.errorCode); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'errorDetail'. - */ - public RemoteError setErrorDetail(java.lang.String errorDetail) { - return genClient.setOther(errorDetail, CacheKey.errorDetail); - } - - /** - * Sets the field 'errorMessage'. - */ - public RemoteError setErrorMessage(java.lang.String errorMessage) { - return genClient.setOther(errorMessage, CacheKey.errorMessage); - } - - /** - * Sets the field 'errorCode'. - */ - public RemoteError setErrorCode(java.lang.Long errorCode) { - return genClient.setOther(errorCode, CacheKey.errorCode); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'errorDetail' field, the 'has' method for this field will now return false */ - public void clearErrorDetail() { - genClient.clear(CacheKey.errorDetail); - } - /** Clears the 'errorMessage' field, the 'has' method for this field will now return false */ - public void clearErrorMessage() { - genClient.clear(CacheKey.errorMessage); - } - /** Clears the 'errorCode' field, the 'has' method for this field will now return false */ - public void clearErrorCode() { - genClient.clear(CacheKey.errorCode); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public RemoteError copyChanges() { - RemoteError copy = new RemoteError(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(RemoteError src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new RemoteError(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public RemoteError createFromParcel(android.os.Parcel in) { - RemoteError instance = new RemoteError(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public RemoteError[] newArray(int size) { - return new RemoteError[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public RemoteError create(org.json.JSONObject jsonObject) { - return new RemoteError(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean ERRORDETAIL_IS_REQUIRED = false; - public static final boolean ERRORMESSAGE_IS_REQUIRED = false; - public static final long ERRORMESSAGE_MAX_LEN = 13; - public static final boolean ERRORCODE_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoteMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoteMessage.java deleted file mode 100644 index 274353f98..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoteMessage.java +++ /dev/null @@ -1,607 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; -import com.clover.sdk.GenericParcelable; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getId id}
  • - *
  • {@link #getType type}
  • - *
  • {@link #getPackageName packageName}
  • - *
  • {@link #getMethod method}
  • - *
  • {@link #getPayload payload}
  • - *
  • {@link #getRemoteSourceSDK remoteSourceSDK}
  • - *
  • {@link #getRemoteApplicationID remoteApplicationID}
  • - *
  • {@link #getVersion version}
  • - *
  • {@link #getFragmentIndex fragmentIndex}
  • - *
  • {@link #getLastFragment lastFragment}
  • - *
  • {@link #getAttachmentEncoding attachmentEncoding}
  • - *
  • {@link #getAttachment attachment}
  • - *
- */ -@SuppressWarnings("all") -public class RemoteMessage extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable { - - /** - * Identifier for the message - */ - public java.lang.String getId() { - return genClient.cacheGet(CacheKey.id); - } - - public com.clover.sdk.v3.remotemessage.RemoteMessageType getType() { - return genClient.cacheGet(CacheKey.type); - } - - /** - * The package name of the sending Clover api - */ - public java.lang.String getPackageName() { - return genClient.cacheGet(CacheKey.packageName); - } - - /** - * The name of the business message being sent - */ - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The payload message being sent. Interpreted based on the method. - */ - public java.lang.String getPayload() { - return genClient.cacheGet(CacheKey.payload); - } - - /** - * The identifier for the source SDK. This identifies the connector. - */ - public java.lang.String getRemoteSourceSDK() { - return genClient.cacheGet(CacheKey.remoteSourceSDK); - } - - /** - * The identifier for the sending application. This identifies the app. - */ - public java.lang.String getRemoteApplicationID() { - return genClient.cacheGet(CacheKey.remoteApplicationID); - } - - /** - * The Remote Message version. - */ - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - /** - * The order of fragments when message is split for large attachments. - */ - public java.lang.Integer getFragmentIndex() { - return genClient.cacheGet(CacheKey.fragmentIndex); - } - - /** - * If this is the final fragment in a series. - */ - public java.lang.Boolean getLastFragment() { - return genClient.cacheGet(CacheKey.lastFragment); - } - - /** - * The type of encoding used for the attachment, typically BASE64. - */ - public java.lang.String getAttachmentEncoding() { - return genClient.cacheGet(CacheKey.attachmentEncoding); - } - - /** - * The encoded attachment. - */ - public java.lang.String getAttachment() { - return genClient.cacheGet(CacheKey.attachment); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - id { - @Override - public Object extractValue(RemoteMessage instance) { - return instance.genClient.extractOther("id", java.lang.String.class); - } - }, - type { - @Override - public Object extractValue(RemoteMessage instance) { - return instance.genClient.extractEnum("type", com.clover.sdk.v3.remotemessage.RemoteMessageType.class); - } - }, - packageName { - @Override - public Object extractValue(RemoteMessage instance) { - return instance.genClient.extractOther("packageName", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(RemoteMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - payload { - @Override - public Object extractValue(RemoteMessage instance) { - return instance.genClient.extractOther("payload", java.lang.String.class); - } - }, - remoteSourceSDK { - @Override - public Object extractValue(RemoteMessage instance) { - return instance.genClient.extractOther("remoteSourceSDK", java.lang.String.class); - } - }, - remoteApplicationID { - @Override - public Object extractValue(RemoteMessage instance) { - return instance.genClient.extractOther("remoteApplicationID", java.lang.String.class); - } - }, - version { - @Override - public Object extractValue(RemoteMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - fragmentIndex { - @Override - public Object extractValue(RemoteMessage instance) { - return instance.genClient.extractOther("fragmentIndex", java.lang.Integer.class); - } - }, - lastFragment { - @Override - public Object extractValue(RemoteMessage instance) { - return instance.genClient.extractOther("lastFragment", java.lang.Boolean.class); - } - }, - attachmentEncoding { - @Override - public Object extractValue(RemoteMessage instance) { - return instance.genClient.extractOther("attachmentEncoding", java.lang.String.class); - } - }, - attachment { - @Override - public Object extractValue(RemoteMessage instance) { - return instance.genClient.extractOther("attachment", java.lang.String.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public RemoteMessage() { - genClient = new GenericClient(this); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected RemoteMessage(boolean noInit) { - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public RemoteMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public RemoteMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public RemoteMessage(RemoteMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - genClient.validateLength(getId(), 13); - } - - /** Checks whether the 'id' field is set and is not null */ - public boolean isNotNullId() { - return genClient.cacheValueIsNotNull(CacheKey.id); - } - - /** Checks whether the 'type' field is set and is not null */ - public boolean isNotNullType() { - return genClient.cacheValueIsNotNull(CacheKey.type); - } - - /** Checks whether the 'packageName' field is set and is not null */ - public boolean isNotNullPackageName() { - return genClient.cacheValueIsNotNull(CacheKey.packageName); - } - - /** Checks whether the 'method' field is set and is not null */ - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'payload' field is set and is not null */ - public boolean isNotNullPayload() { - return genClient.cacheValueIsNotNull(CacheKey.payload); - } - - /** Checks whether the 'remoteSourceSDK' field is set and is not null */ - public boolean isNotNullRemoteSourceSDK() { - return genClient.cacheValueIsNotNull(CacheKey.remoteSourceSDK); - } - - /** Checks whether the 'remoteApplicationID' field is set and is not null */ - public boolean isNotNullRemoteApplicationID() { - return genClient.cacheValueIsNotNull(CacheKey.remoteApplicationID); - } - - /** Checks whether the 'version' field is set and is not null */ - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - /** Checks whether the 'fragmentIndex' field is set and is not null */ - public boolean isNotNullFragmentIndex() { - return genClient.cacheValueIsNotNull(CacheKey.fragmentIndex); - } - - /** Checks whether the 'lastFragment' field is set and is not null */ - public boolean isNotNullLastFragment() { - return genClient.cacheValueIsNotNull(CacheKey.lastFragment); - } - - /** Checks whether the 'attachmentEncoding' field is set and is not null */ - public boolean isNotNullAttachmentEncoding() { - return genClient.cacheValueIsNotNull(CacheKey.attachmentEncoding); - } - - /** Checks whether the 'attachment' field is set and is not null */ - public boolean isNotNullAttachment() { - return genClient.cacheValueIsNotNull(CacheKey.attachment); - } - - - - /** Checks whether the 'id' field has been set, however the value could be null */ - public boolean hasId() { - return genClient.cacheHasKey(CacheKey.id); - } - - /** Checks whether the 'type' field has been set, however the value could be null */ - public boolean hasType() { - return genClient.cacheHasKey(CacheKey.type); - } - - /** Checks whether the 'packageName' field has been set, however the value could be null */ - public boolean hasPackageName() { - return genClient.cacheHasKey(CacheKey.packageName); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'payload' field has been set, however the value could be null */ - public boolean hasPayload() { - return genClient.cacheHasKey(CacheKey.payload); - } - - /** Checks whether the 'remoteSourceSDK' field has been set, however the value could be null */ - public boolean hasRemoteSourceSDK() { - return genClient.cacheHasKey(CacheKey.remoteSourceSDK); - } - - /** Checks whether the 'remoteApplicationID' field has been set, however the value could be null */ - public boolean hasRemoteApplicationID() { - return genClient.cacheHasKey(CacheKey.remoteApplicationID); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - /** Checks whether the 'fragmentIndex' field has been set, however the value could be null */ - public boolean hasFragmentIndex() { - return genClient.cacheHasKey(CacheKey.fragmentIndex); - } - - /** Checks whether the 'lastFragment' field has been set, however the value could be null */ - public boolean hasLastFragment() { - return genClient.cacheHasKey(CacheKey.lastFragment); - } - - /** Checks whether the 'attachmentEncoding' field has been set, however the value could be null */ - public boolean hasAttachmentEncoding() { - return genClient.cacheHasKey(CacheKey.attachmentEncoding); - } - - /** Checks whether the 'attachment' field has been set, however the value could be null */ - public boolean hasAttachment() { - return genClient.cacheHasKey(CacheKey.attachment); - } - - - /** - * Sets the field 'id'. - */ - public RemoteMessage setId(java.lang.String id) { - return genClient.setOther(id, CacheKey.id); - } - - /** - * Sets the field 'type'. - */ - public RemoteMessage setType(com.clover.sdk.v3.remotemessage.RemoteMessageType type) { - return genClient.setOther(type, CacheKey.type); - } - - /** - * Sets the field 'packageName'. - */ - public RemoteMessage setPackageName(java.lang.String packageName) { - return genClient.setOther(packageName, CacheKey.packageName); - } - - /** - * Sets the field 'method'. - */ - public RemoteMessage setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'payload'. - */ - public RemoteMessage setPayload(java.lang.String payload) { - return genClient.setOther(payload, CacheKey.payload); - } - - /** - * Sets the field 'remoteSourceSDK'. - */ - public RemoteMessage setRemoteSourceSDK(java.lang.String remoteSourceSDK) { - return genClient.setOther(remoteSourceSDK, CacheKey.remoteSourceSDK); - } - - /** - * Sets the field 'remoteApplicationID'. - */ - public RemoteMessage setRemoteApplicationID(java.lang.String remoteApplicationID) { - return genClient.setOther(remoteApplicationID, CacheKey.remoteApplicationID); - } - - /** - * Sets the field 'version'. - */ - public RemoteMessage setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - /** - * Sets the field 'fragmentIndex'. - */ - public RemoteMessage setFragmentIndex(java.lang.Integer fragmentIndex) { - return genClient.setOther(fragmentIndex, CacheKey.fragmentIndex); - } - - /** - * Sets the field 'lastFragment'. - */ - public RemoteMessage setLastFragment(java.lang.Boolean lastFragment) { - return genClient.setOther(lastFragment, CacheKey.lastFragment); - } - - /** - * Sets the field 'attachmentEncoding'. - */ - public RemoteMessage setAttachmentEncoding(java.lang.String attachmentEncoding) { - return genClient.setOther(attachmentEncoding, CacheKey.attachmentEncoding); - } - - /** - * Sets the field 'attachment'. - */ - public RemoteMessage setAttachment(java.lang.String attachment) { - return genClient.setOther(attachment, CacheKey.attachment); - } - - - /** Clears the 'id' field, the 'has' method for this field will now return false */ - public void clearId() { - genClient.clear(CacheKey.id); - } - /** Clears the 'type' field, the 'has' method for this field will now return false */ - public void clearType() { - genClient.clear(CacheKey.type); - } - /** Clears the 'packageName' field, the 'has' method for this field will now return false */ - public void clearPackageName() { - genClient.clear(CacheKey.packageName); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'payload' field, the 'has' method for this field will now return false */ - public void clearPayload() { - genClient.clear(CacheKey.payload); - } - /** Clears the 'remoteSourceSDK' field, the 'has' method for this field will now return false */ - public void clearRemoteSourceSDK() { - genClient.clear(CacheKey.remoteSourceSDK); - } - /** Clears the 'remoteApplicationID' field, the 'has' method for this field will now return false */ - public void clearRemoteApplicationID() { - genClient.clear(CacheKey.remoteApplicationID); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - public void clearVersion() { - genClient.clear(CacheKey.version); - } - /** Clears the 'fragmentIndex' field, the 'has' method for this field will now return false */ - public void clearFragmentIndex() { - genClient.clear(CacheKey.fragmentIndex); - } - /** Clears the 'lastFragment' field, the 'has' method for this field will now return false */ - public void clearLastFragment() { - genClient.clear(CacheKey.lastFragment); - } - /** Clears the 'attachmentEncoding' field, the 'has' method for this field will now return false */ - public void clearAttachmentEncoding() { - genClient.clear(CacheKey.attachmentEncoding); - } - /** Clears the 'attachment' field, the 'has' method for this field will now return false */ - public void clearAttachment() { - genClient.clear(CacheKey.attachment); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public RemoteMessage copyChanges() { - RemoteMessage copy = new RemoteMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(RemoteMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new RemoteMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public RemoteMessage createFromParcel(android.os.Parcel in) { - RemoteMessage instance = new RemoteMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public RemoteMessage[] newArray(int size) { - return new RemoteMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public RemoteMessage create(org.json.JSONObject jsonObject) { - return new RemoteMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean ID_IS_REQUIRED = false; - public static final long ID_MAX_LEN = 13; - public static final boolean TYPE_IS_REQUIRED = false; - public static final boolean PACKAGENAME_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean PAYLOAD_IS_REQUIRED = false; - public static final boolean REMOTESOURCESDK_IS_REQUIRED = false; - public static final boolean REMOTEAPPLICATIONID_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - public static final boolean FRAGMENTINDEX_IS_REQUIRED = false; - public static final boolean LASTFRAGMENT_IS_REQUIRED = false; - public static final boolean ATTACHMENTENCODING_IS_REQUIRED = false; - public static final boolean ATTACHMENT_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoteMessageType.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoteMessageType.java deleted file mode 100644 index 00031bc55..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoteMessageType.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import android.os.Parcelable; -import android.os.Parcel; - -/** - * This is an auto-generated Clover data enum. - */ -@SuppressWarnings("all") -public enum RemoteMessageType implements Parcelable { - COMMAND, QUERY, EVENT, PING, PONG; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(final Parcel dest, final int flags) { - dest.writeString(name()); - } - - public static final Creator CREATOR = new Creator() { - @Override - public RemoteMessageType createFromParcel(final Parcel source) { - return RemoteMessageType.valueOf(source.readString()); - } - - @Override - public RemoteMessageType[] newArray(final int size) { - return new RemoteMessageType[size]; - } - }; -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoveDiscountAction.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoveDiscountAction.java deleted file mode 100644 index d8101b8f1..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoveDiscountAction.java +++ /dev/null @@ -1,242 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; -import com.clover.sdk.GenericParcelable; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getDiscountId discountId}
  • - *
  • {@link #getLineItemId lineItemId}
  • - *
- */ -@SuppressWarnings("all") -public class RemoveDiscountAction extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable { - - public java.lang.String getDiscountId() { - return genClient.cacheGet(CacheKey.discountId); - } - - public java.lang.String getLineItemId() { - return genClient.cacheGet(CacheKey.lineItemId); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - discountId { - @Override - public Object extractValue(RemoveDiscountAction instance) { - return instance.genClient.extractOther("discountId", java.lang.String.class); - } - }, - lineItemId { - @Override - public Object extractValue(RemoveDiscountAction instance) { - return instance.genClient.extractOther("lineItemId", java.lang.String.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public RemoveDiscountAction() { - genClient = new GenericClient(this); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected RemoveDiscountAction(boolean noInit) { - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public RemoveDiscountAction(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public RemoveDiscountAction(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public RemoveDiscountAction(RemoveDiscountAction src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'discountId' field is set and is not null */ - public boolean isNotNullDiscountId() { - return genClient.cacheValueIsNotNull(CacheKey.discountId); - } - - /** Checks whether the 'lineItemId' field is set and is not null */ - public boolean isNotNullLineItemId() { - return genClient.cacheValueIsNotNull(CacheKey.lineItemId); - } - - - - /** Checks whether the 'discountId' field has been set, however the value could be null */ - public boolean hasDiscountId() { - return genClient.cacheHasKey(CacheKey.discountId); - } - - /** Checks whether the 'lineItemId' field has been set, however the value could be null */ - public boolean hasLineItemId() { - return genClient.cacheHasKey(CacheKey.lineItemId); - } - - - /** - * Sets the field 'discountId'. - */ - public RemoveDiscountAction setDiscountId(java.lang.String discountId) { - return genClient.setOther(discountId, CacheKey.discountId); - } - - /** - * Sets the field 'lineItemId'. - */ - public RemoveDiscountAction setLineItemId(java.lang.String lineItemId) { - return genClient.setOther(lineItemId, CacheKey.lineItemId); - } - - - /** Clears the 'discountId' field, the 'has' method for this field will now return false */ - public void clearDiscountId() { - genClient.clear(CacheKey.discountId); - } - /** Clears the 'lineItemId' field, the 'has' method for this field will now return false */ - public void clearLineItemId() { - genClient.clear(CacheKey.lineItemId); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public RemoveDiscountAction copyChanges() { - RemoveDiscountAction copy = new RemoveDiscountAction(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(RemoveDiscountAction src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new RemoveDiscountAction(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public RemoveDiscountAction createFromParcel(android.os.Parcel in) { - RemoveDiscountAction instance = new RemoveDiscountAction(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public RemoveDiscountAction[] newArray(int size) { - return new RemoveDiscountAction[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public RemoveDiscountAction create(org.json.JSONObject jsonObject) { - return new RemoveDiscountAction(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean DISCOUNTID_IS_REQUIRED = false; - public static final boolean LINEITEMID_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoveLineItemAction.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoveLineItemAction.java deleted file mode 100644 index 24c70e7ca..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RemoveLineItemAction.java +++ /dev/null @@ -1,209 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; -import com.clover.sdk.GenericParcelable; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getLineItemId lineItemId}
  • - *
- */ -@SuppressWarnings("all") -public class RemoveLineItemAction extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable { - - public java.lang.String getLineItemId() { - return genClient.cacheGet(CacheKey.lineItemId); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - lineItemId { - @Override - public Object extractValue(RemoveLineItemAction instance) { - return instance.genClient.extractOther("lineItemId", java.lang.String.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public RemoveLineItemAction() { - genClient = new GenericClient(this); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected RemoveLineItemAction(boolean noInit) { - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public RemoveLineItemAction(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public RemoveLineItemAction(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public RemoveLineItemAction(RemoveLineItemAction src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'lineItemId' field is set and is not null */ - public boolean isNotNullLineItemId() { - return genClient.cacheValueIsNotNull(CacheKey.lineItemId); - } - - - - /** Checks whether the 'lineItemId' field has been set, however the value could be null */ - public boolean hasLineItemId() { - return genClient.cacheHasKey(CacheKey.lineItemId); - } - - - /** - * Sets the field 'lineItemId'. - */ - public RemoveLineItemAction setLineItemId(java.lang.String lineItemId) { - return genClient.setOther(lineItemId, CacheKey.lineItemId); - } - - - /** Clears the 'lineItemId' field, the 'has' method for this field will now return false */ - public void clearLineItemId() { - genClient.clear(CacheKey.lineItemId); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public RemoveLineItemAction copyChanges() { - RemoveLineItemAction copy = new RemoveLineItemAction(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(RemoveLineItemAction src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new RemoveLineItemAction(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public RemoveLineItemAction createFromParcel(android.os.Parcel in) { - RemoveLineItemAction instance = new RemoveLineItemAction(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public RemoveLineItemAction[] newArray(int size) { - return new RemoveLineItemAction[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public RemoveLineItemAction create(org.json.JSONObject jsonObject) { - return new RemoveLineItemAction(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean LINEITEMID_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ResetDeviceResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ResetDeviceResponseMessage.java deleted file mode 100644 index 383143ef0..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ResetDeviceResponseMessage.java +++ /dev/null @@ -1,363 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getReason reason}
  • - *
  • {@link #getStatus status}
  • - *
  • {@link #getState state}
  • - *
- */ -@SuppressWarnings("all") -public class ResetDeviceResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * May be populated when the operation fails. - */ - public java.lang.String getReason() { - return genClient.cacheGet(CacheKey.reason); - } - - public com.clover.sdk.v3.remotemessage.ResultStatus getStatus() { - return genClient.cacheGet(CacheKey.status); - } - - /** - * High level state of the connected device. - */ - public com.clover.sdk.v3.remotemessage.ExternalDeviceState getState() { - return genClient.cacheGet(CacheKey.state); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - reason { - @Override - public Object extractValue(ResetDeviceResponseMessage instance) { - return instance.genClient.extractOther("reason", java.lang.String.class); - } - }, - status { - @Override - public Object extractValue(ResetDeviceResponseMessage instance) { - return instance.genClient.extractEnum("status", com.clover.sdk.v3.remotemessage.ResultStatus.class); - } - }, - state { - @Override - public Object extractValue(ResetDeviceResponseMessage instance) { - return instance.genClient.extractEnum("state", com.clover.sdk.v3.remotemessage.ExternalDeviceState.class); - } - }, - method { - @Override - public Object extractValue(ResetDeviceResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(ResetDeviceResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public ResetDeviceResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.RESET_DEVICE_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected ResetDeviceResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public ResetDeviceResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public ResetDeviceResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public ResetDeviceResponseMessage(ResetDeviceResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'reason' field is set and is not null */ - public boolean isNotNullReason() { - return genClient.cacheValueIsNotNull(CacheKey.reason); - } - - /** Checks whether the 'status' field is set and is not null */ - public boolean isNotNullStatus() { - return genClient.cacheValueIsNotNull(CacheKey.status); - } - - /** Checks whether the 'state' field is set and is not null */ - public boolean isNotNullState() { - return genClient.cacheValueIsNotNull(CacheKey.state); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'reason' field has been set, however the value could be null */ - public boolean hasReason() { - return genClient.cacheHasKey(CacheKey.reason); - } - - /** Checks whether the 'status' field has been set, however the value could be null */ - public boolean hasStatus() { - return genClient.cacheHasKey(CacheKey.status); - } - - /** Checks whether the 'state' field has been set, however the value could be null */ - public boolean hasState() { - return genClient.cacheHasKey(CacheKey.state); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'reason'. - */ - public ResetDeviceResponseMessage setReason(java.lang.String reason) { - return genClient.setOther(reason, CacheKey.reason); - } - - /** - * Sets the field 'status'. - */ - public ResetDeviceResponseMessage setStatus(com.clover.sdk.v3.remotemessage.ResultStatus status) { - return genClient.setOther(status, CacheKey.status); - } - - /** - * Sets the field 'state'. - */ - public ResetDeviceResponseMessage setState(com.clover.sdk.v3.remotemessage.ExternalDeviceState state) { - return genClient.setOther(state, CacheKey.state); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'reason' field, the 'has' method for this field will now return false */ - public void clearReason() { - genClient.clear(CacheKey.reason); - } - /** Clears the 'status' field, the 'has' method for this field will now return false */ - public void clearStatus() { - genClient.clear(CacheKey.status); - } - /** Clears the 'state' field, the 'has' method for this field will now return false */ - public void clearState() { - genClient.clear(CacheKey.state); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public ResetDeviceResponseMessage copyChanges() { - ResetDeviceResponseMessage copy = new ResetDeviceResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(ResetDeviceResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new ResetDeviceResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public ResetDeviceResponseMessage createFromParcel(android.os.Parcel in) { - ResetDeviceResponseMessage instance = new ResetDeviceResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public ResetDeviceResponseMessage[] newArray(int size) { - return new ResetDeviceResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public ResetDeviceResponseMessage create(org.json.JSONObject jsonObject) { - return new ResetDeviceResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean REASON_IS_REQUIRED = false; - public static final boolean STATUS_IS_REQUIRED = false; - public static final boolean STATE_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ResetMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ResetMessage.java deleted file mode 100644 index 838183d46..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ResetMessage.java +++ /dev/null @@ -1,258 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
- */ -@SuppressWarnings("all") -public class ResetMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - method { - @Override - public Object extractValue(ResetMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(ResetMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public ResetMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.RESET); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected ResetMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public ResetMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public ResetMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public ResetMessage(ResetMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public ResetMessage copyChanges() { - ResetMessage copy = new ResetMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(ResetMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new ResetMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public ResetMessage createFromParcel(android.os.Parcel in) { - ResetMessage instance = new ResetMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public ResetMessage[] newArray(int size) { - return new ResetMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public ResetMessage create(org.json.JSONObject jsonObject) { - return new ResetMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ResultStatus.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ResultStatus.java deleted file mode 100644 index 613fc566a..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ResultStatus.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import android.os.Parcelable; -import android.os.Parcel; - -/** - * This is an auto-generated Clover data enum. - */ -@SuppressWarnings("all") -public enum ResultStatus implements Parcelable { - SUCCESS, FAIL, CANCEL; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(final Parcel dest, final int flags) { - dest.writeString(name()); - } - - public static final Creator CREATOR = new Creator() { - @Override - public ResultStatus createFromParcel(final Parcel source) { - return ResultStatus.valueOf(source.readString()); - } - - @Override - public ResultStatus[] newArray(final int size) { - return new ResultStatus[size]; - } - }; -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ResultStatusEnum.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ResultStatusEnum.java deleted file mode 100644 index 5d519f522..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ResultStatusEnum.java +++ /dev/null @@ -1,209 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; -import com.clover.sdk.GenericParcelable; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getStatus status}
  • - *
- */ -@SuppressWarnings("all") -public class ResultStatusEnum extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable { - - public com.clover.sdk.v3.remotemessage.ResultStatus getStatus() { - return genClient.cacheGet(CacheKey.status); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - status { - @Override - public Object extractValue(ResultStatusEnum instance) { - return instance.genClient.extractEnum("status", com.clover.sdk.v3.remotemessage.ResultStatus.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public ResultStatusEnum() { - genClient = new GenericClient(this); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected ResultStatusEnum(boolean noInit) { - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public ResultStatusEnum(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public ResultStatusEnum(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public ResultStatusEnum(ResultStatusEnum src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'status' field is set and is not null */ - public boolean isNotNullStatus() { - return genClient.cacheValueIsNotNull(CacheKey.status); - } - - - - /** Checks whether the 'status' field has been set, however the value could be null */ - public boolean hasStatus() { - return genClient.cacheHasKey(CacheKey.status); - } - - - /** - * Sets the field 'status'. - */ - public ResultStatusEnum setStatus(com.clover.sdk.v3.remotemessage.ResultStatus status) { - return genClient.setOther(status, CacheKey.status); - } - - - /** Clears the 'status' field, the 'has' method for this field will now return false */ - public void clearStatus() { - genClient.clear(CacheKey.status); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public ResultStatusEnum copyChanges() { - ResultStatusEnum copy = new ResultStatusEnum(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(ResultStatusEnum src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new ResultStatusEnum(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public ResultStatusEnum createFromParcel(android.os.Parcel in) { - ResultStatusEnum instance = new ResultStatusEnum(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public ResultStatusEnum[] newArray(int size) { - return new ResultStatusEnum[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public ResultStatusEnum create(org.json.JSONObject jsonObject) { - return new ResultStatusEnum(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean STATUS_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrieveCustomActivitiesRequestMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrieveCustomActivitiesRequestMessage.java deleted file mode 100644 index 7fda64d1c..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrieveCustomActivitiesRequestMessage.java +++ /dev/null @@ -1,299 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getFilters filters}
  • - *
- */ -@SuppressWarnings("all") -public class RetrieveCustomActivitiesRequestMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * List of category names to filter the results on. - */ - public java.util.List getFilters() { - return genClient.cacheGet(CacheKey.filters); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - filters { - @Override - public Object extractValue(RetrieveCustomActivitiesRequestMessage instance) { - return instance.genClient.extractListOther("filters", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(RetrieveCustomActivitiesRequestMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(RetrieveCustomActivitiesRequestMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public RetrieveCustomActivitiesRequestMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.RETRIEVE_CUSTOM_ACTIVITIES_REQUEST); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected RetrieveCustomActivitiesRequestMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public RetrieveCustomActivitiesRequestMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public RetrieveCustomActivitiesRequestMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public RetrieveCustomActivitiesRequestMessage(RetrieveCustomActivitiesRequestMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'filters' field is set and is not null */ - public boolean isNotNullFilters() { - return genClient.cacheValueIsNotNull(CacheKey.filters); - } - - /** Checks whether the 'filters' field is set and is not null and is not empty */ - public boolean isNotEmptyFilters() { return isNotNullFilters() && !getFilters().isEmpty(); } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'filters' field has been set, however the value could be null */ - public boolean hasFilters() { - return genClient.cacheHasKey(CacheKey.filters); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'filters'. - * - * Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will. - */ - public RetrieveCustomActivitiesRequestMessage setFilters(java.util.List filters) { - return genClient.setArrayOther(filters, CacheKey.filters); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'filters' field, the 'has' method for this field will now return false */ - public void clearFilters() { - genClient.clear(CacheKey.filters); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public RetrieveCustomActivitiesRequestMessage copyChanges() { - RetrieveCustomActivitiesRequestMessage copy = new RetrieveCustomActivitiesRequestMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(RetrieveCustomActivitiesRequestMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new RetrieveCustomActivitiesRequestMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public RetrieveCustomActivitiesRequestMessage createFromParcel(android.os.Parcel in) { - RetrieveCustomActivitiesRequestMessage instance = new RetrieveCustomActivitiesRequestMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public RetrieveCustomActivitiesRequestMessage[] newArray(int size) { - return new RetrieveCustomActivitiesRequestMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public RetrieveCustomActivitiesRequestMessage create(org.json.JSONObject jsonObject) { - return new RetrieveCustomActivitiesRequestMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean FILTERS_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrieveCustomActivitiesResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrieveCustomActivitiesResponseMessage.java deleted file mode 100644 index a3ee91a40..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrieveCustomActivitiesResponseMessage.java +++ /dev/null @@ -1,299 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getActivities activities}
  • - *
- */ -@SuppressWarnings("all") -public class RetrieveCustomActivitiesResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * Custom activities that met the request filtering requirements. - */ - public java.util.List getActivities() { - return genClient.cacheGet(CacheKey.activities); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - activities { - @Override - public Object extractValue(RetrieveCustomActivitiesResponseMessage instance) { - return instance.genClient.extractListRecord("activities", com.clover.sdk.v3.custom.CustomActivity.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(RetrieveCustomActivitiesResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(RetrieveCustomActivitiesResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public RetrieveCustomActivitiesResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.RETRIEVE_CUSTOM_ACTIVITIES_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected RetrieveCustomActivitiesResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public RetrieveCustomActivitiesResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public RetrieveCustomActivitiesResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public RetrieveCustomActivitiesResponseMessage(RetrieveCustomActivitiesResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'activities' field is set and is not null */ - public boolean isNotNullActivities() { - return genClient.cacheValueIsNotNull(CacheKey.activities); - } - - /** Checks whether the 'activities' field is set and is not null and is not empty */ - public boolean isNotEmptyActivities() { return isNotNullActivities() && !getActivities().isEmpty(); } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'activities' field has been set, however the value could be null */ - public boolean hasActivities() { - return genClient.cacheHasKey(CacheKey.activities); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'activities'. - * - * Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will. - */ - public RetrieveCustomActivitiesResponseMessage setActivities(java.util.List activities) { - return genClient.setArrayRecord(activities, CacheKey.activities); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'activities' field, the 'has' method for this field will now return false */ - public void clearActivities() { - genClient.clear(CacheKey.activities); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public RetrieveCustomActivitiesResponseMessage copyChanges() { - RetrieveCustomActivitiesResponseMessage copy = new RetrieveCustomActivitiesResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(RetrieveCustomActivitiesResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new RetrieveCustomActivitiesResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public RetrieveCustomActivitiesResponseMessage createFromParcel(android.os.Parcel in) { - RetrieveCustomActivitiesResponseMessage instance = new RetrieveCustomActivitiesResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public RetrieveCustomActivitiesResponseMessage[] newArray(int size) { - return new RetrieveCustomActivitiesResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public RetrieveCustomActivitiesResponseMessage create(org.json.JSONObject jsonObject) { - return new RetrieveCustomActivitiesResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean ACTIVITIES_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrieveDeviceStatusRequestMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrieveDeviceStatusRequestMessage.java deleted file mode 100644 index 0c68678a0..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrieveDeviceStatusRequestMessage.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getSendLastMessage sendLastMessage}
  • - *
- */ -@SuppressWarnings("all") -public class RetrieveDeviceStatusRequestMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * Send last message, if true - */ - public java.lang.Boolean getSendLastMessage() { - return genClient.cacheGet(CacheKey.sendLastMessage); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - sendLastMessage { - @Override - public Object extractValue(RetrieveDeviceStatusRequestMessage instance) { - return instance.genClient.extractOther("sendLastMessage", java.lang.Boolean.class); - } - }, - method { - @Override - public Object extractValue(RetrieveDeviceStatusRequestMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(RetrieveDeviceStatusRequestMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public RetrieveDeviceStatusRequestMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.RETRIEVE_DEVICE_STATUS_REQUEST); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected RetrieveDeviceStatusRequestMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public RetrieveDeviceStatusRequestMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public RetrieveDeviceStatusRequestMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public RetrieveDeviceStatusRequestMessage(RetrieveDeviceStatusRequestMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'sendLastMessage' field is set and is not null */ - public boolean isNotNullSendLastMessage() { - return genClient.cacheValueIsNotNull(CacheKey.sendLastMessage); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'sendLastMessage' field has been set, however the value could be null */ - public boolean hasSendLastMessage() { - return genClient.cacheHasKey(CacheKey.sendLastMessage); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'sendLastMessage'. - */ - public RetrieveDeviceStatusRequestMessage setSendLastMessage(java.lang.Boolean sendLastMessage) { - return genClient.setOther(sendLastMessage, CacheKey.sendLastMessage); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'sendLastMessage' field, the 'has' method for this field will now return false */ - public void clearSendLastMessage() { - genClient.clear(CacheKey.sendLastMessage); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public RetrieveDeviceStatusRequestMessage copyChanges() { - RetrieveDeviceStatusRequestMessage copy = new RetrieveDeviceStatusRequestMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(RetrieveDeviceStatusRequestMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new RetrieveDeviceStatusRequestMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public RetrieveDeviceStatusRequestMessage createFromParcel(android.os.Parcel in) { - RetrieveDeviceStatusRequestMessage instance = new RetrieveDeviceStatusRequestMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public RetrieveDeviceStatusRequestMessage[] newArray(int size) { - return new RetrieveDeviceStatusRequestMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public RetrieveDeviceStatusRequestMessage create(org.json.JSONObject jsonObject) { - return new RetrieveDeviceStatusRequestMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean SENDLASTMESSAGE_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrieveDeviceStatusResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrieveDeviceStatusResponseMessage.java deleted file mode 100644 index e4495bc11..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrieveDeviceStatusResponseMessage.java +++ /dev/null @@ -1,437 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getReason reason}
  • - *
  • {@link #getStatus status}
  • - *
  • {@link #getState state}
  • - *
  • {@link #getSubstate substate}
  • - *
  • {@link #getData data}
  • - *
- */ -@SuppressWarnings("all") -public class RetrieveDeviceStatusResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * May be populated when the operation fails. - */ - public java.lang.String getReason() { - return genClient.cacheGet(CacheKey.reason); - } - - public com.clover.sdk.v3.remotemessage.ResultStatus getStatus() { - return genClient.cacheGet(CacheKey.status); - } - - /** - * High level state of the connected device. - */ - public com.clover.sdk.v3.remotemessage.ExternalDeviceState getState() { - return genClient.cacheGet(CacheKey.state); - } - - /** - * Substate of the connected device. - */ - public com.clover.sdk.v3.remotemessage.ExternalDeviceSubState getSubstate() { - return genClient.cacheGet(CacheKey.substate); - } - - /** - * Additional data elements supplementing the state of the connected device. - */ - public com.clover.sdk.v3.remotemessage.ExternalDeviceStateData getData() { - return genClient.cacheGet(CacheKey.data); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - reason { - @Override - public Object extractValue(RetrieveDeviceStatusResponseMessage instance) { - return instance.genClient.extractOther("reason", java.lang.String.class); - } - }, - status { - @Override - public Object extractValue(RetrieveDeviceStatusResponseMessage instance) { - return instance.genClient.extractEnum("status", com.clover.sdk.v3.remotemessage.ResultStatus.class); - } - }, - state { - @Override - public Object extractValue(RetrieveDeviceStatusResponseMessage instance) { - return instance.genClient.extractEnum("state", com.clover.sdk.v3.remotemessage.ExternalDeviceState.class); - } - }, - substate { - @Override - public Object extractValue(RetrieveDeviceStatusResponseMessage instance) { - return instance.genClient.extractEnum("substate", com.clover.sdk.v3.remotemessage.ExternalDeviceSubState.class); - } - }, - data { - @Override - public Object extractValue(RetrieveDeviceStatusResponseMessage instance) { - return instance.genClient.extractRecord("data", com.clover.sdk.v3.remotemessage.ExternalDeviceStateData.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(RetrieveDeviceStatusResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(RetrieveDeviceStatusResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public RetrieveDeviceStatusResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.RETRIEVE_DEVICE_STATUS_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected RetrieveDeviceStatusResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public RetrieveDeviceStatusResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public RetrieveDeviceStatusResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public RetrieveDeviceStatusResponseMessage(RetrieveDeviceStatusResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'reason' field is set and is not null */ - public boolean isNotNullReason() { - return genClient.cacheValueIsNotNull(CacheKey.reason); - } - - /** Checks whether the 'status' field is set and is not null */ - public boolean isNotNullStatus() { - return genClient.cacheValueIsNotNull(CacheKey.status); - } - - /** Checks whether the 'state' field is set and is not null */ - public boolean isNotNullState() { - return genClient.cacheValueIsNotNull(CacheKey.state); - } - - /** Checks whether the 'substate' field is set and is not null */ - public boolean isNotNullSubstate() { - return genClient.cacheValueIsNotNull(CacheKey.substate); - } - - /** Checks whether the 'data' field is set and is not null */ - public boolean isNotNullData() { - return genClient.cacheValueIsNotNull(CacheKey.data); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'reason' field has been set, however the value could be null */ - public boolean hasReason() { - return genClient.cacheHasKey(CacheKey.reason); - } - - /** Checks whether the 'status' field has been set, however the value could be null */ - public boolean hasStatus() { - return genClient.cacheHasKey(CacheKey.status); - } - - /** Checks whether the 'state' field has been set, however the value could be null */ - public boolean hasState() { - return genClient.cacheHasKey(CacheKey.state); - } - - /** Checks whether the 'substate' field has been set, however the value could be null */ - public boolean hasSubstate() { - return genClient.cacheHasKey(CacheKey.substate); - } - - /** Checks whether the 'data' field has been set, however the value could be null */ - public boolean hasData() { - return genClient.cacheHasKey(CacheKey.data); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'reason'. - */ - public RetrieveDeviceStatusResponseMessage setReason(java.lang.String reason) { - return genClient.setOther(reason, CacheKey.reason); - } - - /** - * Sets the field 'status'. - */ - public RetrieveDeviceStatusResponseMessage setStatus(com.clover.sdk.v3.remotemessage.ResultStatus status) { - return genClient.setOther(status, CacheKey.status); - } - - /** - * Sets the field 'state'. - */ - public RetrieveDeviceStatusResponseMessage setState(com.clover.sdk.v3.remotemessage.ExternalDeviceState state) { - return genClient.setOther(state, CacheKey.state); - } - - /** - * Sets the field 'substate'. - */ - public RetrieveDeviceStatusResponseMessage setSubstate(com.clover.sdk.v3.remotemessage.ExternalDeviceSubState substate) { - return genClient.setOther(substate, CacheKey.substate); - } - - /** - * Sets the field 'data'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public RetrieveDeviceStatusResponseMessage setData(com.clover.sdk.v3.remotemessage.ExternalDeviceStateData data) { - return genClient.setRecord(data, CacheKey.data); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'reason' field, the 'has' method for this field will now return false */ - public void clearReason() { - genClient.clear(CacheKey.reason); - } - /** Clears the 'status' field, the 'has' method for this field will now return false */ - public void clearStatus() { - genClient.clear(CacheKey.status); - } - /** Clears the 'state' field, the 'has' method for this field will now return false */ - public void clearState() { - genClient.clear(CacheKey.state); - } - /** Clears the 'substate' field, the 'has' method for this field will now return false */ - public void clearSubstate() { - genClient.clear(CacheKey.substate); - } - /** Clears the 'data' field, the 'has' method for this field will now return false */ - public void clearData() { - genClient.clear(CacheKey.data); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public RetrieveDeviceStatusResponseMessage copyChanges() { - RetrieveDeviceStatusResponseMessage copy = new RetrieveDeviceStatusResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(RetrieveDeviceStatusResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new RetrieveDeviceStatusResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public RetrieveDeviceStatusResponseMessage createFromParcel(android.os.Parcel in) { - RetrieveDeviceStatusResponseMessage instance = new RetrieveDeviceStatusResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public RetrieveDeviceStatusResponseMessage[] newArray(int size) { - return new RetrieveDeviceStatusResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public RetrieveDeviceStatusResponseMessage create(org.json.JSONObject jsonObject) { - return new RetrieveDeviceStatusResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean REASON_IS_REQUIRED = false; - public static final boolean STATUS_IS_REQUIRED = false; - public static final boolean STATE_IS_REQUIRED = false; - public static final boolean SUBSTATE_IS_REQUIRED = false; - public static final boolean DATA_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrievePaymentRequestMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrievePaymentRequestMessage.java deleted file mode 100644 index aec78162f..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrievePaymentRequestMessage.java +++ /dev/null @@ -1,296 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- * Request to retrieve a payment made to a specific device. - *

- *

Fields

- *
    - *
  • {@link #getExternalPaymentId externalPaymentId}
  • - *
- */ -@SuppressWarnings("all") -public class RetrievePaymentRequestMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The externalPaymentId used when a payment was created - */ - public java.lang.String getExternalPaymentId() { - return genClient.cacheGet(CacheKey.externalPaymentId); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - externalPaymentId { - @Override - public Object extractValue(RetrievePaymentRequestMessage instance) { - return instance.genClient.extractOther("externalPaymentId", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(RetrievePaymentRequestMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(RetrievePaymentRequestMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public RetrievePaymentRequestMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.RETRIEVE_PAYMENT_REQUEST); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected RetrievePaymentRequestMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public RetrievePaymentRequestMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public RetrievePaymentRequestMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public RetrievePaymentRequestMessage(RetrievePaymentRequestMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'externalPaymentId' field is set and is not null */ - public boolean isNotNullExternalPaymentId() { - return genClient.cacheValueIsNotNull(CacheKey.externalPaymentId); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'externalPaymentId' field has been set, however the value could be null */ - public boolean hasExternalPaymentId() { - return genClient.cacheHasKey(CacheKey.externalPaymentId); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'externalPaymentId'. - */ - public RetrievePaymentRequestMessage setExternalPaymentId(java.lang.String externalPaymentId) { - return genClient.setOther(externalPaymentId, CacheKey.externalPaymentId); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'externalPaymentId' field, the 'has' method for this field will now return false */ - public void clearExternalPaymentId() { - genClient.clear(CacheKey.externalPaymentId); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public RetrievePaymentRequestMessage copyChanges() { - RetrievePaymentRequestMessage copy = new RetrievePaymentRequestMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(RetrievePaymentRequestMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new RetrievePaymentRequestMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public RetrievePaymentRequestMessage createFromParcel(android.os.Parcel in) { - RetrievePaymentRequestMessage instance = new RetrievePaymentRequestMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public RetrievePaymentRequestMessage[] newArray(int size) { - return new RetrievePaymentRequestMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public RetrievePaymentRequestMessage create(org.json.JSONObject jsonObject) { - return new RetrievePaymentRequestMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean EXTERNALPAYMENTID_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrievePaymentResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrievePaymentResponseMessage.java deleted file mode 100644 index 88af7d2a1..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrievePaymentResponseMessage.java +++ /dev/null @@ -1,404 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getReason reason}
  • - *
  • {@link #getExternalPaymentId externalPaymentId}
  • - *
  • {@link #getQueryStatus queryStatus}
  • - *
  • {@link #getPayment payment}
  • - *
- */ -@SuppressWarnings("all") -public class RetrievePaymentResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * May be populated when the operation fails. - */ - public java.lang.String getReason() { - return genClient.cacheGet(CacheKey.reason); - } - - /** - * The externalPaymentId used when a payment was created - */ - public java.lang.String getExternalPaymentId() { - return genClient.cacheGet(CacheKey.externalPaymentId); - } - - /** - * The status of the query - */ - public com.clover.sdk.v3.remotemessage.QueryStatus getQueryStatus() { - return genClient.cacheGet(CacheKey.queryStatus); - } - - /** - * Payment information - */ - public com.clover.sdk.v3.payments.Payment getPayment() { - return genClient.cacheGet(CacheKey.payment); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - reason { - @Override - public Object extractValue(RetrievePaymentResponseMessage instance) { - return instance.genClient.extractOther("reason", java.lang.String.class); - } - }, - externalPaymentId { - @Override - public Object extractValue(RetrievePaymentResponseMessage instance) { - return instance.genClient.extractOther("externalPaymentId", java.lang.String.class); - } - }, - queryStatus { - @Override - public Object extractValue(RetrievePaymentResponseMessage instance) { - return instance.genClient.extractEnum("queryStatus", com.clover.sdk.v3.remotemessage.QueryStatus.class); - } - }, - payment { - @Override - public Object extractValue(RetrievePaymentResponseMessage instance) { - return instance.genClient.extractRecord("payment", com.clover.sdk.v3.payments.Payment.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(RetrievePaymentResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(RetrievePaymentResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public RetrievePaymentResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.RETRIEVE_PAYMENT_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected RetrievePaymentResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public RetrievePaymentResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public RetrievePaymentResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public RetrievePaymentResponseMessage(RetrievePaymentResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'reason' field is set and is not null */ - public boolean isNotNullReason() { - return genClient.cacheValueIsNotNull(CacheKey.reason); - } - - /** Checks whether the 'externalPaymentId' field is set and is not null */ - public boolean isNotNullExternalPaymentId() { - return genClient.cacheValueIsNotNull(CacheKey.externalPaymentId); - } - - /** Checks whether the 'queryStatus' field is set and is not null */ - public boolean isNotNullQueryStatus() { - return genClient.cacheValueIsNotNull(CacheKey.queryStatus); - } - - /** Checks whether the 'payment' field is set and is not null */ - public boolean isNotNullPayment() { - return genClient.cacheValueIsNotNull(CacheKey.payment); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'reason' field has been set, however the value could be null */ - public boolean hasReason() { - return genClient.cacheHasKey(CacheKey.reason); - } - - /** Checks whether the 'externalPaymentId' field has been set, however the value could be null */ - public boolean hasExternalPaymentId() { - return genClient.cacheHasKey(CacheKey.externalPaymentId); - } - - /** Checks whether the 'queryStatus' field has been set, however the value could be null */ - public boolean hasQueryStatus() { - return genClient.cacheHasKey(CacheKey.queryStatus); - } - - /** Checks whether the 'payment' field has been set, however the value could be null */ - public boolean hasPayment() { - return genClient.cacheHasKey(CacheKey.payment); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'reason'. - */ - public RetrievePaymentResponseMessage setReason(java.lang.String reason) { - return genClient.setOther(reason, CacheKey.reason); - } - - /** - * Sets the field 'externalPaymentId'. - */ - public RetrievePaymentResponseMessage setExternalPaymentId(java.lang.String externalPaymentId) { - return genClient.setOther(externalPaymentId, CacheKey.externalPaymentId); - } - - /** - * Sets the field 'queryStatus'. - */ - public RetrievePaymentResponseMessage setQueryStatus(com.clover.sdk.v3.remotemessage.QueryStatus queryStatus) { - return genClient.setOther(queryStatus, CacheKey.queryStatus); - } - - /** - * Sets the field 'payment'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public RetrievePaymentResponseMessage setPayment(com.clover.sdk.v3.payments.Payment payment) { - return genClient.setRecord(payment, CacheKey.payment); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'reason' field, the 'has' method for this field will now return false */ - public void clearReason() { - genClient.clear(CacheKey.reason); - } - /** Clears the 'externalPaymentId' field, the 'has' method for this field will now return false */ - public void clearExternalPaymentId() { - genClient.clear(CacheKey.externalPaymentId); - } - /** Clears the 'queryStatus' field, the 'has' method for this field will now return false */ - public void clearQueryStatus() { - genClient.clear(CacheKey.queryStatus); - } - /** Clears the 'payment' field, the 'has' method for this field will now return false */ - public void clearPayment() { - genClient.clear(CacheKey.payment); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public RetrievePaymentResponseMessage copyChanges() { - RetrievePaymentResponseMessage copy = new RetrievePaymentResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(RetrievePaymentResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new RetrievePaymentResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public RetrievePaymentResponseMessage createFromParcel(android.os.Parcel in) { - RetrievePaymentResponseMessage instance = new RetrievePaymentResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public RetrievePaymentResponseMessage[] newArray(int size) { - return new RetrievePaymentResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public RetrievePaymentResponseMessage create(org.json.JSONObject jsonObject) { - return new RetrievePaymentResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean REASON_IS_REQUIRED = false; - public static final boolean EXTERNALPAYMENTID_IS_REQUIRED = false; - public static final boolean QUERYSTATUS_IS_REQUIRED = false; - public static final boolean PAYMENT_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrievePendingPaymentsMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrievePendingPaymentsMessage.java deleted file mode 100644 index a518cfba7..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrievePendingPaymentsMessage.java +++ /dev/null @@ -1,258 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
- */ -@SuppressWarnings("all") -public class RetrievePendingPaymentsMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - method { - @Override - public Object extractValue(RetrievePendingPaymentsMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(RetrievePendingPaymentsMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public RetrievePendingPaymentsMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.RETRIEVE_PENDING_PAYMENTS); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected RetrievePendingPaymentsMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public RetrievePendingPaymentsMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public RetrievePendingPaymentsMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public RetrievePendingPaymentsMessage(RetrievePendingPaymentsMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public RetrievePendingPaymentsMessage copyChanges() { - RetrievePendingPaymentsMessage copy = new RetrievePendingPaymentsMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(RetrievePendingPaymentsMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new RetrievePendingPaymentsMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public RetrievePendingPaymentsMessage createFromParcel(android.os.Parcel in) { - RetrievePendingPaymentsMessage instance = new RetrievePendingPaymentsMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public RetrievePendingPaymentsMessage[] newArray(int size) { - return new RetrievePendingPaymentsMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public RetrievePendingPaymentsMessage create(org.json.JSONObject jsonObject) { - return new RetrievePendingPaymentsMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrievePendingPaymentsResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrievePendingPaymentsResponseMessage.java deleted file mode 100644 index 490d7ea96..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/RetrievePendingPaymentsResponseMessage.java +++ /dev/null @@ -1,335 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getStatus status}
  • - *
  • {@link #getPendingPaymentEntries pendingPaymentEntries}
  • - *
- */ -@SuppressWarnings("all") -public class RetrievePendingPaymentsResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The status of the result - */ - public com.clover.sdk.v3.remotemessage.ResultStatus getStatus() { - return genClient.cacheGet(CacheKey.status); - } - - /** - * The pending payments. - */ - public java.util.List getPendingPaymentEntries() { - return genClient.cacheGet(CacheKey.pendingPaymentEntries); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - status { - @Override - public Object extractValue(RetrievePendingPaymentsResponseMessage instance) { - return instance.genClient.extractEnum("status", com.clover.sdk.v3.remotemessage.ResultStatus.class); - } - }, - pendingPaymentEntries { - @Override - public Object extractValue(RetrievePendingPaymentsResponseMessage instance) { - return instance.genClient.extractListRecord("pendingPaymentEntries", com.clover.sdk.v3.base.PendingPaymentEntry.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(RetrievePendingPaymentsResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(RetrievePendingPaymentsResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public RetrievePendingPaymentsResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.RETRIEVE_PENDING_PAYMENTS_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected RetrievePendingPaymentsResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public RetrievePendingPaymentsResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public RetrievePendingPaymentsResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public RetrievePendingPaymentsResponseMessage(RetrievePendingPaymentsResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'status' field is set and is not null */ - public boolean isNotNullStatus() { - return genClient.cacheValueIsNotNull(CacheKey.status); - } - - /** Checks whether the 'pendingPaymentEntries' field is set and is not null */ - public boolean isNotNullPendingPaymentEntries() { - return genClient.cacheValueIsNotNull(CacheKey.pendingPaymentEntries); - } - - /** Checks whether the 'pendingPaymentEntries' field is set and is not null and is not empty */ - public boolean isNotEmptyPendingPaymentEntries() { return isNotNullPendingPaymentEntries() && !getPendingPaymentEntries().isEmpty(); } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'status' field has been set, however the value could be null */ - public boolean hasStatus() { - return genClient.cacheHasKey(CacheKey.status); - } - - /** Checks whether the 'pendingPaymentEntries' field has been set, however the value could be null */ - public boolean hasPendingPaymentEntries() { - return genClient.cacheHasKey(CacheKey.pendingPaymentEntries); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'status'. - */ - public RetrievePendingPaymentsResponseMessage setStatus(com.clover.sdk.v3.remotemessage.ResultStatus status) { - return genClient.setOther(status, CacheKey.status); - } - - /** - * Sets the field 'pendingPaymentEntries'. - * - * Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will. - */ - public RetrievePendingPaymentsResponseMessage setPendingPaymentEntries(java.util.List pendingPaymentEntries) { - return genClient.setArrayRecord(pendingPaymentEntries, CacheKey.pendingPaymentEntries); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'status' field, the 'has' method for this field will now return false */ - public void clearStatus() { - genClient.clear(CacheKey.status); - } - /** Clears the 'pendingPaymentEntries' field, the 'has' method for this field will now return false */ - public void clearPendingPaymentEntries() { - genClient.clear(CacheKey.pendingPaymentEntries); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public RetrievePendingPaymentsResponseMessage copyChanges() { - RetrievePendingPaymentsResponseMessage copy = new RetrievePendingPaymentsResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(RetrievePendingPaymentsResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new RetrievePendingPaymentsResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public RetrievePendingPaymentsResponseMessage createFromParcel(android.os.Parcel in) { - RetrievePendingPaymentsResponseMessage instance = new RetrievePendingPaymentsResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public RetrievePendingPaymentsResponseMessage[] newArray(int size) { - return new RetrievePendingPaymentsResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public RetrievePendingPaymentsResponseMessage create(org.json.JSONObject jsonObject) { - return new RetrievePendingPaymentsResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean STATUS_IS_REQUIRED = false; - public static final boolean PENDINGPAYMENTENTRIES_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ShowPaymentReceiptOptionsMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ShowPaymentReceiptOptionsMessage.java deleted file mode 100644 index 6c9c6641e..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ShowPaymentReceiptOptionsMessage.java +++ /dev/null @@ -1,369 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getOrderId orderId}
  • - *
  • {@link #getPaymentId paymentId}
  • - *
  • {@link #getDisableCloverPrinting disableCloverPrinting}
  • - *
- */ -@SuppressWarnings("all") -public class ShowPaymentReceiptOptionsMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * Unique identifier for a order - */ - public java.lang.String getOrderId() { - return genClient.cacheGet(CacheKey.orderId); - } - - /** - * Unique identifier for a payment - */ - public java.lang.String getPaymentId() { - return genClient.cacheGet(CacheKey.paymentId); - } - - public java.lang.Boolean getDisableCloverPrinting() { - return genClient.cacheGet(CacheKey.disableCloverPrinting); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - orderId { - @Override - public Object extractValue(ShowPaymentReceiptOptionsMessage instance) { - return instance.genClient.extractOther("orderId", java.lang.String.class); - } - }, - paymentId { - @Override - public Object extractValue(ShowPaymentReceiptOptionsMessage instance) { - return instance.genClient.extractOther("paymentId", java.lang.String.class); - } - }, - disableCloverPrinting { - @Override - public Object extractValue(ShowPaymentReceiptOptionsMessage instance) { - return instance.genClient.extractOther("disableCloverPrinting", java.lang.Boolean.class); - } - }, - method { - @Override - public Object extractValue(ShowPaymentReceiptOptionsMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(ShowPaymentReceiptOptionsMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public ShowPaymentReceiptOptionsMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.SHOW_PAYMENT_RECEIPT_OPTIONS); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected ShowPaymentReceiptOptionsMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public ShowPaymentReceiptOptionsMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public ShowPaymentReceiptOptionsMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public ShowPaymentReceiptOptionsMessage(ShowPaymentReceiptOptionsMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - - genClient.validateLength(getOrderId(), 13); - - genClient.validateLength(getPaymentId(), 13); - } - - /** Checks whether the 'orderId' field is set and is not null */ - public boolean isNotNullOrderId() { - return genClient.cacheValueIsNotNull(CacheKey.orderId); - } - - /** Checks whether the 'paymentId' field is set and is not null */ - public boolean isNotNullPaymentId() { - return genClient.cacheValueIsNotNull(CacheKey.paymentId); - } - - /** Checks whether the 'disableCloverPrinting' field is set and is not null */ - public boolean isNotNullDisableCloverPrinting() { - return genClient.cacheValueIsNotNull(CacheKey.disableCloverPrinting); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'orderId' field has been set, however the value could be null */ - public boolean hasOrderId() { - return genClient.cacheHasKey(CacheKey.orderId); - } - - /** Checks whether the 'paymentId' field has been set, however the value could be null */ - public boolean hasPaymentId() { - return genClient.cacheHasKey(CacheKey.paymentId); - } - - /** Checks whether the 'disableCloverPrinting' field has been set, however the value could be null */ - public boolean hasDisableCloverPrinting() { - return genClient.cacheHasKey(CacheKey.disableCloverPrinting); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'orderId'. - */ - public ShowPaymentReceiptOptionsMessage setOrderId(java.lang.String orderId) { - return genClient.setOther(orderId, CacheKey.orderId); - } - - /** - * Sets the field 'paymentId'. - */ - public ShowPaymentReceiptOptionsMessage setPaymentId(java.lang.String paymentId) { - return genClient.setOther(paymentId, CacheKey.paymentId); - } - - /** - * Sets the field 'disableCloverPrinting'. - */ - public ShowPaymentReceiptOptionsMessage setDisableCloverPrinting(java.lang.Boolean disableCloverPrinting) { - return genClient.setOther(disableCloverPrinting, CacheKey.disableCloverPrinting); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'orderId' field, the 'has' method for this field will now return false */ - public void clearOrderId() { - genClient.clear(CacheKey.orderId); - } - /** Clears the 'paymentId' field, the 'has' method for this field will now return false */ - public void clearPaymentId() { - genClient.clear(CacheKey.paymentId); - } - /** Clears the 'disableCloverPrinting' field, the 'has' method for this field will now return false */ - public void clearDisableCloverPrinting() { - genClient.clear(CacheKey.disableCloverPrinting); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public ShowPaymentReceiptOptionsMessage copyChanges() { - ShowPaymentReceiptOptionsMessage copy = new ShowPaymentReceiptOptionsMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(ShowPaymentReceiptOptionsMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new ShowPaymentReceiptOptionsMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public ShowPaymentReceiptOptionsMessage createFromParcel(android.os.Parcel in) { - ShowPaymentReceiptOptionsMessage instance = new ShowPaymentReceiptOptionsMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public ShowPaymentReceiptOptionsMessage[] newArray(int size) { - return new ShowPaymentReceiptOptionsMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public ShowPaymentReceiptOptionsMessage create(org.json.JSONObject jsonObject) { - return new ShowPaymentReceiptOptionsMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean ORDERID_IS_REQUIRED = false; - public static final long ORDERID_MAX_LEN = 13; - public static final boolean PAYMENTID_IS_REQUIRED = false; - public static final long PAYMENTID_MAX_LEN = 13; - public static final boolean DISABLECLOVERPRINTING_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ShutDownMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ShutDownMessage.java deleted file mode 100644 index 5e84969c3..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ShutDownMessage.java +++ /dev/null @@ -1,258 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
- */ -@SuppressWarnings("all") -public class ShutDownMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - method { - @Override - public Object extractValue(ShutDownMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(ShutDownMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public ShutDownMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.SHUTDOWN); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected ShutDownMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public ShutDownMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public ShutDownMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public ShutDownMessage(ShutDownMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public ShutDownMessage copyChanges() { - ShutDownMessage copy = new ShutDownMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(ShutDownMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new ShutDownMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public ShutDownMessage createFromParcel(android.os.Parcel in) { - ShutDownMessage instance = new ShutDownMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public ShutDownMessage[] newArray(int size) { - return new ShutDownMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public ShutDownMessage create(org.json.JSONObject jsonObject) { - return new ShutDownMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/SignatureVerifiedMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/SignatureVerifiedMessage.java deleted file mode 100644 index f4155bee9..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/SignatureVerifiedMessage.java +++ /dev/null @@ -1,332 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getPayment payment}
  • - *
  • {@link #getVerified verified}
  • - *
- */ -@SuppressWarnings("all") -public class SignatureVerifiedMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * A payment - */ - public com.clover.sdk.v3.payments.Payment getPayment() { - return genClient.cacheGet(CacheKey.payment); - } - - /** - * If true the signature is verified - */ - public java.lang.Boolean getVerified() { - return genClient.cacheGet(CacheKey.verified); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - payment { - @Override - public Object extractValue(SignatureVerifiedMessage instance) { - return instance.genClient.extractRecord("payment", com.clover.sdk.v3.payments.Payment.JSON_CREATOR); - } - }, - verified { - @Override - public Object extractValue(SignatureVerifiedMessage instance) { - return instance.genClient.extractOther("verified", java.lang.Boolean.class); - } - }, - method { - @Override - public Object extractValue(SignatureVerifiedMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(SignatureVerifiedMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public SignatureVerifiedMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.SIGNATURE_VERIFIED); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected SignatureVerifiedMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public SignatureVerifiedMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public SignatureVerifiedMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public SignatureVerifiedMessage(SignatureVerifiedMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'payment' field is set and is not null */ - public boolean isNotNullPayment() { - return genClient.cacheValueIsNotNull(CacheKey.payment); - } - - /** Checks whether the 'verified' field is set and is not null */ - public boolean isNotNullVerified() { - return genClient.cacheValueIsNotNull(CacheKey.verified); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'payment' field has been set, however the value could be null */ - public boolean hasPayment() { - return genClient.cacheHasKey(CacheKey.payment); - } - - /** Checks whether the 'verified' field has been set, however the value could be null */ - public boolean hasVerified() { - return genClient.cacheHasKey(CacheKey.verified); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'payment'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public SignatureVerifiedMessage setPayment(com.clover.sdk.v3.payments.Payment payment) { - return genClient.setRecord(payment, CacheKey.payment); - } - - /** - * Sets the field 'verified'. - */ - public SignatureVerifiedMessage setVerified(java.lang.Boolean verified) { - return genClient.setOther(verified, CacheKey.verified); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'payment' field, the 'has' method for this field will now return false */ - public void clearPayment() { - genClient.clear(CacheKey.payment); - } - /** Clears the 'verified' field, the 'has' method for this field will now return false */ - public void clearVerified() { - genClient.clear(CacheKey.verified); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public SignatureVerifiedMessage copyChanges() { - SignatureVerifiedMessage copy = new SignatureVerifiedMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(SignatureVerifiedMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new SignatureVerifiedMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public SignatureVerifiedMessage createFromParcel(android.os.Parcel in) { - SignatureVerifiedMessage instance = new SignatureVerifiedMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public SignatureVerifiedMessage[] newArray(int size) { - return new SignatureVerifiedMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public SignatureVerifiedMessage create(org.json.JSONObject jsonObject) { - return new SignatureVerifiedMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean PAYMENT_IS_REQUIRED = false; - public static final boolean VERIFIED_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TerminalMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TerminalMessage.java deleted file mode 100644 index b6acd5b3f..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TerminalMessage.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getText text}
  • - *
- */ -@SuppressWarnings("all") -public class TerminalMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The message to display. - */ - public java.lang.String getText() { - return genClient.cacheGet(CacheKey.text); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - text { - @Override - public Object extractValue(TerminalMessage instance) { - return instance.genClient.extractOther("text", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(TerminalMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(TerminalMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public TerminalMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.TERMINAL_MESSAGE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected TerminalMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public TerminalMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public TerminalMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public TerminalMessage(TerminalMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'text' field is set and is not null */ - public boolean isNotNullText() { - return genClient.cacheValueIsNotNull(CacheKey.text); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'text' field has been set, however the value could be null */ - public boolean hasText() { - return genClient.cacheHasKey(CacheKey.text); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'text'. - */ - public TerminalMessage setText(java.lang.String text) { - return genClient.setOther(text, CacheKey.text); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'text' field, the 'has' method for this field will now return false */ - public void clearText() { - genClient.clear(CacheKey.text); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public TerminalMessage copyChanges() { - TerminalMessage copy = new TerminalMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(TerminalMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new TerminalMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public TerminalMessage createFromParcel(android.os.Parcel in) { - TerminalMessage instance = new TerminalMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public TerminalMessage[] newArray(int size) { - return new TerminalMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public TerminalMessage create(org.json.JSONObject jsonObject) { - return new TerminalMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean TEXT_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TextPrintMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TextPrintMessage.java deleted file mode 100644 index 6d8f18892..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TextPrintMessage.java +++ /dev/null @@ -1,370 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getTextLines textLines}
  • - *
  • {@link #getExternalPrintJobId externalPrintJobId}
  • - *
  • {@link #getPrinter printer}
  • - *
- */ -@SuppressWarnings("all") -public class TextPrintMessage extends com.clover.sdk.v3.remotemessage.Message { - - public java.util.List getTextLines() { - return genClient.cacheGet(CacheKey.textLines); - } - - /** - * External print job ID assigned to this request - */ - public java.lang.String getExternalPrintJobId() { - return genClient.cacheGet(CacheKey.externalPrintJobId); - } - - /** - * Printer to which the print job should be routed. - */ - public com.clover.sdk.v3.printer.Printer getPrinter() { - return genClient.cacheGet(CacheKey.printer); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - textLines { - @Override - public Object extractValue(TextPrintMessage instance) { - return instance.genClient.extractListOther("textLines", java.lang.String.class); - } - }, - externalPrintJobId { - @Override - public Object extractValue(TextPrintMessage instance) { - return instance.genClient.extractOther("externalPrintJobId", java.lang.String.class); - } - }, - printer { - @Override - public Object extractValue(TextPrintMessage instance) { - return instance.genClient.extractRecord("printer", com.clover.sdk.v3.printer.Printer.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(TextPrintMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(TextPrintMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public TextPrintMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.PRINT_TEXT); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected TextPrintMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public TextPrintMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public TextPrintMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public TextPrintMessage(TextPrintMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'textLines' field is set and is not null */ - public boolean isNotNullTextLines() { - return genClient.cacheValueIsNotNull(CacheKey.textLines); - } - - /** Checks whether the 'textLines' field is set and is not null and is not empty */ - public boolean isNotEmptyTextLines() { return isNotNullTextLines() && !getTextLines().isEmpty(); } - - /** Checks whether the 'externalPrintJobId' field is set and is not null */ - public boolean isNotNullExternalPrintJobId() { - return genClient.cacheValueIsNotNull(CacheKey.externalPrintJobId); - } - - /** Checks whether the 'printer' field is set and is not null */ - public boolean isNotNullPrinter() { - return genClient.cacheValueIsNotNull(CacheKey.printer); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'textLines' field has been set, however the value could be null */ - public boolean hasTextLines() { - return genClient.cacheHasKey(CacheKey.textLines); - } - - /** Checks whether the 'externalPrintJobId' field has been set, however the value could be null */ - public boolean hasExternalPrintJobId() { - return genClient.cacheHasKey(CacheKey.externalPrintJobId); - } - - /** Checks whether the 'printer' field has been set, however the value could be null */ - public boolean hasPrinter() { - return genClient.cacheHasKey(CacheKey.printer); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'textLines'. - * - * Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will. - */ - public TextPrintMessage setTextLines(java.util.List textLines) { - return genClient.setArrayOther(textLines, CacheKey.textLines); - } - - /** - * Sets the field 'externalPrintJobId'. - */ - public TextPrintMessage setExternalPrintJobId(java.lang.String externalPrintJobId) { - return genClient.setOther(externalPrintJobId, CacheKey.externalPrintJobId); - } - - /** - * Sets the field 'printer'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public TextPrintMessage setPrinter(com.clover.sdk.v3.printer.Printer printer) { - return genClient.setRecord(printer, CacheKey.printer); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'textLines' field, the 'has' method for this field will now return false */ - public void clearTextLines() { - genClient.clear(CacheKey.textLines); - } - /** Clears the 'externalPrintJobId' field, the 'has' method for this field will now return false */ - public void clearExternalPrintJobId() { - genClient.clear(CacheKey.externalPrintJobId); - } - /** Clears the 'printer' field, the 'has' method for this field will now return false */ - public void clearPrinter() { - genClient.clear(CacheKey.printer); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public TextPrintMessage copyChanges() { - TextPrintMessage copy = new TextPrintMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(TextPrintMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new TextPrintMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public TextPrintMessage createFromParcel(android.os.Parcel in) { - TextPrintMessage instance = new TextPrintMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public TextPrintMessage[] newArray(int size) { - return new TextPrintMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public TextPrintMessage create(org.json.JSONObject jsonObject) { - return new TextPrintMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean TEXTLINES_IS_REQUIRED = false; - public static final boolean EXTERNALPRINTJOBID_IS_REQUIRED = false; - public static final boolean PRINTER_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ThankYouMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ThankYouMessage.java deleted file mode 100644 index 80083415b..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/ThankYouMessage.java +++ /dev/null @@ -1,258 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
- */ -@SuppressWarnings("all") -public class ThankYouMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - method { - @Override - public Object extractValue(ThankYouMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(ThankYouMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public ThankYouMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.SHOW_THANK_YOU_SCREEN); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected ThankYouMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public ThankYouMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public ThankYouMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public ThankYouMessage(ThankYouMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public ThankYouMessage copyChanges() { - ThankYouMessage copy = new ThankYouMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(ThankYouMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new ThankYouMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public ThankYouMessage createFromParcel(android.os.Parcel in) { - ThankYouMessage instance = new ThankYouMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public ThankYouMessage[] newArray(int size) { - return new ThankYouMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public ThankYouMessage create(org.json.JSONObject jsonObject) { - return new ThankYouMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TipAddedMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TipAddedMessage.java deleted file mode 100644 index 80cf8324c..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TipAddedMessage.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getTipAmount tipAmount}
  • - *
- */ -@SuppressWarnings("all") -public class TipAddedMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * Amount paid in tips - */ - public java.lang.Long getTipAmount() { - return genClient.cacheGet(CacheKey.tipAmount); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - tipAmount { - @Override - public Object extractValue(TipAddedMessage instance) { - return instance.genClient.extractOther("tipAmount", java.lang.Long.class); - } - }, - method { - @Override - public Object extractValue(TipAddedMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(TipAddedMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public TipAddedMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.TIP_ADDED); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected TipAddedMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public TipAddedMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public TipAddedMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public TipAddedMessage(TipAddedMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'tipAmount' field is set and is not null */ - public boolean isNotNullTipAmount() { - return genClient.cacheValueIsNotNull(CacheKey.tipAmount); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'tipAmount' field has been set, however the value could be null */ - public boolean hasTipAmount() { - return genClient.cacheHasKey(CacheKey.tipAmount); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'tipAmount'. - */ - public TipAddedMessage setTipAmount(java.lang.Long tipAmount) { - return genClient.setOther(tipAmount, CacheKey.tipAmount); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'tipAmount' field, the 'has' method for this field will now return false */ - public void clearTipAmount() { - genClient.clear(CacheKey.tipAmount); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public TipAddedMessage copyChanges() { - TipAddedMessage copy = new TipAddedMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(TipAddedMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new TipAddedMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public TipAddedMessage createFromParcel(android.os.Parcel in) { - TipAddedMessage instance = new TipAddedMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public TipAddedMessage[] newArray(int size) { - return new TipAddedMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public TipAddedMessage create(org.json.JSONObject jsonObject) { - return new TipAddedMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean TIPAMOUNT_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TipAdjustMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TipAdjustMessage.java deleted file mode 100644 index 39f0c1499..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TipAdjustMessage.java +++ /dev/null @@ -1,372 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getTipAmount tipAmount}
  • - *
  • {@link #getOrderId orderId}
  • - *
  • {@link #getPaymentId paymentId}
  • - *
- */ -@SuppressWarnings("all") -public class TipAdjustMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * Amount paid in tips - */ - public java.lang.Long getTipAmount() { - return genClient.cacheGet(CacheKey.tipAmount); - } - - /** - * Unique identifier for a order - */ - public java.lang.String getOrderId() { - return genClient.cacheGet(CacheKey.orderId); - } - - /** - * Unique identifier for a payment - */ - public java.lang.String getPaymentId() { - return genClient.cacheGet(CacheKey.paymentId); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - tipAmount { - @Override - public Object extractValue(TipAdjustMessage instance) { - return instance.genClient.extractOther("tipAmount", java.lang.Long.class); - } - }, - orderId { - @Override - public Object extractValue(TipAdjustMessage instance) { - return instance.genClient.extractOther("orderId", java.lang.String.class); - } - }, - paymentId { - @Override - public Object extractValue(TipAdjustMessage instance) { - return instance.genClient.extractOther("paymentId", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(TipAdjustMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(TipAdjustMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public TipAdjustMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.TIP_ADJUST); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected TipAdjustMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public TipAdjustMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public TipAdjustMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public TipAdjustMessage(TipAdjustMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - - genClient.validateLength(getOrderId(), 13); - - genClient.validateLength(getPaymentId(), 13); - } - - /** Checks whether the 'tipAmount' field is set and is not null */ - public boolean isNotNullTipAmount() { - return genClient.cacheValueIsNotNull(CacheKey.tipAmount); - } - - /** Checks whether the 'orderId' field is set and is not null */ - public boolean isNotNullOrderId() { - return genClient.cacheValueIsNotNull(CacheKey.orderId); - } - - /** Checks whether the 'paymentId' field is set and is not null */ - public boolean isNotNullPaymentId() { - return genClient.cacheValueIsNotNull(CacheKey.paymentId); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'tipAmount' field has been set, however the value could be null */ - public boolean hasTipAmount() { - return genClient.cacheHasKey(CacheKey.tipAmount); - } - - /** Checks whether the 'orderId' field has been set, however the value could be null */ - public boolean hasOrderId() { - return genClient.cacheHasKey(CacheKey.orderId); - } - - /** Checks whether the 'paymentId' field has been set, however the value could be null */ - public boolean hasPaymentId() { - return genClient.cacheHasKey(CacheKey.paymentId); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'tipAmount'. - */ - public TipAdjustMessage setTipAmount(java.lang.Long tipAmount) { - return genClient.setOther(tipAmount, CacheKey.tipAmount); - } - - /** - * Sets the field 'orderId'. - */ - public TipAdjustMessage setOrderId(java.lang.String orderId) { - return genClient.setOther(orderId, CacheKey.orderId); - } - - /** - * Sets the field 'paymentId'. - */ - public TipAdjustMessage setPaymentId(java.lang.String paymentId) { - return genClient.setOther(paymentId, CacheKey.paymentId); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'tipAmount' field, the 'has' method for this field will now return false */ - public void clearTipAmount() { - genClient.clear(CacheKey.tipAmount); - } - /** Clears the 'orderId' field, the 'has' method for this field will now return false */ - public void clearOrderId() { - genClient.clear(CacheKey.orderId); - } - /** Clears the 'paymentId' field, the 'has' method for this field will now return false */ - public void clearPaymentId() { - genClient.clear(CacheKey.paymentId); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public TipAdjustMessage copyChanges() { - TipAdjustMessage copy = new TipAdjustMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(TipAdjustMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new TipAdjustMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public TipAdjustMessage createFromParcel(android.os.Parcel in) { - TipAdjustMessage instance = new TipAdjustMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public TipAdjustMessage[] newArray(int size) { - return new TipAdjustMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public TipAdjustMessage create(org.json.JSONObject jsonObject) { - return new TipAdjustMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean TIPAMOUNT_IS_REQUIRED = false; - public static final boolean ORDERID_IS_REQUIRED = false; - public static final long ORDERID_MAX_LEN = 13; - public static final boolean PAYMENTID_IS_REQUIRED = false; - public static final long PAYMENTID_MAX_LEN = 13; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TipAdjustResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TipAdjustResponseMessage.java deleted file mode 100644 index ec67d1b1d..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TipAdjustResponseMessage.java +++ /dev/null @@ -1,408 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getSuccess success}
  • - *
  • {@link #getAmount amount}
  • - *
  • {@link #getOrderId orderId}
  • - *
  • {@link #getPaymentId paymentId}
  • - *
- */ -@SuppressWarnings("all") -public class TipAdjustResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * If true the tip adjustment succeeded - */ - public java.lang.Boolean getSuccess() { - return genClient.cacheGet(CacheKey.success); - } - - /** - * Amount of tip - */ - public java.lang.Long getAmount() { - return genClient.cacheGet(CacheKey.amount); - } - - /** - * Unique identifier for a order - */ - public java.lang.String getOrderId() { - return genClient.cacheGet(CacheKey.orderId); - } - - /** - * Unique identifier for a payment - */ - public java.lang.String getPaymentId() { - return genClient.cacheGet(CacheKey.paymentId); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - success { - @Override - public Object extractValue(TipAdjustResponseMessage instance) { - return instance.genClient.extractOther("success", java.lang.Boolean.class); - } - }, - amount { - @Override - public Object extractValue(TipAdjustResponseMessage instance) { - return instance.genClient.extractOther("amount", java.lang.Long.class); - } - }, - orderId { - @Override - public Object extractValue(TipAdjustResponseMessage instance) { - return instance.genClient.extractOther("orderId", java.lang.String.class); - } - }, - paymentId { - @Override - public Object extractValue(TipAdjustResponseMessage instance) { - return instance.genClient.extractOther("paymentId", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(TipAdjustResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(TipAdjustResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public TipAdjustResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.TIP_ADJUST_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected TipAdjustResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public TipAdjustResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public TipAdjustResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public TipAdjustResponseMessage(TipAdjustResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - - genClient.validateLength(getOrderId(), 13); - - genClient.validateLength(getPaymentId(), 13); - } - - /** Checks whether the 'success' field is set and is not null */ - public boolean isNotNullSuccess() { - return genClient.cacheValueIsNotNull(CacheKey.success); - } - - /** Checks whether the 'amount' field is set and is not null */ - public boolean isNotNullAmount() { - return genClient.cacheValueIsNotNull(CacheKey.amount); - } - - /** Checks whether the 'orderId' field is set and is not null */ - public boolean isNotNullOrderId() { - return genClient.cacheValueIsNotNull(CacheKey.orderId); - } - - /** Checks whether the 'paymentId' field is set and is not null */ - public boolean isNotNullPaymentId() { - return genClient.cacheValueIsNotNull(CacheKey.paymentId); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'success' field has been set, however the value could be null */ - public boolean hasSuccess() { - return genClient.cacheHasKey(CacheKey.success); - } - - /** Checks whether the 'amount' field has been set, however the value could be null */ - public boolean hasAmount() { - return genClient.cacheHasKey(CacheKey.amount); - } - - /** Checks whether the 'orderId' field has been set, however the value could be null */ - public boolean hasOrderId() { - return genClient.cacheHasKey(CacheKey.orderId); - } - - /** Checks whether the 'paymentId' field has been set, however the value could be null */ - public boolean hasPaymentId() { - return genClient.cacheHasKey(CacheKey.paymentId); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'success'. - */ - public TipAdjustResponseMessage setSuccess(java.lang.Boolean success) { - return genClient.setOther(success, CacheKey.success); - } - - /** - * Sets the field 'amount'. - */ - public TipAdjustResponseMessage setAmount(java.lang.Long amount) { - return genClient.setOther(amount, CacheKey.amount); - } - - /** - * Sets the field 'orderId'. - */ - public TipAdjustResponseMessage setOrderId(java.lang.String orderId) { - return genClient.setOther(orderId, CacheKey.orderId); - } - - /** - * Sets the field 'paymentId'. - */ - public TipAdjustResponseMessage setPaymentId(java.lang.String paymentId) { - return genClient.setOther(paymentId, CacheKey.paymentId); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'success' field, the 'has' method for this field will now return false */ - public void clearSuccess() { - genClient.clear(CacheKey.success); - } - /** Clears the 'amount' field, the 'has' method for this field will now return false */ - public void clearAmount() { - genClient.clear(CacheKey.amount); - } - /** Clears the 'orderId' field, the 'has' method for this field will now return false */ - public void clearOrderId() { - genClient.clear(CacheKey.orderId); - } - /** Clears the 'paymentId' field, the 'has' method for this field will now return false */ - public void clearPaymentId() { - genClient.clear(CacheKey.paymentId); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public TipAdjustResponseMessage copyChanges() { - TipAdjustResponseMessage copy = new TipAdjustResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(TipAdjustResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new TipAdjustResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public TipAdjustResponseMessage createFromParcel(android.os.Parcel in) { - TipAdjustResponseMessage instance = new TipAdjustResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public TipAdjustResponseMessage[] newArray(int size) { - return new TipAdjustResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public TipAdjustResponseMessage create(org.json.JSONObject jsonObject) { - return new TipAdjustResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean SUCCESS_IS_REQUIRED = false; - public static final boolean AMOUNT_IS_REQUIRED = false; - public static final boolean ORDERID_IS_REQUIRED = false; - public static final long ORDERID_MAX_LEN = 13; - public static final boolean PAYMENTID_IS_REQUIRED = false; - public static final long PAYMENTID_MAX_LEN = 13; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TransactionType.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TransactionType.java deleted file mode 100644 index f4a19a4f1..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TransactionType.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import android.os.Parcelable; -import android.os.Parcel; - -/** - * This is an auto-generated Clover data enum. - */ -@SuppressWarnings("all") -public enum TransactionType implements Parcelable { - PAYMENT, CREDIT, AUTH, DATA, BALANCE_INQUIRY, PAYMENT_REVERSAL, CREDIT_REVERSAL; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(final Parcel dest, final int flags) { - dest.writeString(name()); - } - - public static final Creator CREATOR = new Creator() { - @Override - public TransactionType createFromParcel(final Parcel source) { - return TransactionType.valueOf(source.readString()); - } - - @Override - public TransactionType[] newArray(final int size) { - return new TransactionType[size]; - } - }; -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStartRequestMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStartRequestMessage.java deleted file mode 100644 index 24ff20d86..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStartRequestMessage.java +++ /dev/null @@ -1,406 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getSuppressOnScreenTips suppressOnScreenTips}
  • - *
  • {@link #getOrder order}
  • - *
  • {@link #getPayIntent payIntent}
  • - *
  • {@link #getRequestInfo requestInfo}
  • - *
- */ -@SuppressWarnings("all") -public class TxStartRequestMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * If true, then tips on the screen should not be displayed. - */ - public java.lang.Boolean getSuppressOnScreenTips() { - return genClient.cacheGet(CacheKey.suppressOnScreenTips); - } - - /** - * The order - */ - public com.clover.sdk.v3.order.Order getOrder() { - return genClient.cacheGet(CacheKey.order); - } - - /** - * The payIntent - */ - public com.clover.sdk.v3.remotemessage.PayIntent getPayIntent() { - return genClient.cacheGet(CacheKey.payIntent); - } - - /** - * Extra information to include with the request, like type of request - */ - public java.lang.String getRequestInfo() { - return genClient.cacheGet(CacheKey.requestInfo); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - suppressOnScreenTips { - @Override - public Object extractValue(TxStartRequestMessage instance) { - return instance.genClient.extractOther("suppressOnScreenTips", java.lang.Boolean.class); - } - }, - order { - @Override - public Object extractValue(TxStartRequestMessage instance) { - return instance.genClient.extractRecord("order", com.clover.sdk.v3.order.Order.JSON_CREATOR); - } - }, - payIntent { - @Override - public Object extractValue(TxStartRequestMessage instance) { - return instance.genClient.extractRecord("payIntent", com.clover.sdk.v3.remotemessage.PayIntent.JSON_CREATOR); - } - }, - requestInfo { - @Override - public Object extractValue(TxStartRequestMessage instance) { - return instance.genClient.extractOther("requestInfo", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(TxStartRequestMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(TxStartRequestMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public TxStartRequestMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.TX_START); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected TxStartRequestMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public TxStartRequestMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public TxStartRequestMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public TxStartRequestMessage(TxStartRequestMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'suppressOnScreenTips' field is set and is not null */ - public boolean isNotNullSuppressOnScreenTips() { - return genClient.cacheValueIsNotNull(CacheKey.suppressOnScreenTips); - } - - /** Checks whether the 'order' field is set and is not null */ - public boolean isNotNullOrder() { - return genClient.cacheValueIsNotNull(CacheKey.order); - } - - /** Checks whether the 'payIntent' field is set and is not null */ - public boolean isNotNullPayIntent() { - return genClient.cacheValueIsNotNull(CacheKey.payIntent); - } - - /** Checks whether the 'requestInfo' field is set and is not null */ - public boolean isNotNullRequestInfo() { - return genClient.cacheValueIsNotNull(CacheKey.requestInfo); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'suppressOnScreenTips' field has been set, however the value could be null */ - public boolean hasSuppressOnScreenTips() { - return genClient.cacheHasKey(CacheKey.suppressOnScreenTips); - } - - /** Checks whether the 'order' field has been set, however the value could be null */ - public boolean hasOrder() { - return genClient.cacheHasKey(CacheKey.order); - } - - /** Checks whether the 'payIntent' field has been set, however the value could be null */ - public boolean hasPayIntent() { - return genClient.cacheHasKey(CacheKey.payIntent); - } - - /** Checks whether the 'requestInfo' field has been set, however the value could be null */ - public boolean hasRequestInfo() { - return genClient.cacheHasKey(CacheKey.requestInfo); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'suppressOnScreenTips'. - */ - public TxStartRequestMessage setSuppressOnScreenTips(java.lang.Boolean suppressOnScreenTips) { - return genClient.setOther(suppressOnScreenTips, CacheKey.suppressOnScreenTips); - } - - /** - * Sets the field 'order'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public TxStartRequestMessage setOrder(com.clover.sdk.v3.order.Order order) { - return genClient.setRecord(order, CacheKey.order); - } - - /** - * Sets the field 'payIntent'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public TxStartRequestMessage setPayIntent(com.clover.sdk.v3.remotemessage.PayIntent payIntent) { - return genClient.setRecord(payIntent, CacheKey.payIntent); - } - - /** - * Sets the field 'requestInfo'. - */ - public TxStartRequestMessage setRequestInfo(java.lang.String requestInfo) { - return genClient.setOther(requestInfo, CacheKey.requestInfo); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'suppressOnScreenTips' field, the 'has' method for this field will now return false */ - public void clearSuppressOnScreenTips() { - genClient.clear(CacheKey.suppressOnScreenTips); - } - /** Clears the 'order' field, the 'has' method for this field will now return false */ - public void clearOrder() { - genClient.clear(CacheKey.order); - } - /** Clears the 'payIntent' field, the 'has' method for this field will now return false */ - public void clearPayIntent() { - genClient.clear(CacheKey.payIntent); - } - /** Clears the 'requestInfo' field, the 'has' method for this field will now return false */ - public void clearRequestInfo() { - genClient.clear(CacheKey.requestInfo); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public TxStartRequestMessage copyChanges() { - TxStartRequestMessage copy = new TxStartRequestMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(TxStartRequestMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new TxStartRequestMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public TxStartRequestMessage createFromParcel(android.os.Parcel in) { - TxStartRequestMessage instance = new TxStartRequestMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public TxStartRequestMessage[] newArray(int size) { - return new TxStartRequestMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public TxStartRequestMessage create(org.json.JSONObject jsonObject) { - return new TxStartRequestMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean SUPPRESSONSCREENTIPS_IS_REQUIRED = false; - public static final boolean ORDER_IS_REQUIRED = false; - public static final boolean PAYINTENT_IS_REQUIRED = false; - public static final boolean REQUESTINFO_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStartResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStartResponseMessage.java deleted file mode 100644 index 16ce317f0..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStartResponseMessage.java +++ /dev/null @@ -1,437 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getSuccess success}
  • - *
  • {@link #getOrder order}
  • - *
  • {@link #getExternalPaymentId externalPaymentId}
  • - *
  • {@link #getResult result}
  • - *
  • {@link #getRequestInfo requestInfo}
  • - *
- */ -@SuppressWarnings("all") -public class TxStartResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * Deprecated - */ - public java.lang.Boolean getSuccess() { - return genClient.cacheGet(CacheKey.success); - } - - /** - * The order - */ - public com.clover.sdk.v3.order.Order getOrder() { - return genClient.cacheGet(CacheKey.order); - } - - /** - * The external id provided in the initiating pay intent - */ - public java.lang.String getExternalPaymentId() { - return genClient.cacheGet(CacheKey.externalPaymentId); - } - - public com.clover.sdk.v3.remotemessage.TxStartResponseResult getResult() { - return genClient.cacheGet(CacheKey.result); - } - - /** - * Extra information to include with the request, like type of request - */ - public java.lang.String getRequestInfo() { - return genClient.cacheGet(CacheKey.requestInfo); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - success { - @Override - public Object extractValue(TxStartResponseMessage instance) { - return instance.genClient.extractOther("success", java.lang.Boolean.class); - } - }, - order { - @Override - public Object extractValue(TxStartResponseMessage instance) { - return instance.genClient.extractRecord("order", com.clover.sdk.v3.order.Order.JSON_CREATOR); - } - }, - externalPaymentId { - @Override - public Object extractValue(TxStartResponseMessage instance) { - return instance.genClient.extractOther("externalPaymentId", java.lang.String.class); - } - }, - result { - @Override - public Object extractValue(TxStartResponseMessage instance) { - return instance.genClient.extractEnum("result", com.clover.sdk.v3.remotemessage.TxStartResponseResult.class); - } - }, - requestInfo { - @Override - public Object extractValue(TxStartResponseMessage instance) { - return instance.genClient.extractOther("requestInfo", java.lang.String.class); - } - }, - method { - @Override - public Object extractValue(TxStartResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(TxStartResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public TxStartResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.TX_START_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected TxStartResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public TxStartResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public TxStartResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public TxStartResponseMessage(TxStartResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'success' field is set and is not null */ - public boolean isNotNullSuccess() { - return genClient.cacheValueIsNotNull(CacheKey.success); - } - - /** Checks whether the 'order' field is set and is not null */ - public boolean isNotNullOrder() { - return genClient.cacheValueIsNotNull(CacheKey.order); - } - - /** Checks whether the 'externalPaymentId' field is set and is not null */ - public boolean isNotNullExternalPaymentId() { - return genClient.cacheValueIsNotNull(CacheKey.externalPaymentId); - } - - /** Checks whether the 'result' field is set and is not null */ - public boolean isNotNullResult() { - return genClient.cacheValueIsNotNull(CacheKey.result); - } - - /** Checks whether the 'requestInfo' field is set and is not null */ - public boolean isNotNullRequestInfo() { - return genClient.cacheValueIsNotNull(CacheKey.requestInfo); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'success' field has been set, however the value could be null */ - public boolean hasSuccess() { - return genClient.cacheHasKey(CacheKey.success); - } - - /** Checks whether the 'order' field has been set, however the value could be null */ - public boolean hasOrder() { - return genClient.cacheHasKey(CacheKey.order); - } - - /** Checks whether the 'externalPaymentId' field has been set, however the value could be null */ - public boolean hasExternalPaymentId() { - return genClient.cacheHasKey(CacheKey.externalPaymentId); - } - - /** Checks whether the 'result' field has been set, however the value could be null */ - public boolean hasResult() { - return genClient.cacheHasKey(CacheKey.result); - } - - /** Checks whether the 'requestInfo' field has been set, however the value could be null */ - public boolean hasRequestInfo() { - return genClient.cacheHasKey(CacheKey.requestInfo); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'success'. - */ - public TxStartResponseMessage setSuccess(java.lang.Boolean success) { - return genClient.setOther(success, CacheKey.success); - } - - /** - * Sets the field 'order'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public TxStartResponseMessage setOrder(com.clover.sdk.v3.order.Order order) { - return genClient.setRecord(order, CacheKey.order); - } - - /** - * Sets the field 'externalPaymentId'. - */ - public TxStartResponseMessage setExternalPaymentId(java.lang.String externalPaymentId) { - return genClient.setOther(externalPaymentId, CacheKey.externalPaymentId); - } - - /** - * Sets the field 'result'. - */ - public TxStartResponseMessage setResult(com.clover.sdk.v3.remotemessage.TxStartResponseResult result) { - return genClient.setOther(result, CacheKey.result); - } - - /** - * Sets the field 'requestInfo'. - */ - public TxStartResponseMessage setRequestInfo(java.lang.String requestInfo) { - return genClient.setOther(requestInfo, CacheKey.requestInfo); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'success' field, the 'has' method for this field will now return false */ - public void clearSuccess() { - genClient.clear(CacheKey.success); - } - /** Clears the 'order' field, the 'has' method for this field will now return false */ - public void clearOrder() { - genClient.clear(CacheKey.order); - } - /** Clears the 'externalPaymentId' field, the 'has' method for this field will now return false */ - public void clearExternalPaymentId() { - genClient.clear(CacheKey.externalPaymentId); - } - /** Clears the 'result' field, the 'has' method for this field will now return false */ - public void clearResult() { - genClient.clear(CacheKey.result); - } - /** Clears the 'requestInfo' field, the 'has' method for this field will now return false */ - public void clearRequestInfo() { - genClient.clear(CacheKey.requestInfo); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public TxStartResponseMessage copyChanges() { - TxStartResponseMessage copy = new TxStartResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(TxStartResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new TxStartResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public TxStartResponseMessage createFromParcel(android.os.Parcel in) { - TxStartResponseMessage instance = new TxStartResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public TxStartResponseMessage[] newArray(int size) { - return new TxStartResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public TxStartResponseMessage create(org.json.JSONObject jsonObject) { - return new TxStartResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean SUCCESS_IS_REQUIRED = false; - public static final boolean ORDER_IS_REQUIRED = false; - public static final boolean EXTERNALPAYMENTID_IS_REQUIRED = false; - public static final boolean RESULT_IS_REQUIRED = false; - public static final boolean REQUESTINFO_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStartResponseResult.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStartResponseResult.java deleted file mode 100644 index d93314eb2..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStartResponseResult.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import android.os.Parcelable; -import android.os.Parcel; - -/** - * This is an auto-generated Clover data enum. - */ -@SuppressWarnings("all") -public enum TxStartResponseResult implements Parcelable { - SUCCESS, ORDER_MODIFIED, ORDER_LOAD, DUPLICATE, FAIL; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(final Parcel dest, final int flags) { - dest.writeString(name()); - } - - public static final Creator CREATOR = new Creator() { - @Override - public TxStartResponseResult createFromParcel(final Parcel source) { - return TxStartResponseResult.valueOf(source.readString()); - } - - @Override - public TxStartResponseResult[] newArray(final int size) { - return new TxStartResponseResult[size]; - } - }; -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxState.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxState.java deleted file mode 100644 index 214ba7f77..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxState.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import android.os.Parcelable; -import android.os.Parcel; - -/** - * This is an auto-generated Clover data enum. - */ -@SuppressWarnings("all") -public enum TxState implements Parcelable { - START, SUCCESS, FAIL; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(final Parcel dest, final int flags) { - dest.writeString(name()); - } - - public static final Creator CREATOR = new Creator() { - @Override - public TxState createFromParcel(final Parcel source) { - return TxState.valueOf(source.readString()); - } - - @Override - public TxState[] newArray(final int size) { - return new TxState[size]; - } - }; -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStateEnum.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStateEnum.java deleted file mode 100644 index 40ccf7e61..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStateEnum.java +++ /dev/null @@ -1,209 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; -import com.clover.sdk.GenericParcelable; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getTxState txState}
  • - *
- */ -@SuppressWarnings("all") -public class TxStateEnum extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable { - - public com.clover.sdk.v3.remotemessage.TxState getTxState() { - return genClient.cacheGet(CacheKey.txState); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - txState { - @Override - public Object extractValue(TxStateEnum instance) { - return instance.genClient.extractEnum("txState", com.clover.sdk.v3.remotemessage.TxState.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public TxStateEnum() { - genClient = new GenericClient(this); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected TxStateEnum(boolean noInit) { - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public TxStateEnum(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public TxStateEnum(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public TxStateEnum(TxStateEnum src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'txState' field is set and is not null */ - public boolean isNotNullTxState() { - return genClient.cacheValueIsNotNull(CacheKey.txState); - } - - - - /** Checks whether the 'txState' field has been set, however the value could be null */ - public boolean hasTxState() { - return genClient.cacheHasKey(CacheKey.txState); - } - - - /** - * Sets the field 'txState'. - */ - public TxStateEnum setTxState(com.clover.sdk.v3.remotemessage.TxState txState) { - return genClient.setOther(txState, CacheKey.txState); - } - - - /** Clears the 'txState' field, the 'has' method for this field will now return false */ - public void clearTxState() { - genClient.clear(CacheKey.txState); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public TxStateEnum copyChanges() { - TxStateEnum copy = new TxStateEnum(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(TxStateEnum src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new TxStateEnum(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public TxStateEnum createFromParcel(android.os.Parcel in) { - TxStateEnum instance = new TxStateEnum(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public TxStateEnum[] newArray(int size) { - return new TxStateEnum[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public TxStateEnum create(org.json.JSONObject jsonObject) { - return new TxStateEnum(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean TXSTATE_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStateMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStateMessage.java deleted file mode 100644 index f1cc6ad7c..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/TxStateMessage.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getTxState txState}
  • - *
- */ -@SuppressWarnings("all") -public class TxStateMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * Transaction state - */ - public com.clover.sdk.v3.remotemessage.TxState getTxState() { - return genClient.cacheGet(CacheKey.txState); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - txState { - @Override - public Object extractValue(TxStateMessage instance) { - return instance.genClient.extractEnum("txState", com.clover.sdk.v3.remotemessage.TxState.class); - } - }, - method { - @Override - public Object extractValue(TxStateMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(TxStateMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public TxStateMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.TX_STATE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected TxStateMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public TxStateMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public TxStateMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public TxStateMessage(TxStateMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'txState' field is set and is not null */ - public boolean isNotNullTxState() { - return genClient.cacheValueIsNotNull(CacheKey.txState); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'txState' field has been set, however the value could be null */ - public boolean hasTxState() { - return genClient.cacheHasKey(CacheKey.txState); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'txState'. - */ - public TxStateMessage setTxState(com.clover.sdk.v3.remotemessage.TxState txState) { - return genClient.setOther(txState, CacheKey.txState); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'txState' field, the 'has' method for this field will now return false */ - public void clearTxState() { - genClient.clear(CacheKey.txState); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public TxStateMessage copyChanges() { - TxStateMessage copy = new TxStateMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(TxStateMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new TxStateMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public TxStateMessage createFromParcel(android.os.Parcel in) { - TxStateMessage instance = new TxStateMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public TxStateMessage[] newArray(int size) { - return new TxStateMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public TxStateMessage create(org.json.JSONObject jsonObject) { - return new TxStateMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean TXSTATE_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/UiDirection.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/UiDirection.java deleted file mode 100644 index d912dea58..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/UiDirection.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import android.os.Parcelable; -import android.os.Parcel; - -/** - * This is an auto-generated Clover data enum. - */ -@SuppressWarnings("all") -public enum UiDirection implements Parcelable { - ENTER, EXIT; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(final Parcel dest, final int flags) { - dest.writeString(name()); - } - - public static final Creator CREATOR = new Creator() { - @Override - public UiDirection createFromParcel(final Parcel source) { - return UiDirection.valueOf(source.readString()); - } - - @Override - public UiDirection[] newArray(final int size) { - return new UiDirection[size]; - } - }; -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/UiState.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/UiState.java deleted file mode 100644 index 8a85882dd..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/UiState.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import android.os.Parcelable; -import android.os.Parcel; - -/** - * This is an auto-generated Clover data enum. - */ -@SuppressWarnings("all") -public enum UiState implements Parcelable { - START, FAILED, FATAL, TRY_AGAIN, INPUT_ERROR, PIN_BYPASS_CONFIRM, CANCELED, TIMED_OUT, DECLINED, VOIDED, CONFIGURING, PROCESSING, REMOVE_CARD, PROCESSING_GO_ONLINE, PROCESSING_CREDIT, PROCESSING_SWIPE, SELECT_APPLICATION, PIN_PAD, MANUAL_CARD_NUMBER, MANUAL_CARD_CVV, MANUAL_CARD_CVV_UNREADABLE, MANUAL_CARD_EXPIRATION, SELECT_ACCOUNT, CASHBACK_CONFIRM, CASHBACK_SELECT, CONTACTLESS_TAP_REQUIRED, VOICE_REFERRAL_RESULT, CONFIRM_PARTIAL_AUTH, PACKET_EXCEPTION, CONFIRM_DUPLICATE_CHECK, FORCE_ACCEPTANCE, VERIFY_SIGNATURE_ON_PAPER, VERIFY_SIGNATURE_ON_PAPER_CONFIRM_VOID, VERIFY_SIGNATURE_ON_SCREEN, VERIFY_SIGNATURE_ON_SCREEN_CONFIRM_VOID, ADD_SIGNATURE, SIGNATURE_ON_SCREEN_FALLBACK, RETURN_TO_MERCHANT, SIGNATURE_REJECT, ADD_SIGNATURE_CANCEL_CONFIRM, ADD_TIP, RECEIPT_OPTIONS, HANDLE_TENDER, SELECT_LANGUAGE, APPROVED, OFFLINE_PAYMENT_CONFIRM, CUSTOM_ACTIVITY, STARTING_CUSTOM_ACTIVITY; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(final Parcel dest, final int flags) { - dest.writeString(name()); - } - - public static final Creator CREATOR = new Creator() { - @Override - public UiState createFromParcel(final Parcel source) { - return UiState.valueOf(source.readString()); - } - - @Override - public UiState[] newArray(final int size) { - return new UiState[size]; - } - }; -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/UiStateMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/UiStateMessage.java deleted file mode 100644 index 75c37378c..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/UiStateMessage.java +++ /dev/null @@ -1,398 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getUiText uiText}
  • - *
  • {@link #getUiDirection uiDirection}
  • - *
  • {@link #getInputOptions inputOptions}
  • - *
  • {@link #getUiState uiState}
  • - *
- */ -@SuppressWarnings("all") -public class UiStateMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The text for the UI - */ - public java.lang.String getUiText() { - return genClient.cacheGet(CacheKey.uiText); - } - - public com.clover.sdk.v3.remotemessage.UiDirection getUiDirection() { - return genClient.cacheGet(CacheKey.uiDirection); - } - - public java.util.List getInputOptions() { - return genClient.cacheGet(CacheKey.inputOptions); - } - - public com.clover.sdk.v3.remotemessage.UiState getUiState() { - return genClient.cacheGet(CacheKey.uiState); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - uiText { - @Override - public Object extractValue(UiStateMessage instance) { - return instance.genClient.extractOther("uiText", java.lang.String.class); - } - }, - uiDirection { - @Override - public Object extractValue(UiStateMessage instance) { - return instance.genClient.extractEnum("uiDirection", com.clover.sdk.v3.remotemessage.UiDirection.class); - } - }, - inputOptions { - @Override - public Object extractValue(UiStateMessage instance) { - return instance.genClient.extractListRecord("inputOptions", com.clover.sdk.v3.remotemessage.InputOption.JSON_CREATOR); - } - }, - uiState { - @Override - public Object extractValue(UiStateMessage instance) { - return instance.genClient.extractEnum("uiState", com.clover.sdk.v3.remotemessage.UiState.class); - } - }, - method { - @Override - public Object extractValue(UiStateMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(UiStateMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public UiStateMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.UI_STATE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected UiStateMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public UiStateMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public UiStateMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public UiStateMessage(UiStateMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'uiText' field is set and is not null */ - public boolean isNotNullUiText() { - return genClient.cacheValueIsNotNull(CacheKey.uiText); - } - - /** Checks whether the 'uiDirection' field is set and is not null */ - public boolean isNotNullUiDirection() { - return genClient.cacheValueIsNotNull(CacheKey.uiDirection); - } - - /** Checks whether the 'inputOptions' field is set and is not null */ - public boolean isNotNullInputOptions() { - return genClient.cacheValueIsNotNull(CacheKey.inputOptions); - } - - /** Checks whether the 'inputOptions' field is set and is not null and is not empty */ - public boolean isNotEmptyInputOptions() { return isNotNullInputOptions() && !getInputOptions().isEmpty(); } - - /** Checks whether the 'uiState' field is set and is not null */ - public boolean isNotNullUiState() { - return genClient.cacheValueIsNotNull(CacheKey.uiState); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'uiText' field has been set, however the value could be null */ - public boolean hasUiText() { - return genClient.cacheHasKey(CacheKey.uiText); - } - - /** Checks whether the 'uiDirection' field has been set, however the value could be null */ - public boolean hasUiDirection() { - return genClient.cacheHasKey(CacheKey.uiDirection); - } - - /** Checks whether the 'inputOptions' field has been set, however the value could be null */ - public boolean hasInputOptions() { - return genClient.cacheHasKey(CacheKey.inputOptions); - } - - /** Checks whether the 'uiState' field has been set, however the value could be null */ - public boolean hasUiState() { - return genClient.cacheHasKey(CacheKey.uiState); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'uiText'. - */ - public UiStateMessage setUiText(java.lang.String uiText) { - return genClient.setOther(uiText, CacheKey.uiText); - } - - /** - * Sets the field 'uiDirection'. - */ - public UiStateMessage setUiDirection(com.clover.sdk.v3.remotemessage.UiDirection uiDirection) { - return genClient.setOther(uiDirection, CacheKey.uiDirection); - } - - /** - * Sets the field 'inputOptions'. - * - * Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will. - */ - public UiStateMessage setInputOptions(java.util.List inputOptions) { - return genClient.setArrayRecord(inputOptions, CacheKey.inputOptions); - } - - /** - * Sets the field 'uiState'. - */ - public UiStateMessage setUiState(com.clover.sdk.v3.remotemessage.UiState uiState) { - return genClient.setOther(uiState, CacheKey.uiState); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'uiText' field, the 'has' method for this field will now return false */ - public void clearUiText() { - genClient.clear(CacheKey.uiText); - } - /** Clears the 'uiDirection' field, the 'has' method for this field will now return false */ - public void clearUiDirection() { - genClient.clear(CacheKey.uiDirection); - } - /** Clears the 'inputOptions' field, the 'has' method for this field will now return false */ - public void clearInputOptions() { - genClient.clear(CacheKey.inputOptions); - } - /** Clears the 'uiState' field, the 'has' method for this field will now return false */ - public void clearUiState() { - genClient.clear(CacheKey.uiState); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public UiStateMessage copyChanges() { - UiStateMessage copy = new UiStateMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(UiStateMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new UiStateMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public UiStateMessage createFromParcel(android.os.Parcel in) { - UiStateMessage instance = new UiStateMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public UiStateMessage[] newArray(int size) { - return new UiStateMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public UiStateMessage create(org.json.JSONObject jsonObject) { - return new UiStateMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean UITEXT_IS_REQUIRED = false; - public static final boolean UIDIRECTION_IS_REQUIRED = false; - public static final boolean INPUTOPTIONS_IS_REQUIRED = false; - public static final boolean UISTATE_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/VaultCardMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/VaultCardMessage.java deleted file mode 100644 index 96b8e13ae..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/VaultCardMessage.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getCardEntryMethods cardEntryMethods}
  • - *
- */ -@SuppressWarnings("all") -public class VaultCardMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * Allowed entry methods - */ - public java.lang.Integer getCardEntryMethods() { - return genClient.cacheGet(CacheKey.cardEntryMethods); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - cardEntryMethods { - @Override - public Object extractValue(VaultCardMessage instance) { - return instance.genClient.extractOther("cardEntryMethods", java.lang.Integer.class); - } - }, - method { - @Override - public Object extractValue(VaultCardMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(VaultCardMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public VaultCardMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.VAULT_CARD); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected VaultCardMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public VaultCardMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public VaultCardMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public VaultCardMessage(VaultCardMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'cardEntryMethods' field is set and is not null */ - public boolean isNotNullCardEntryMethods() { - return genClient.cacheValueIsNotNull(CacheKey.cardEntryMethods); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'cardEntryMethods' field has been set, however the value could be null */ - public boolean hasCardEntryMethods() { - return genClient.cacheHasKey(CacheKey.cardEntryMethods); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'cardEntryMethods'. - */ - public VaultCardMessage setCardEntryMethods(java.lang.Integer cardEntryMethods) { - return genClient.setOther(cardEntryMethods, CacheKey.cardEntryMethods); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'cardEntryMethods' field, the 'has' method for this field will now return false */ - public void clearCardEntryMethods() { - genClient.clear(CacheKey.cardEntryMethods); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public VaultCardMessage copyChanges() { - VaultCardMessage copy = new VaultCardMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(VaultCardMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new VaultCardMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public VaultCardMessage createFromParcel(android.os.Parcel in) { - VaultCardMessage instance = new VaultCardMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public VaultCardMessage[] newArray(int size) { - return new VaultCardMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public VaultCardMessage create(org.json.JSONObject jsonObject) { - return new VaultCardMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean CARDENTRYMETHODS_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/VaultCardResponseMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/VaultCardResponseMessage.java deleted file mode 100644 index af674b2ea..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/VaultCardResponseMessage.java +++ /dev/null @@ -1,365 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getReason reason}
  • - *
  • {@link #getStatus status}
  • - *
  • {@link #getCard card}
  • - *
- */ -@SuppressWarnings("all") -public class VaultCardResponseMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * May be populated when the operation fails. - */ - public java.lang.String getReason() { - return genClient.cacheGet(CacheKey.reason); - } - - public com.clover.sdk.v3.remotemessage.ResultStatus getStatus() { - return genClient.cacheGet(CacheKey.status); - } - - /** - * The card that was vaulted. - */ - public com.clover.sdk.v3.payments.VaultedCard getCard() { - return genClient.cacheGet(CacheKey.card); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - reason { - @Override - public Object extractValue(VaultCardResponseMessage instance) { - return instance.genClient.extractOther("reason", java.lang.String.class); - } - }, - status { - @Override - public Object extractValue(VaultCardResponseMessage instance) { - return instance.genClient.extractEnum("status", com.clover.sdk.v3.remotemessage.ResultStatus.class); - } - }, - card { - @Override - public Object extractValue(VaultCardResponseMessage instance) { - return instance.genClient.extractRecord("card", com.clover.sdk.v3.payments.VaultedCard.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(VaultCardResponseMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(VaultCardResponseMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public VaultCardResponseMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.VAULT_CARD_RESPONSE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected VaultCardResponseMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public VaultCardResponseMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public VaultCardResponseMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public VaultCardResponseMessage(VaultCardResponseMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'reason' field is set and is not null */ - public boolean isNotNullReason() { - return genClient.cacheValueIsNotNull(CacheKey.reason); - } - - /** Checks whether the 'status' field is set and is not null */ - public boolean isNotNullStatus() { - return genClient.cacheValueIsNotNull(CacheKey.status); - } - - /** Checks whether the 'card' field is set and is not null */ - public boolean isNotNullCard() { - return genClient.cacheValueIsNotNull(CacheKey.card); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'reason' field has been set, however the value could be null */ - public boolean hasReason() { - return genClient.cacheHasKey(CacheKey.reason); - } - - /** Checks whether the 'status' field has been set, however the value could be null */ - public boolean hasStatus() { - return genClient.cacheHasKey(CacheKey.status); - } - - /** Checks whether the 'card' field has been set, however the value could be null */ - public boolean hasCard() { - return genClient.cacheHasKey(CacheKey.card); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'reason'. - */ - public VaultCardResponseMessage setReason(java.lang.String reason) { - return genClient.setOther(reason, CacheKey.reason); - } - - /** - * Sets the field 'status'. - */ - public VaultCardResponseMessage setStatus(com.clover.sdk.v3.remotemessage.ResultStatus status) { - return genClient.setOther(status, CacheKey.status); - } - - /** - * Sets the field 'card'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public VaultCardResponseMessage setCard(com.clover.sdk.v3.payments.VaultedCard card) { - return genClient.setRecord(card, CacheKey.card); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'reason' field, the 'has' method for this field will now return false */ - public void clearReason() { - genClient.clear(CacheKey.reason); - } - /** Clears the 'status' field, the 'has' method for this field will now return false */ - public void clearStatus() { - genClient.clear(CacheKey.status); - } - /** Clears the 'card' field, the 'has' method for this field will now return false */ - public void clearCard() { - genClient.clear(CacheKey.card); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public VaultCardResponseMessage copyChanges() { - VaultCardResponseMessage copy = new VaultCardResponseMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(VaultCardResponseMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new VaultCardResponseMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public VaultCardResponseMessage createFromParcel(android.os.Parcel in) { - VaultCardResponseMessage instance = new VaultCardResponseMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public VaultCardResponseMessage[] newArray(int size) { - return new VaultCardResponseMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public VaultCardResponseMessage create(org.json.JSONObject jsonObject) { - return new VaultCardResponseMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean REASON_IS_REQUIRED = false; - public static final boolean STATUS_IS_REQUIRED = false; - public static final boolean CARD_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/VerifySignatureMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/VerifySignatureMessage.java deleted file mode 100644 index b1b4391fd..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/VerifySignatureMessage.java +++ /dev/null @@ -1,334 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getPayment payment}
  • - *
  • {@link #getSignature signature}
  • - *
- */ -@SuppressWarnings("all") -public class VerifySignatureMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * A payment - */ - public com.clover.sdk.v3.payments.Payment getPayment() { - return genClient.cacheGet(CacheKey.payment); - } - - /** - * A signature - */ - public com.clover.sdk.v3.base.Signature getSignature() { - return genClient.cacheGet(CacheKey.signature); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - payment { - @Override - public Object extractValue(VerifySignatureMessage instance) { - return instance.genClient.extractRecord("payment", com.clover.sdk.v3.payments.Payment.JSON_CREATOR); - } - }, - signature { - @Override - public Object extractValue(VerifySignatureMessage instance) { - return instance.genClient.extractRecord("signature", com.clover.sdk.v3.base.Signature.JSON_CREATOR); - } - }, - method { - @Override - public Object extractValue(VerifySignatureMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(VerifySignatureMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public VerifySignatureMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.VERIFY_SIGNATURE); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected VerifySignatureMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public VerifySignatureMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public VerifySignatureMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public VerifySignatureMessage(VerifySignatureMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'payment' field is set and is not null */ - public boolean isNotNullPayment() { - return genClient.cacheValueIsNotNull(CacheKey.payment); - } - - /** Checks whether the 'signature' field is set and is not null */ - public boolean isNotNullSignature() { - return genClient.cacheValueIsNotNull(CacheKey.signature); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'payment' field has been set, however the value could be null */ - public boolean hasPayment() { - return genClient.cacheHasKey(CacheKey.payment); - } - - /** Checks whether the 'signature' field has been set, however the value could be null */ - public boolean hasSignature() { - return genClient.cacheHasKey(CacheKey.signature); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'payment'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public VerifySignatureMessage setPayment(com.clover.sdk.v3.payments.Payment payment) { - return genClient.setRecord(payment, CacheKey.payment); - } - - /** - * Sets the field 'signature'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public VerifySignatureMessage setSignature(com.clover.sdk.v3.base.Signature signature) { - return genClient.setRecord(signature, CacheKey.signature); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'payment' field, the 'has' method for this field will now return false */ - public void clearPayment() { - genClient.clear(CacheKey.payment); - } - /** Clears the 'signature' field, the 'has' method for this field will now return false */ - public void clearSignature() { - genClient.clear(CacheKey.signature); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public VerifySignatureMessage copyChanges() { - VerifySignatureMessage copy = new VerifySignatureMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(VerifySignatureMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new VerifySignatureMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public VerifySignatureMessage createFromParcel(android.os.Parcel in) { - VerifySignatureMessage instance = new VerifySignatureMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public VerifySignatureMessage[] newArray(int size) { - return new VerifySignatureMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public VerifySignatureMessage create(org.json.JSONObject jsonObject) { - return new VerifySignatureMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean PAYMENT_IS_REQUIRED = false; - public static final boolean SIGNATURE_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/VoidPaymentMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/VoidPaymentMessage.java deleted file mode 100644 index 803f812e7..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/VoidPaymentMessage.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
  • {@link #getPayment payment}
  • - *
  • {@link #getVoidReason voidReason}
  • - *
  • {@link #getDisableCloverPrinting disableCloverPrinting}
  • - *
  • {@link #getDisableReceiptSelection disableReceiptSelection}
  • - *
- */ -@SuppressWarnings("all") -public class VoidPaymentMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * A payment - */ - public com.clover.sdk.v3.payments.Payment getPayment() { - return genClient.cacheGet(CacheKey.payment); - } - - public com.clover.sdk.v3.order.VoidReason getVoidReason() { - return genClient.cacheGet(CacheKey.voidReason); - } - - public java.lang.Boolean getDisableCloverPrinting() { - return genClient.cacheGet(CacheKey.disableCloverPrinting); - } - - public java.lang.Boolean getDisableReceiptSelection() { - return genClient.cacheGet(CacheKey.disableReceiptSelection); - } - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - payment { - @Override - public Object extractValue(VoidPaymentMessage instance) { - return instance.genClient.extractRecord("payment", com.clover.sdk.v3.payments.Payment.JSON_CREATOR); - } - }, - voidReason { - @Override - public Object extractValue(VoidPaymentMessage instance) { - return instance.genClient.extractEnum("voidReason", com.clover.sdk.v3.order.VoidReason.class); - } - }, - disableCloverPrinting { - @Override - public Object extractValue(VoidPaymentMessage instance) { - return instance.genClient.extractOther("disableCloverPrinting", java.lang.Boolean.class); - } - }, - disableReceiptSelection { - @Override - public Object extractValue(VoidPaymentMessage instance) { - return instance.genClient.extractOther("disableReceiptSelection", java.lang.Boolean.class); - } - }, - method { - @Override - public Object extractValue(VoidPaymentMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(VoidPaymentMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public VoidPaymentMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.VOID_PAYMENT); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected VoidPaymentMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public VoidPaymentMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public VoidPaymentMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public VoidPaymentMessage(VoidPaymentMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'payment' field is set and is not null */ - public boolean isNotNullPayment() { - return genClient.cacheValueIsNotNull(CacheKey.payment); - } - - /** Checks whether the 'voidReason' field is set and is not null */ - public boolean isNotNullVoidReason() { - return genClient.cacheValueIsNotNull(CacheKey.voidReason); - } - - /** Checks whether the 'disableCloverPrinting' field is set and is not null */ - public boolean isNotNullDisableCloverPrinting() { - return genClient.cacheValueIsNotNull(CacheKey.disableCloverPrinting); - } - - /** Checks whether the 'disableReceiptSelection' field is set and is not null */ - public boolean isNotNullDisableReceiptSelection() { - return genClient.cacheValueIsNotNull(CacheKey.disableReceiptSelection); - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'payment' field has been set, however the value could be null */ - public boolean hasPayment() { - return genClient.cacheHasKey(CacheKey.payment); - } - - /** Checks whether the 'voidReason' field has been set, however the value could be null */ - public boolean hasVoidReason() { - return genClient.cacheHasKey(CacheKey.voidReason); - } - - /** Checks whether the 'disableCloverPrinting' field has been set, however the value could be null */ - public boolean hasDisableCloverPrinting() { - return genClient.cacheHasKey(CacheKey.disableCloverPrinting); - } - - /** Checks whether the 'disableReceiptSelection' field has been set, however the value could be null */ - public boolean hasDisableReceiptSelection() { - return genClient.cacheHasKey(CacheKey.disableReceiptSelection); - } - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'payment'. - * - * The parameter is not copied so changes to it will be reflected in this instance and vice-versa. - */ - public VoidPaymentMessage setPayment(com.clover.sdk.v3.payments.Payment payment) { - return genClient.setRecord(payment, CacheKey.payment); - } - - /** - * Sets the field 'voidReason'. - */ - public VoidPaymentMessage setVoidReason(com.clover.sdk.v3.order.VoidReason voidReason) { - return genClient.setOther(voidReason, CacheKey.voidReason); - } - - /** - * Sets the field 'disableCloverPrinting'. - */ - public VoidPaymentMessage setDisableCloverPrinting(java.lang.Boolean disableCloverPrinting) { - return genClient.setOther(disableCloverPrinting, CacheKey.disableCloverPrinting); - } - - /** - * Sets the field 'disableReceiptSelection'. - */ - public VoidPaymentMessage setDisableReceiptSelection(java.lang.Boolean disableReceiptSelection) { - return genClient.setOther(disableReceiptSelection, CacheKey.disableReceiptSelection); - } - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'payment' field, the 'has' method for this field will now return false */ - public void clearPayment() { - genClient.clear(CacheKey.payment); - } - /** Clears the 'voidReason' field, the 'has' method for this field will now return false */ - public void clearVoidReason() { - genClient.clear(CacheKey.voidReason); - } - /** Clears the 'disableCloverPrinting' field, the 'has' method for this field will now return false */ - public void clearDisableCloverPrinting() { - genClient.clear(CacheKey.disableCloverPrinting); - } - /** Clears the 'disableReceiptSelection' field, the 'has' method for this field will now return false */ - public void clearDisableReceiptSelection() { - genClient.clear(CacheKey.disableReceiptSelection); - } - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public VoidPaymentMessage copyChanges() { - VoidPaymentMessage copy = new VoidPaymentMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(VoidPaymentMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new VoidPaymentMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public VoidPaymentMessage createFromParcel(android.os.Parcel in) { - VoidPaymentMessage instance = new VoidPaymentMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public VoidPaymentMessage[] newArray(int size) { - return new VoidPaymentMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public VoidPaymentMessage create(org.json.JSONObject jsonObject) { - return new VoidPaymentMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean PAYMENT_IS_REQUIRED = false; - public static final boolean VOIDREASON_IS_REQUIRED = false; - public static final boolean DISABLECLOVERPRINTING_IS_REQUIRED = false; - public static final boolean DISABLERECEIPTSELECTION_IS_REQUIRED = false; - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/WelcomeMessage.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/WelcomeMessage.java deleted file mode 100644 index 3e35bbaeb..000000000 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotemessage/WelcomeMessage.java +++ /dev/null @@ -1,258 +0,0 @@ -/** - * Autogenerated by Avro - * - * DO NOT EDIT DIRECTLY - */ - - -/* - * Copyright (C) 2016 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.clover.sdk.v3.remotemessage; - -import com.clover.sdk.GenericClient; - -/** - * This is an auto-generated Clover data object. - *

- *

Fields

- *
    - *
- */ -@SuppressWarnings("all") -public class WelcomeMessage extends com.clover.sdk.v3.remotemessage.Message { - - /** - * The list of message types - */ - @Override - public com.clover.sdk.v3.remotemessage.Method getMethod() { - return genClient.cacheGet(CacheKey.method); - } - - /** - * The version of this message - */ - @Override - public java.lang.Integer getVersion() { - return genClient.cacheGet(CacheKey.version); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - method { - @Override - public Object extractValue(WelcomeMessage instance) { - return instance.genClient.extractEnum("method", com.clover.sdk.v3.remotemessage.Method.class); - } - }, - version { - @Override - public Object extractValue(WelcomeMessage instance) { - return instance.genClient.extractOther("version", java.lang.Integer.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public WelcomeMessage() { - super(false); - genClient = new GenericClient(this); - this.setMethod(com.clover.sdk.v3.remotemessage.Method.SHOW_WELCOME_SCREEN); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected WelcomeMessage(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public WelcomeMessage(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public WelcomeMessage(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public WelcomeMessage(WelcomeMessage src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'method' field is set and is not null */ - @Override - public boolean isNotNullMethod() { - return genClient.cacheValueIsNotNull(CacheKey.method); - } - - /** Checks whether the 'version' field is set and is not null */ - @Override - public boolean isNotNullVersion() { - return genClient.cacheValueIsNotNull(CacheKey.version); - } - - - - /** Checks whether the 'method' field has been set, however the value could be null */ - @Override - public boolean hasMethod() { - return genClient.cacheHasKey(CacheKey.method); - } - - /** Checks whether the 'version' field has been set, however the value could be null */ - @Override - public boolean hasVersion() { - return genClient.cacheHasKey(CacheKey.version); - } - - - /** - * Sets the field 'method'. - */ - @Override - public Message setMethod(com.clover.sdk.v3.remotemessage.Method method) { - return genClient.setOther(method, CacheKey.method); - } - - /** - * Sets the field 'version'. - */ - @Override - public Message setVersion(java.lang.Integer version) { - return genClient.setOther(version, CacheKey.version); - } - - - /** Clears the 'method' field, the 'has' method for this field will now return false */ - @Override - public void clearMethod() { - genClient.clear(CacheKey.method); - } - /** Clears the 'version' field, the 'has' method for this field will now return false */ - @Override - public void clearVersion() { - genClient.clear(CacheKey.version); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public WelcomeMessage copyChanges() { - WelcomeMessage copy = new WelcomeMessage(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(WelcomeMessage src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new WelcomeMessage(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { - @Override - public WelcomeMessage createFromParcel(android.os.Parcel in) { - WelcomeMessage instance = new WelcomeMessage(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; - } - - @Override - public WelcomeMessage[] newArray(int size) { - return new WelcomeMessage[size]; - } - }; - - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { - @Override - public WelcomeMessage create(org.json.JSONObject jsonObject) { - return new WelcomeMessage(jsonObject); - } - }; - - public interface Constraints { - - public static final boolean METHOD_IS_REQUIRED = false; - public static final boolean VERSION_IS_REQUIRED = false; - - } - -} diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/CloverDeviceErrorEvent.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/CloverDeviceErrorEvent.java index 920e37875..ac6301b8f 100644 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/CloverDeviceErrorEvent.java +++ b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/CloverDeviceErrorEvent.java @@ -93,8 +93,8 @@ public Object extractValue(CloverDeviceErrorEvent instance) { private GenericClient genClient; /** - * Constructs a new empty instance. - */ + * Constructs a new empty instance. + */ public CloverDeviceErrorEvent() { genClient = new GenericClient(this); } @@ -105,8 +105,8 @@ protected GenericClient getGenericClient() { } /** - * Constructs a new empty instance. - */ + * Constructs a new empty instance. + */ protected CloverDeviceErrorEvent(boolean noInit) { genClient = null; } diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/DeviceEventState.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/DeviceEventState.java index 9ece0e56a..403c195df 100644 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/DeviceEventState.java +++ b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/DeviceEventState.java @@ -1,6 +1,6 @@ /** * Autogenerated by Avro - * + * * DO NOT EDIT DIRECTLY */ @@ -31,7 +31,7 @@ */ @SuppressWarnings("all") public enum DeviceEventState implements Parcelable { - START, FAILED, FATAL, TRY_AGAIN, INPUT_ERROR, PIN_BYPASS_CONFIRM, CANCELED, TIMED_OUT, DECLINED, VOIDED, CONFIGURING, PROCESSING, REMOVE_CARD, PROCESSING_GO_ONLINE, PROCESSING_CREDIT, PROCESSING_SWIPE, SELECT_APPLICATION, PIN_PAD, MANUAL_CARD_NUMBER, MANUAL_CARD_CVV, MANUAL_CARD_CVV_UNREADABLE, MANUAL_CARD_EXPIRATION, SELECT_ACCOUNT, CASHBACK_CONFIRM, CASHBACK_SELECT, CONTACTLESS_TAP_REQUIRED, VOICE_REFERRAL_RESULT, CONFIRM_PARTIAL_AUTH, PACKET_EXCEPTION, CONFIRM_DUPLICATE_CHECK, VERIFY_SIGNATURE_ON_PAPER, VERIFY_SIGNATURE_ON_PAPER_CONFIRM_VOID, VERIFY_SIGNATURE_ON_SCREEN, VERIFY_SIGNATURE_ON_SCREEN_CONFIRM_VOID, ADD_SIGNATURE, SIGNATURE_ON_SCREEN_FALLBACK, RETURN_TO_MERCHANT, SIGNATURE_REJECT, ADD_SIGNATURE_CANCEL_CONFIRM, ADD_TIP, RECEIPT_OPTIONS, HANDLE_TENDER, SELECT_WITHDRAW_FROM_ACCOUNT, VERIFY_SURCHARGES, VOID_CONFIRM; + ADD_SIGNATURE, ADD_SIGNATURE_CANCEL_CONFIRM, ADD_TIP, APPROVE_ELV_LIMIT_OVERRIDE, APPROVED, CANCELED, CASHBACK_CONFIRM, CASHBACK_SELECT, CONFIGURING, CONFIRM_AMOUNT, CONFIRM_DUPLICATE_CHECK, CONFIRM_PARTIAL_AUTH, CONTACTLESS_TAP_REQUIRED, CUSTOM_ACTIVITY, CUSTOM_TIP_AMOUNT, DCC_HOST_REQUEST, DECLINED, ENTER_INSTALLMENT_CODE, ENTER_INSTALLMENTS, ENTER_PAN_LAST_FOUR, ERROR_SCREEN, FAILED, FATAL, FISCAL_INVOICE_NUMBER, FORCE_ACCEPTANCE, HANDLE_TENDER, INPUT_ERROR, MANUAL_CARD_CVV, MANUAL_CARD_CVV_UNREADABLE, MANUAL_CARD_EXPIRATION, MANUAL_CARD_NUMBER, MANUAL_ENTRY_FALLBACK, OFFLINE_PAYMENT_CONFIRM, PACKET_EXCEPTION, PERSONAL_ID_ENTRY, PERSONAL_ID_ENTRY_PAS, PIN_BYPASS_CONFIRM, PIN_PAD, PROCESSING, PROCESSING_CREDIT, PROCESSING_GO_ONLINE, PROCESSING_SWIPE, RECEIPT_OPTIONS, REMOVE_CARD, RETURN_TO_MERCHANT, SELECT_ACCOUNT, SELECT_APPLICATION, SELECT_DCC, SELECT_INSTALLMENT_PLAN, SELECT_LANGUAGE, SELECT_MULTI_MID, SELECT_TIP, SELECT_WITHDRAW_FROM_ACCOUNT, SHOW_SEPA_MANDAT, SIGNATURE_CUSTOMER_MODE, SIGNATURE_ON_SCREEN_FALLBACK, SIGNATURE_REJECT, START, STARTING_CUSTOM_ACTIVITY, SWIPE_CVV_ENTRY, TIMED_OUT, TRY_AGAIN, VERIFY_SIGNATURE_ON_PAPER, VERIFY_SIGNATURE_ON_PAPER_CONFIRM_VOID, VERIFY_SIGNATURE_ON_SCREEN, VERIFY_SIGNATURE_ON_SCREEN_CONFIRM_VOID, VERIFY_SURCHARGES, VOICE_REFERRAL_RESULT, VOID_CONFIRM, VOIDED; @Override public int describeContents() { diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/RetrievePendingPaymentsResponse.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/RetrievePendingPaymentsResponse.java index 7cc3be45d..49aae50b6 100644 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/RetrievePendingPaymentsResponse.java +++ b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/RetrievePendingPaymentsResponse.java @@ -1,6 +1,6 @@ /** * Autogenerated by Avro - * + * * DO NOT EDIT DIRECTLY */ @@ -36,343 +36,343 @@ @SuppressWarnings("all") public class RetrievePendingPaymentsResponse extends com.clover.sdk.v3.remotepay.BaseResponse { - /** - * The pending payments. - */ - public java.util.List getPendingPaymentEntries() { - return genClient.cacheGet(CacheKey.pendingPaymentEntries); - } - - /** - * If true then the requested operation succeeded - */ - @Override - public java.lang.Boolean getSuccess() { - return genClient.cacheGet(CacheKey.success); - } - - /** - * The result of the requested operation. - */ - @Override - public com.clover.sdk.v3.remotepay.ResponseCode getResult() { - return genClient.cacheGet(CacheKey.result); - } - - /** - * Optional information about result. - */ - @Override - public java.lang.String getReason() { - return genClient.cacheGet(CacheKey.reason); - } - - /** - * Detailed information about result. - */ - @Override - public java.lang.String getMessage() { - return genClient.cacheGet(CacheKey.message); - } - - - - - private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { - pendingPaymentEntries { - @Override - public Object extractValue(RetrievePendingPaymentsResponse instance) { - return instance.genClient.extractListRecord("pendingPaymentEntries", com.clover.sdk.v3.base.PendingPaymentEntry.JSON_CREATOR); - } - }, - success { - @Override - public Object extractValue(RetrievePendingPaymentsResponse instance) { - return instance.genClient.extractOther("success", java.lang.Boolean.class); - } - }, - result { - @Override - public Object extractValue(RetrievePendingPaymentsResponse instance) { - return instance.genClient.extractEnum("result", com.clover.sdk.v3.remotepay.ResponseCode.class); - } - }, - reason { - @Override - public Object extractValue(RetrievePendingPaymentsResponse instance) { - return instance.genClient.extractOther("reason", java.lang.String.class); - } - }, - message { - @Override - public Object extractValue(RetrievePendingPaymentsResponse instance) { - return instance.genClient.extractOther("message", java.lang.String.class); - } - }, - ; - } - - private GenericClient genClient; - - /** - * Constructs a new empty instance. - */ - public RetrievePendingPaymentsResponse() { - super(false); - genClient = new GenericClient(this); - } - - @Override - protected GenericClient getGenericClient() { - return genClient; - } - - /** - * Constructs a new empty instance. - */ - protected RetrievePendingPaymentsResponse(boolean noInit) { - super(false); - genClient = null; - } - - /** - * Constructs a new instance from the given JSON String. - */ - public RetrievePendingPaymentsResponse(String json) throws IllegalArgumentException { - this(); - try { - genClient.setJsonObject(new org.json.JSONObject(json)); - } catch (org.json.JSONException e) { - throw new IllegalArgumentException("invalid json", e); - } - } - - /** - * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be - * reflected in this instance and vice-versa. - */ - public RetrievePendingPaymentsResponse(org.json.JSONObject jsonObject) { - this(); - genClient.setJsonObject(jsonObject); - } - - /** - * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. - */ - public RetrievePendingPaymentsResponse(RetrievePendingPaymentsResponse src) { - this(); - if (src.genClient.getJsonObject() != null) { - genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); - } - } - - /** - * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be - * reflected in this instance and vice-versa. - */ - public org.json.JSONObject getJSONObject() { - return genClient.getJSONObject(); - } - - @Override - public void validate() { - } - - /** Checks whether the 'pendingPaymentEntries' field is set and is not null */ - public boolean isNotNullPendingPaymentEntries() { - return genClient.cacheValueIsNotNull(CacheKey.pendingPaymentEntries); - } - - /** Checks whether the 'pendingPaymentEntries' field is set and is not null and is not empty */ - public boolean isNotEmptyPendingPaymentEntries() { return isNotNullPendingPaymentEntries() && !getPendingPaymentEntries().isEmpty(); } - - /** Checks whether the 'success' field is set and is not null */ - @Override - public boolean isNotNullSuccess() { - return genClient.cacheValueIsNotNull(CacheKey.success); - } - - /** Checks whether the 'result' field is set and is not null */ - @Override - public boolean isNotNullResult() { - return genClient.cacheValueIsNotNull(CacheKey.result); - } - - /** Checks whether the 'reason' field is set and is not null */ - @Override - public boolean isNotNullReason() { - return genClient.cacheValueIsNotNull(CacheKey.reason); - } - - /** Checks whether the 'message' field is set and is not null */ - @Override - public boolean isNotNullMessage() { - return genClient.cacheValueIsNotNull(CacheKey.message); - } - - - - /** Checks whether the 'pendingPaymentEntries' field has been set, however the value could be null */ - public boolean hasPendingPaymentEntries() { - return genClient.cacheHasKey(CacheKey.pendingPaymentEntries); - } - - /** Checks whether the 'success' field has been set, however the value could be null */ - @Override - public boolean hasSuccess() { - return genClient.cacheHasKey(CacheKey.success); - } - - /** Checks whether the 'result' field has been set, however the value could be null */ - @Override - public boolean hasResult() { - return genClient.cacheHasKey(CacheKey.result); - } - - /** Checks whether the 'reason' field has been set, however the value could be null */ - @Override - public boolean hasReason() { - return genClient.cacheHasKey(CacheKey.reason); - } - - /** Checks whether the 'message' field has been set, however the value could be null */ - @Override - public boolean hasMessage() { - return genClient.cacheHasKey(CacheKey.message); - } - - - /** - * Sets the field 'pendingPaymentEntries'. - * - * Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will. - */ - public RetrievePendingPaymentsResponse setPendingPaymentEntries(java.util.List pendingPaymentEntries) { - return genClient.setArrayRecord(pendingPaymentEntries, CacheKey.pendingPaymentEntries); - } - - /** - * Sets the field 'success'. - */ - @Override - public BaseResponse setSuccess(java.lang.Boolean success) { - return genClient.setOther(success, CacheKey.success); - } - - /** - * Sets the field 'result'. - */ - @Override - public BaseResponse setResult(com.clover.sdk.v3.remotepay.ResponseCode result) { - return genClient.setOther(result, CacheKey.result); - } - - /** - * Sets the field 'reason'. - */ - @Override - public BaseResponse setReason(java.lang.String reason) { - return genClient.setOther(reason, CacheKey.reason); - } - - /** - * Sets the field 'message'. - */ - @Override - public BaseResponse setMessage(java.lang.String message) { - return genClient.setOther(message, CacheKey.message); - } - - - /** Clears the 'pendingPaymentEntries' field, the 'has' method for this field will now return false */ - public void clearPendingPaymentEntries() { - genClient.clear(CacheKey.pendingPaymentEntries); - } - /** Clears the 'success' field, the 'has' method for this field will now return false */ - @Override - public void clearSuccess() { - genClient.clear(CacheKey.success); - } - /** Clears the 'result' field, the 'has' method for this field will now return false */ - @Override - public void clearResult() { - genClient.clear(CacheKey.result); - } - /** Clears the 'reason' field, the 'has' method for this field will now return false */ - @Override - public void clearReason() { - genClient.clear(CacheKey.reason); - } - /** Clears the 'message' field, the 'has' method for this field will now return false */ - @Override - public void clearMessage() { - genClient.clear(CacheKey.message); - } - - - /** - * Returns true if this instance has any changes. - */ - public boolean containsChanges() { - return genClient.containsChanges(); - } - - /** - * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. - */ - public void resetChangeLog() { - genClient.resetChangeLog(); - } - - /** - * Create a copy of this instance that contains only fields that were set after the constructor was called. - */ - public RetrievePendingPaymentsResponse copyChanges() { - RetrievePendingPaymentsResponse copy = new RetrievePendingPaymentsResponse(); - copy.mergeChanges(this); - copy.resetChangeLog(); - return copy; - } - - /** - * Copy all the changed fields from the given source to this instance. - */ - public void mergeChanges(RetrievePendingPaymentsResponse src) { - if (src.genClient.getChangeLog() != null) { - genClient.mergeChanges(new RetrievePendingPaymentsResponse(src).getJSONObject(), src.genClient); - } - } - - public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { + /** + * The pending payments. + */ + public java.util.List getPendingPaymentEntries() { + return genClient.cacheGet(CacheKey.pendingPaymentEntries); + } + + /** + * If true then the requested operation succeeded + */ + @Override + public java.lang.Boolean getSuccess() { + return genClient.cacheGet(CacheKey.success); + } + + /** + * The result of the requested operation. + */ + @Override + public com.clover.sdk.v3.remotepay.ResponseCode getResult() { + return genClient.cacheGet(CacheKey.result); + } + + /** + * Optional information about result. + */ + @Override + public java.lang.String getReason() { + return genClient.cacheGet(CacheKey.reason); + } + + /** + * Detailed information about result. + */ + @Override + public java.lang.String getMessage() { + return genClient.cacheGet(CacheKey.message); + } + + + + + private enum CacheKey implements com.clover.sdk.ValueExtractorEnum { + pendingPaymentEntries { + @Override + public Object extractValue(RetrievePendingPaymentsResponse instance) { + return instance.genClient.extractListRecord("pendingPaymentEntries", com.clover.sdk.v3.base.PendingPaymentEntry.JSON_CREATOR); + } + }, + success { + @Override + public Object extractValue(RetrievePendingPaymentsResponse instance) { + return instance.genClient.extractOther("success", java.lang.Boolean.class); + } + }, + result { + @Override + public Object extractValue(RetrievePendingPaymentsResponse instance) { + return instance.genClient.extractEnum("result", com.clover.sdk.v3.remotepay.ResponseCode.class); + } + }, + reason { + @Override + public Object extractValue(RetrievePendingPaymentsResponse instance) { + return instance.genClient.extractOther("reason", java.lang.String.class); + } + }, + message { + @Override + public Object extractValue(RetrievePendingPaymentsResponse instance) { + return instance.genClient.extractOther("message", java.lang.String.class); + } + }, + ; + } + + private GenericClient genClient; + + /** + * Constructs a new empty instance. + */ + public RetrievePendingPaymentsResponse() { + super(false); + genClient = new GenericClient(this); + } + + @Override + protected GenericClient getGenericClient() { + return genClient; + } + + /** + * Constructs a new empty instance. + */ + protected RetrievePendingPaymentsResponse(boolean noInit) { + super(false); + genClient = null; + } + + /** + * Constructs a new instance from the given JSON String. + */ + public RetrievePendingPaymentsResponse(String json) throws IllegalArgumentException { + this(); + try { + genClient.setJsonObject(new org.json.JSONObject(json)); + } catch (org.json.JSONException e) { + throw new IllegalArgumentException("invalid json", e); + } + } + + /** + * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be + * reflected in this instance and vice-versa. + */ + public RetrievePendingPaymentsResponse(org.json.JSONObject jsonObject) { + this(); + genClient.setJsonObject(jsonObject); + } + + /** + * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog. + */ + public RetrievePendingPaymentsResponse(RetrievePendingPaymentsResponse src) { + this(); + if (src.genClient.getJsonObject() != null) { + genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject())); + } + } + + /** + * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be + * reflected in this instance and vice-versa. + */ + public org.json.JSONObject getJSONObject() { + return genClient.getJSONObject(); + } + + @Override + public void validate() { + } + + /** Checks whether the 'pendingPaymentEntries' field is set and is not null */ + public boolean isNotNullPendingPaymentEntries() { + return genClient.cacheValueIsNotNull(CacheKey.pendingPaymentEntries); + } + + /** Checks whether the 'pendingPaymentEntries' field is set and is not null and is not empty */ + public boolean isNotEmptyPendingPaymentEntries() { return isNotNullPendingPaymentEntries() && !getPendingPaymentEntries().isEmpty(); } + + /** Checks whether the 'success' field is set and is not null */ + @Override + public boolean isNotNullSuccess() { + return genClient.cacheValueIsNotNull(CacheKey.success); + } + + /** Checks whether the 'result' field is set and is not null */ + @Override + public boolean isNotNullResult() { + return genClient.cacheValueIsNotNull(CacheKey.result); + } + + /** Checks whether the 'reason' field is set and is not null */ @Override - public RetrievePendingPaymentsResponse createFromParcel(android.os.Parcel in) { - RetrievePendingPaymentsResponse instance = new RetrievePendingPaymentsResponse(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); - instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); - instance.genClient.setChangeLog(in.readBundle()); - return instance; + public boolean isNotNullReason() { + return genClient.cacheValueIsNotNull(CacheKey.reason); } + /** Checks whether the 'message' field is set and is not null */ @Override - public RetrievePendingPaymentsResponse[] newArray(int size) { - return new RetrievePendingPaymentsResponse[size]; + public boolean isNotNullMessage() { + return genClient.cacheValueIsNotNull(CacheKey.message); } - }; - public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { + + + /** Checks whether the 'pendingPaymentEntries' field has been set, however the value could be null */ + public boolean hasPendingPaymentEntries() { + return genClient.cacheHasKey(CacheKey.pendingPaymentEntries); + } + + /** Checks whether the 'success' field has been set, however the value could be null */ + @Override + public boolean hasSuccess() { + return genClient.cacheHasKey(CacheKey.success); + } + + /** Checks whether the 'result' field has been set, however the value could be null */ + @Override + public boolean hasResult() { + return genClient.cacheHasKey(CacheKey.result); + } + + /** Checks whether the 'reason' field has been set, however the value could be null */ + @Override + public boolean hasReason() { + return genClient.cacheHasKey(CacheKey.reason); + } + + /** Checks whether the 'message' field has been set, however the value could be null */ + @Override + public boolean hasMessage() { + return genClient.cacheHasKey(CacheKey.message); + } + + + /** + * Sets the field 'pendingPaymentEntries'. + * + * Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will. + */ + public RetrievePendingPaymentsResponse setPendingPaymentEntries(java.util.List pendingPaymentEntries) { + return genClient.setArrayRecord(pendingPaymentEntries, CacheKey.pendingPaymentEntries); + } + + /** + * Sets the field 'success'. + */ + @Override + public BaseResponse setSuccess(java.lang.Boolean success) { + return genClient.setOther(success, CacheKey.success); + } + + /** + * Sets the field 'result'. + */ + @Override + public BaseResponse setResult(com.clover.sdk.v3.remotepay.ResponseCode result) { + return genClient.setOther(result, CacheKey.result); + } + + /** + * Sets the field 'reason'. + */ + @Override + public BaseResponse setReason(java.lang.String reason) { + return genClient.setOther(reason, CacheKey.reason); + } + + /** + * Sets the field 'message'. + */ + @Override + public BaseResponse setMessage(java.lang.String message) { + return genClient.setOther(message, CacheKey.message); + } + + + /** Clears the 'pendingPaymentEntries' field, the 'has' method for this field will now return false */ + public void clearPendingPaymentEntries() { + genClient.clear(CacheKey.pendingPaymentEntries); + } + /** Clears the 'success' field, the 'has' method for this field will now return false */ + @Override + public void clearSuccess() { + genClient.clear(CacheKey.success); + } + /** Clears the 'result' field, the 'has' method for this field will now return false */ + @Override + public void clearResult() { + genClient.clear(CacheKey.result); + } + /** Clears the 'reason' field, the 'has' method for this field will now return false */ + @Override + public void clearReason() { + genClient.clear(CacheKey.reason); + } + /** Clears the 'message' field, the 'has' method for this field will now return false */ @Override - public RetrievePendingPaymentsResponse create(org.json.JSONObject jsonObject) { - return new RetrievePendingPaymentsResponse(jsonObject); + public void clearMessage() { + genClient.clear(CacheKey.message); + } + + + /** + * Returns true if this instance has any changes. + */ + public boolean containsChanges() { + return genClient.containsChanges(); } - }; - public interface Constraints { + /** + * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance. + */ + public void resetChangeLog() { + genClient.resetChangeLog(); + } + + /** + * Create a copy of this instance that contains only fields that were set after the constructor was called. + */ + public RetrievePendingPaymentsResponse copyChanges() { + RetrievePendingPaymentsResponse copy = new RetrievePendingPaymentsResponse(); + copy.mergeChanges(this); + copy.resetChangeLog(); + return copy; + } - public static final boolean PENDINGPAYMENTENTRIES_IS_REQUIRED = false; - public static final boolean SUCCESS_IS_REQUIRED = false; - public static final boolean RESULT_IS_REQUIRED = false; - public static final boolean REASON_IS_REQUIRED = false; - public static final boolean MESSAGE_IS_REQUIRED = false; + /** + * Copy all the changed fields from the given source to this instance. + */ + public void mergeChanges(RetrievePendingPaymentsResponse src) { + if (src.genClient.getChangeLog() != null) { + genClient.mergeChanges(new RetrievePendingPaymentsResponse(src).getJSONObject(), src.genClient); + } + } + + public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { + @Override + public RetrievePendingPaymentsResponse createFromParcel(android.os.Parcel in) { + RetrievePendingPaymentsResponse instance = new RetrievePendingPaymentsResponse(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap()); + instance.genClient.setBundle(in.readBundle(getClass().getClassLoader())); + instance.genClient.setChangeLog(in.readBundle()); + return instance; + } + + @Override + public RetrievePendingPaymentsResponse[] newArray(int size) { + return new RetrievePendingPaymentsResponse[size]; + } + }; + + public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() { + @Override + public RetrievePendingPaymentsResponse create(org.json.JSONObject jsonObject) { + return new RetrievePendingPaymentsResponse(jsonObject); + } + }; + + public interface Constraints { + + public static final boolean PENDINGPAYMENTENTRIES_IS_REQUIRED = false; + public static final boolean SUCCESS_IS_REQUIRED = false; + public static final boolean RESULT_IS_REQUIRED = false; + public static final boolean REASON_IS_REQUIRED = false; + public static final boolean MESSAGE_IS_REQUIRED = false; - } + } } diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/TransactionType.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/TransactionType.java index 2cf86ef1c..9b5ba82b8 100644 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/TransactionType.java +++ b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/TransactionType.java @@ -31,7 +31,7 @@ */ @SuppressWarnings("all") public enum TransactionType implements Parcelable { - PAYMENT, CREDIT, AUTH, DATA, BALANCE_INQUIRY; + PAYMENT, CREDIT, AUTH, DATA, BALANCE_INQUIRY, PAYMENT_REVERSAL, PAYMENT_ADJUSTMENT, CREDIT_REVERSAL, REFUND_ADJUSTMENT, CASH_ADVANCE, CAPTURE_PREAUTH, VAS_DATA; @Override public int describeContents() { diff --git a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/TransactionTypeEnum.java b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/TransactionTypeEnum.java index 232c75407..40c732a46 100644 --- a/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/TransactionTypeEnum.java +++ b/clover-android-connector-sdk/src/main/java/com/clover/sdk/v3/remotepay/TransactionTypeEnum.java @@ -57,8 +57,8 @@ public Object extractValue(TransactionTypeEnum instance) { private GenericClient genClient; /** - * Constructs a new empty instance. - */ + * Constructs a new empty instance. + */ public TransactionTypeEnum() { genClient = new GenericClient(this); } @@ -69,8 +69,8 @@ protected GenericClient getGenericClient() { } /** - * Constructs a new empty instance. - */ + * Constructs a new empty instance. + */ protected TransactionTypeEnum(boolean noInit) { genClient = null; } diff --git a/clover-android-loyalty-kit/build.gradle b/clover-android-loyalty-kit/build.gradle index 5d6514ad1..cf048b815 100644 --- a/clover-android-loyalty-kit/build.gradle +++ b/clover-android-loyalty-kit/build.gradle @@ -14,7 +14,7 @@ * limitations under the License. */ group = 'com.clover.sdk' -version = '221.9' +version = '228.3' apply from: file("${project.rootDir}/lib.gradle") diff --git a/clover-android-loyalty-kit/src/main/java/com/clover/loyalty/ILoyaltyDataService.java b/clover-android-loyalty-kit/src/main/java/com/clover/loyalty/ILoyaltyDataService.java index 823447984..39efb0fb5 100644 --- a/clover-android-loyalty-kit/src/main/java/com/clover/loyalty/ILoyaltyDataService.java +++ b/clover-android-loyalty-kit/src/main/java/com/clover/loyalty/ILoyaltyDataService.java @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; /** @@ -69,7 +70,7 @@ class Util { * @see LoyaltyDataTypes */ public static String getServiceStateEventAction(String dynamicService) { - return String.format(LOYALTY_SERVICE_STATE_PATTERN, dynamicService); + return String.format(Locale.US, LOYALTY_SERVICE_STATE_PATTERN, dynamicService); } /** @@ -80,7 +81,7 @@ public static String getServiceStateEventAction(String dynamicService) { * @see LoyaltyDataTypes */ public static String getServiceAction(String dynamicService) { - return String.format(LOYALTY_SERVICE_ACTION_PATTERN, dynamicService); + return String.format(Locale.US, LOYALTY_SERVICE_ACTION_PATTERN, dynamicService); } // Before calling this, a system would typically put in VasSettings extras. diff --git a/clover-android-loyalty-kit/src/main/java/com/clover/loyalty/LoyaltyDataTypes.java b/clover-android-loyalty-kit/src/main/java/com/clover/loyalty/LoyaltyDataTypes.java index bdedb4487..5ce4ed12b 100644 --- a/clover-android-loyalty-kit/src/main/java/com/clover/loyalty/LoyaltyDataTypes.java +++ b/clover-android-loyalty-kit/src/main/java/com/clover/loyalty/LoyaltyDataTypes.java @@ -15,12 +15,15 @@ * limitations under the License. */ +import com.clover.sdk.v1.Intents; + import java.util.ArrayList; import java.util.List; /** * Created by michaelhampton on 6/8/18. */ +@SuppressWarnings("WeakerAccess") public class LoyaltyDataTypes { // We have some types we define as standards @@ -28,6 +31,7 @@ public class LoyaltyDataTypes { public static final String EMAIL_TYPE = "EMAIL"; public static final String PHONE_TYPE = "PHONE"; public static final String CLEAR_TYPE = "CLEAR"; + public static final String QUICKPAY_TYPE = "QUICKPAY"; public class VAS_TYPE_KEYS { public static final String PUSH_URL = "PUSH_URL"; @@ -38,29 +42,108 @@ public class VAS_TYPE_KEYS { public static final String SUPPORTED_SERVICES = "SUPPORTED_SERVICES"; } + public class QUICKPAY_TYPE_KEYS { + public static final String QUICKPAY_DEFERRED_READ = "QUICKPAY_DEFERRED_READ"; + public static final String QUICKPAY_DEFERRED_READ_CLEAR = "QUICKPAY_DEFERRED_READ_CLEAR"; + // These two map to values that are returned by QuickPay + public static final String QUICKPAY_DEFERRED_ID = "QUICKPAY_DEFERRED_ID"; + public static final String QUICKPAY_DATA_EXTRAS = "QUICKPAY_DATA_EXTRAS"; + + public static final String QUICKPAY_FORCE_SHUTDOWN = "QUICKPAY_FORCE_SHUTDOWN"; + + // Following two tied to common-payments/src/main/java/com/clover/commonpayments/SecurePayServiceConstants + public static final String QUICKPAY_DATA_EXTRA_KEY_CARD_TYPE = "cardType"; + public static final String QUICKPAY_DATA_EXTRA_KEY_LAST4 = "last4"; + + // !!!!!!!!! + // See com.clover.loyalty.quickPay.QuickPayLoyaltyDataService.Config for usage of the below + // values. + // These constant names are tied to this object via serialization. + // !!!!!!!!! + // These map to configuration values passed in to QuickPay + public static final String QUICKPAY_APP_SPECIFIC_MAP = "QUICKPAY_APP_SPECIFIC_MAP"; + public static final String QUICKPAY_CARD_ENTRY_METHODS = "QUICKPAY_CARD_ENTRY_METHODS"; + public static final String QUICKPAY_FORCE_PIN_ENTRY_ON_SWIPE = "QUICKPAY_FORCE_PIN_ENTRY_ON_SWIPE"; + public static final String QUICKPAY_VAS_CONFIG = "QUICKPAY_VAS_CONFIG"; + + // Values that will be able to be passed in addition to the amount. + // Values are all expected to be strings. They can be missing or blank (but don't pass empty strings...) + // see secure-payments-lib/src/main/java/com/clover/payment/executor/secure/transaction/TransactionState.updateFinalAmount. + // + // Code snippets below are provided for some context on how to put the values into the additionalUpdate map + // see https://phabricator.dev.clover.com/D33609 + // builder.tipAmount(Long.parseLong(tipAmount)); + public static final String QUICKPAY_EXTRA_TIP_AMOUNT = Intents.EXTRA_TIP_AMOUNT; + // builder.taxAmount(Long.parseLong(taxAmount)); + public static final String QUICKPAY_EXTRA_TAX_AMOUNT = Intents.EXTRA_TAX_AMOUNT; + // builder.orderId(orderId); + public static final String QUICKPAY_EXTRA_ORDER_ID = Intents.EXTRA_ORDER_ID; + // try { + // InputStream is = new ByteArrayInputStream(additionalAmountsJson.getBytes(Charset.forName("UTF-8"))); + // List taxRates = Json.read(is, new TypeReference>() { + // }); + // builder.taxableAmountRates(taxRates); + // } catch (IOException ioe) { + // ALog.e(this, ioe, "Unexpected failure reading taxable amounts: %s", ioe.getMessage()); + // } + public static final String QUICKPAY_EXTRA_TAXABLE_AMOUNTS = Intents.EXTRA_TAXABLE_AMOUNTS; + // try { + // InputStream is = new ByteArrayInputStream(serviceCharge.getBytes("UTF-8")); + // ServiceChargeAmount svcCharge = Json.read(is, ServiceChargeAmount.class); + // builder.serviceChargeAmount(svcCharge); + // } catch (IOException ioe) { + // ALog.e(this, ioe, "Unexpected failure reading service charge amount: %s", ioe.getMessage()); + // } + public static final String QUICKPAY_EXTRA_SERVICE_CHARGE_AMOUNT = Intents.EXTRA_SERVICE_CHARGE_AMOUNT; + // builder.externalPaymentId((String)additionalUpdates.get(Intents.EXTRA_EXTERNAL_PAYMENT_ID)); + public static final String QUICKPAY_EXTRA_EXTERNAL_PAYMENT_ID = Intents.EXTRA_EXTERNAL_PAYMENT_ID; + // builder.externalReferenceId((String)additionalUpdates.get(Intents.EXTRA_EXTERNAL_REFERENCE_ID)); + public static final String QUICKPAY_EXTRA_EXTERNAL_REFERENCE_ID = Intents.EXTRA_EXTERNAL_REFERENCE_ID; + // try { + // InputStream is = new ByteArrayInputStream(passThroughJson.getBytes("UTF-8")); + // Map passThroughValues = Json.read(is, new TypeReference>() {}); + // + // Map existing = new HashMap<>(); + // if (payIntent.passThroughValues != null) { + // existing.putAll(payIntent.passThroughValues); + // } + // existing.putAll(passThroughValues); + // builder.passThroughValues(existing); + // } catch (IOException ioe) { + // ALog.e(this, ioe, "Unexpected failure reading pass through values: %s", ioe.getMessage()); + // } + public static final String QUICKPAY_EXTRA_PASS_THROUGH_VALUES = Intents.EXTRA_PASS_THROUGH_VALUES; + } + private static final List dataTypes = new ArrayList<>(3); - public static final boolean isSystemListedType(String type) { - return (VAS_TYPE.equals(type)) ||(EMAIL_TYPE.equals(type)) ||(PHONE_TYPE.equals(type) || (CLEAR_TYPE.equals(type))); + public static boolean isSystemListedType(String type) { + return (VAS_TYPE.equals(type)) || + (EMAIL_TYPE.equals(type)) || + (PHONE_TYPE.equals(type)) || + (CLEAR_TYPE.equals(type)) || + (QUICKPAY_TYPE.equals(type)) + ; } - public static final boolean isCustomListedType(String type) { + public static boolean isCustomListedType(String type) { return dataTypes.contains(type); } - public static final boolean isListedType(String type) { + @SuppressWarnings("BooleanMethodIsAlwaysInverted") + public static boolean isListedType(String type) { return isSystemListedType(type) || isCustomListedType(type); } - public static final boolean addListedType(String type) { + public static boolean addListedType(String type) { if (!isListedType(type)) { return dataTypes.add(type); } return false; // not added, already there } - public static final boolean removeListedType(String type) { + public static boolean removeListedType(String type) { if (!isListedType(type)) { return dataTypes.remove(type); } diff --git a/clover-android-sdk-examples/build.gradle b/clover-android-sdk-examples/build.gradle index 672a68eff..ba023f287 100644 --- a/clover-android-sdk-examples/build.gradle +++ b/clover-android-sdk-examples/build.gradle @@ -14,11 +14,9 @@ * limitations under the License. */ group = 'com.clover.sdk' -version = '221.9' +version = '228.3' -apply from: file("${project.rootDir}/versions.gradle") - -apply plugin: 'com.android.application' +apply from: file("${project.rootDir}/app.gradle") repositories { mavenLocal() @@ -33,7 +31,6 @@ android { } compileSdkVersion COMPILE_SDK_VERSION buildToolsVersion BUILD_TOOLS_VERSION - useLibrary HTTP_LIBRARY defaultConfig { minSdkVersion MIN_SDK_VERSION @@ -43,5 +40,7 @@ android { dependencies { compile project(':clover-android-sdk') + implementation 'com.android.support:recyclerview-v7:28.0.0' + implementation "com.android.support:support-compat:28.0.0" + implementation 'com.android.support:cardview-v7:28.0.0' } - diff --git a/clover-android-sdk-examples/gradle/wrapper/gradle-wrapper.jar b/clover-android-sdk-examples/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index a7634b071cb255e91a4572934e55b8cd8877b3e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 49875 zcmagFW0)pE(k|T7?x$_rwr$(CZTEEdv~AnA&1u{Av~8bx-`#`Vv*-Kjs;sIXkyoN3 zBjV0GQb8I76aWMS2?;cySt=WH%U7xIVC$qElKkO za28^ca#*BA*@jM9a#&EC6b|0!ecWN2bz z`u{14{I8*wI`)r-pJawFzd}!rb1{!*WKESxJjQ78L9nK}`;z^*k5Rl^*%| zvoZ=u$caI$BN}a6T3&)1Yh{4KuS12&9`c?)&IJ>J*QXReXqE^@NDKoUKQwv})|D35 z_upn2&^7Ik_V@QY{GDQv|DQ1`dpf(A+A28N|D7xsOH=2+Uml)kZQnuE-6;8wYa|T#YzlVa-$d<@T!pDHIIh?zRy(5$C zi@#UJkoo=b$2p)?pc0JsKkJ#f?YAd4*1GZed;K63ej6iOqR41aU}#A1m4v(66xF2< zG`QKPuMXHEJ92=xz-}5!@ZAH;Uos74@Ba`kKx+XVRN8_bI^R|l9%b*^Qy!`bmA%4u zI6eL3NK?S2H`3U_7m>ob9IK-)x)TxEzRg=##zmy49aE*itWp;wFqt}5Bni9k!W(bd zNa;F)Zl(83ExU@W!+#;Px1FZfFx0SvZWcd!%eRp=(8FM`;TV2{_=@igP`J7%iU{b0 zA$Xl`*BVFVO71`qhsAWTM>l@ZiB@t{^F0AJLB3iX10$wWa}H7PWY;IoYLTN6N)Qm)34KgjkE)l5bd&SgeB{8u6O>WzSU91ywG)OpxG8ug|5nca~YQt!W-;e)oO#W--9$#oUSNzqtjlYHHKkJ?3|6E-E&??dB{=Z8L zCggka^bZPR7eMdP=(ej803xXHpx4U8CdGZ`!j}nw-xrF+os0=NmiqB}@3Vyugm&V6 z;spumS3ph5Di4`>N_MP1okX!_h#ssz&Z2Fu6x2vesIg_Fn3S$&4$nK`?aNqS_8cVG z^r1O*Ei?16n+lwDd$U9VNS6l~evvpp$X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f#RNMyz;*j!@o0E$Vq-%9X@zK2mCVyY6K`(ef#x) DCvKB) diff --git a/clover-android-sdk-examples/gradle/wrapper/gradle-wrapper.properties b/clover-android-sdk-examples/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index bf4bf0004..000000000 --- a/clover-android-sdk-examples/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Sep 06 11:59:40 PDT 2013 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-bin.zip diff --git a/clover-android-sdk-examples/gradlew b/clover-android-sdk-examples/gradlew deleted file mode 100755 index 91a7e269e..000000000 --- a/clover-android-sdk-examples/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/clover-android-sdk-examples/gradlew.bat b/clover-android-sdk-examples/gradlew.bat deleted file mode 100644 index aec99730b..000000000 --- a/clover-android-sdk-examples/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/clover-android-sdk-examples/lib/calc.jar b/clover-android-sdk-examples/lib/calc.jar deleted file mode 100644 index 59c893690ca4d2c45ed6fbad19934c12c40017b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 28614 zcma&N1CVXOk}lk~t<$z`+qP}necJ9mZQHhO+qTWq?$`6~or!nn|6}IvsM>2s?97Oj z^<`yN=C_u-6fg)Bz<+%Ft3t&8?~i|eLH=B2M3e<+BxFVD4dk71TUb%&djc|Z+& z4tpje&``ANQmo-?Q9r`$%fNcHxwirQ=luZyc>OmsKz{De$j;`!EcpLQK>t(1$lA`; z#PNR+MEF-hBRfZv|3Mn_|3})w*4f0-*1-CIP{aM7)Qk+Qjs8m)0>Jaf)*YugkntZK zP(T0xjGya&K_;joAuX);1D+i1f2fJXFxU;?qXhl^ieMuZf*l44>=2enk<@ty-n}bT zz%c@p{r3GOr4ouQ>sInkZ-TX3KU^j_dInb%1#Glam(3PkVMV{SMl+&#g<@vh3Y$&? zq?Omyg^r}P;kiZO$cdk#`P}bik*QP)Bk>3ldLir@l9Om>QYSvr@;R@ByUSSwe#8eK z>i65EkyfmcNKTux zFL+roy_W+iTluu^LH3ER=RdKA_`g^idKg(Uf&l=)BLVW8*glc8`k`6v2(LxmnG|W z_L$;2TrQN!spNNqw{*tQv0_Xn<7}mcbG_Z=HFLs!)Allw)AI?Z&)5AVG(ZIi@&^Jx z%mmjNm-eA{zXV?5D}8^Z5gn|?_~S8tZw)nD2NFLL=Y}wk8;ZNq(}Cr;jQYWm6}R@^ zJr&)#*CQ5O+uK`Cc)Qz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vC!t{*u9w-JP8~#WRDn70;^3zYH~^8owvflBh{;a~ zI^|e-2Y0B$ZY!yNtsE+14o9x1`rzpdoFgjP1FGOL4QKi*sXjf#xCBz35W??Zcos)=if7kwJLRDG9&X|wiXXJ$=d9p3cKn?QVt zqsD>3LK;nmXQ;l`BFx{YEBcn(FP+Qa?=0dy8Dj;XIZKG}U?t$j!sg%s>B{M$v#I%+ zsw~3dCr0KYau(7{oF4jECyUIM&*&l;n92(U$_eIGj*A4aW;-hG09Ym!_P&%izxMLU zBFRvD;GUg+V2Zz=Ly9lNxXqb0P?$PLR-0-vb!tO_EEn+s*7{{0LJcvsjV%RxKM>)e zHRge!>Pr zsdqWiC&n}9Iz|qrzME38y9~t>X1@J zkPSd;;M_KFK=DTn{7MlAvJpsCliNlffjzK4_!NJgVL);rMMQ47b~Jy&{qEdBQXwC9 zxTO;E{}=V|5cnTkYmjiri27SNrr;mLf8B4$u&i4&o%C`AdeSr znRHseVcs4#Kz?+{-Sb=E3+>+k|HocBBpq_o`Ig?M^Plv;x1b@ZkUNC8RG{8}Q-3|M zkUKxO%yonRVnP!C?IhlKl-~;m)b;g}$xmj+5C8Iqjq>lxHy-9~Wq|3wDuWkEa2Nja zH~%;1#^d~6ZaN`l`a90Q45wdtpg(YVK|%iw`^z8w`Mdm;v46|7wfN5t-Y{=Xe>FvT Uuxos?aYqf64mNSIEpPt&KMjy + + + + + + + + + + + + + + + + + + diff --git a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/CustomItemTestActivity.java b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/CustomItemTestActivity.java new file mode 100644 index 000000000..fd994bf7b --- /dev/null +++ b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/CustomItemTestActivity.java @@ -0,0 +1,178 @@ +package com.clover.android.sdk.examples; + +import com.clover.sdk.util.CloverAccount; +import com.clover.sdk.v1.BindingException; +import com.clover.sdk.v1.ClientException; +import com.clover.sdk.v1.ServiceException; +import com.clover.sdk.v3.order.LineItem; +import com.clover.sdk.v3.order.Order; +import com.clover.sdk.v3.order.OrderConnector; + +import android.accounts.Account; +import android.app.Activity; +import android.os.AsyncTask; +import android.os.Bundle; +import android.os.RemoteException; +import android.util.Log; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; +import android.widget.RelativeLayout; +import android.widget.TextView; +import android.widget.Toast; + +import java.util.ArrayList; +import java.util.List; + +/** + * This activity creates a new Order {@link #bOrder} from the device and add new custom items to the + * order{@link #bLineItem}. + * Custom item are of two types - Fixed price custom item and Per Unit price custom item, which are added as lineitems + * to order {@link #addLineItem(Order)}. + * {@link #bCompOrder} completes the order and the order id should be updated in the Orders app. + */ +public class CustomItemTestActivity extends Activity { + private static String TAG = CustomItemTestActivity.class.getSimpleName(); + private Account account; + private Button bOrder, bLineItem, bCompOrder; + private List lineItemList; + private Order order; + private EditText itemName, itemPrice, itemQuantity, itemType; + private RelativeLayout mainLayout; + private TextView orderCreated; + private StringBuilder result; + private OrderConnector orderConnector; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_custom_item_test); + bOrder = findViewById(R.id.order); + bLineItem = findViewById(R.id.lineitem); + bCompOrder = findViewById(R.id.bCompleteOrder); + itemName = findViewById(R.id.edItemName); + itemPrice = findViewById(R.id.edItemPrice); + itemQuantity = findViewById(R.id.edItemQuantity); + itemType = findViewById(R.id.edItemUnit); + orderCreated = findViewById(R.id.tvCreatedOrder); + mainLayout = findViewById(R.id.mainLayout); + account = CloverAccount.getAccount(this); + orderConnector = new OrderConnector(getApplicationContext(), account, null); + + bOrder.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + new AsyncTask() { + @Override + protected void onPostExecute(Void aVoid) { + super.onPostExecute(aVoid); + mainLayout.setVisibility(View.VISIBLE); + if (result != null) { + orderCreated.setText(result.toString()); + } + } + + @Override + protected Void doInBackground(Void... voids) { + OrderConnector orderConnector = new OrderConnector(getApplicationContext(), account, null); + try { + order = orderConnector.createOrder(new Order()); + Log.i(TAG, "new order created with orderId" + order.getId()); + result = new StringBuilder(); + result.append(getString(R.string.order_id_custom_item)); + result.append(order.getId()); + } catch (ClientException e) { + e.printStackTrace(); + } catch (ServiceException e) { + e.printStackTrace(); + } catch (BindingException e) { + e.printStackTrace(); + } catch (RemoteException e) { + e.printStackTrace(); + } + return null; + } + }.execute(); + } + }); + + bLineItem.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + addLineItem(order); + } + }); + + bCompOrder.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + order.setLineItems(lineItemList); + Log.i(TAG, "new order" + order.toString()); + } + }); + } + + /** + * adds new lineitem to the {@link #lineItemList} which contains all the items created. + */ + private void addLineItem(Order order) { + new AsyncTask() { + @Override + protected void onPostExecute(Void aVoid) { + super.onPostExecute(aVoid); + Toast.makeText(getApplicationContext(), "Item added to order!", Toast.LENGTH_SHORT).show(); + itemName.getText().clear(); + itemPrice.getText().clear(); + itemQuantity.getText().clear(); + itemType.getText().clear(); + } + + /** + * LineItem might be per unit price if lineItem.setUnitQty and lineItem.setUnitPrice are set else fixed price. + * */ + @Override + protected Void doInBackground(Void... voids) { + LineItem lineItem = new LineItem(); + lineItem.setCreatedTime(System.currentTimeMillis()); + lineItem.setBinName(lineItem.getBinName()); + lineItem.setUserData(lineItem.getUserData()); + lineItem.setPrice(lineItem.getPrice()); + lineItem.setAlternateName(lineItem.getAlternateName()); + lineItem.setItemCode(lineItem.getItemCode()); + lineItem.setNote(lineItem.getNote()); + if (itemName.getText() != null) { + lineItem.setName(itemName.getText().toString()); + } + if (!itemQuantity.getText().toString().equals("")) { + lineItem.setUnitQty(Integer.valueOf(itemQuantity.getText().toString()) * 1000); + } + if (!itemPrice.getText().toString().equals("")) { + lineItem.setPrice(Long.valueOf(itemPrice.getText().toString()) * 100); + } + if (!itemType.getText().toString().equals("")) { + if (!itemPrice.getText().toString().equals("")) { + lineItem.setUnitName(itemType.getText().toString()); + } + } + lineItemList = order.getLineItems(); + if (lineItemList == null) { + lineItemList = new ArrayList<>(); + } + + try { + LineItem result = orderConnector.addCustomLineItem(order.getId(), lineItem, false); + lineItemList.add(result); + } catch (RemoteException e) { + e.printStackTrace(); + } catch (ClientException e) { + e.printStackTrace(); + } catch (ServiceException e) { + e.printStackTrace(); + } catch (BindingException e) { + e.printStackTrace(); + } + return null; + } + }.execute(); + } +} diff --git a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/EmployeeTestActivity.java b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/EmployeeTestActivity.java index bad6c2fc8..03b8d596c 100644 --- a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/EmployeeTestActivity.java +++ b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/EmployeeTestActivity.java @@ -1,12 +1,12 @@ /** * Copyright (C) 2016 Clover Network, Inc. - * + *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,6 +15,17 @@ */ package com.clover.android.sdk.examples; +import com.clover.sdk.util.CloverAccount; +import com.clover.sdk.v1.Intents; +import com.clover.sdk.v1.ResultStatus; +import com.clover.sdk.v1.ServiceConnector; +import com.clover.sdk.v1.merchant.Merchant; +import com.clover.sdk.v1.merchant.MerchantConnector; +import com.clover.sdk.v3.employees.AccountRole; +import com.clover.sdk.v3.employees.Employee; +import com.clover.sdk.v3.employees.EmployeeConnector; +import com.clover.sdk.v3.employees.EmployeeIntent; + import android.accounts.Account; import android.accounts.AccountManager; import android.app.Activity; @@ -32,20 +43,11 @@ import android.widget.Spinner; import android.widget.TextView; import android.widget.Toast; -import com.clover.sdk.util.CloverAccount; -import com.clover.sdk.v1.Intents; -import com.clover.sdk.v1.ResultStatus; -import com.clover.sdk.v1.ServiceConnector; -import com.clover.sdk.v1.merchant.Merchant; -import com.clover.sdk.v1.merchant.MerchantConnector; -import com.clover.sdk.v3.employees.AccountRole; -import com.clover.sdk.v3.employees.Employee; -import com.clover.sdk.v3.employees.EmployeeConnector; -import com.clover.sdk.v3.employees.EmployeeIntent; import java.text.DateFormat; import java.util.Date; import java.util.List; +import java.util.Locale; public class EmployeeTestActivity extends Activity implements EmployeeConnector.OnActiveEmployeeChangedListener, @@ -519,7 +521,7 @@ private void updateLogout(String status, ResultStatus resultStatus) { private void notifyActiveEmployeeChanged(Employee employee) { String msg; if (employee != null) { - msg = String.format("Active employee changed: %s (%s)", employee.getName(), employee.getId()); + msg = String.format(Locale.US, "Active employee changed: %s (%s)", employee.getName(), employee.getId()); } else { msg = "Employee logged out"; } @@ -575,7 +577,9 @@ private void toast(String message) { } private AccountRole getRoleFromString(String role) { - if (role == null) throw new IllegalArgumentException("Role must not be null"); + if (role == null) { + throw new IllegalArgumentException("Role must not be null"); + } if (role.equals("MANAGER")) { return AccountRole.MANAGER; } else if (role.equals("ADMIN")) { diff --git a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/ImagePrinterActivity.java b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/ImagePrinterActivity.java new file mode 100644 index 000000000..39d0b67fc --- /dev/null +++ b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/ImagePrinterActivity.java @@ -0,0 +1,72 @@ +package com.clover.android.sdk.examples; + +import android.accounts.Account; +import android.app.Activity; +import android.net.Uri; +import android.os.AsyncTask; +import android.os.Bundle; +import android.os.RemoteException; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; +import android.widget.Toast; + +import com.clover.sdk.util.CloverAccount; +import com.clover.sdk.v1.BindingException; +import com.clover.sdk.v1.ClientException; +import com.clover.sdk.v1.ServiceException; +import com.clover.sdk.v1.printer.job.PrintJob; +import com.clover.sdk.v1.printer.job.StaticOrderPrintJob; +import com.clover.sdk.v1.printer.job.StaticReceiptPrintJob; +import com.clover.sdk.v3.order.LineItem; +import com.clover.sdk.v3.order.Order; +import com.clover.sdk.v3.order.OrderConnector; + +import java.util.ArrayList; +import java.util.List; + +/** + * Demonstrates printing an image provided by the URI in + * the footer of the Receipt. + */ +public class ImagePrinterActivity extends Activity { + + EditText mEditText; + Button mPrintButton; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.image_printer_acitivity); + mEditText = findViewById(R.id.uri_edit_box); + mEditText.setText(PrinterImageProvider.CONTENT_URI_IMAGE.toString()); + mPrintButton = findViewById(R.id.print_btn); + Account account = CloverAccount.getAccount(this); + + mPrintButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Order tempOrder = createAnOrder(); + int printerFlag = PrintJob.FLAG_NONE; + PrintJob pj = new StaticReceiptPrintJob.Builder().order(tempOrder).footerUris(Uri.parse(mEditText.getText().toString())).flag(printerFlag).build(); + pj.print(ImagePrinterActivity.this, account); + } + }); + } + + private Order createAnOrder() { + Order tempOrder = new Order(); + tempOrder.setCurrency("USD"); + tempOrder.setTestMode(false); + List lineItemList = new ArrayList<>(); + LineItem item = new LineItem(); + item.setBinName("Test Order"); + item.setName("Test Item"); + item.setPrice(10000L); + item.setPrinted(false); + lineItemList.add(item); + tempOrder.setLineItems(lineItemList); + + return tempOrder; + } +} diff --git a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/InventoryTestActivity.java b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/InventoryTestActivity.java index f43a1d174..4f6dfe380 100644 --- a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/InventoryTestActivity.java +++ b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/InventoryTestActivity.java @@ -1,12 +1,12 @@ /** * Copyright (C) 2016 Clover Network, Inc. - * + *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,23 +15,6 @@ */ package com.clover.android.sdk.examples; -import android.accounts.Account; -import android.app.Activity; -import android.app.LoaderManager; -import android.content.ComponentName; -import android.content.Context; -import android.content.CursorLoader; -import android.content.Intent; -import android.content.Loader; -import android.content.ServiceConnection; -import android.database.Cursor; -import android.os.AsyncTask; -import android.os.Bundle; -import android.os.IBinder; -import android.os.RemoteException; -import android.text.TextUtils; -import android.util.Log; -import android.widget.TextView; import com.clover.sdk.util.CloverAccount; import com.clover.sdk.util.CloverAuth; import com.clover.sdk.v1.BindingException; @@ -54,10 +37,27 @@ import com.clover.sdk.v3.inventory.Modifier; import com.clover.sdk.v3.inventory.ModifierGroup; import com.clover.sdk.v3.inventory.Option; -import com.clover.sdk.v3.inventory.OptionItem; import com.clover.sdk.v3.inventory.PriceType; import com.clover.sdk.v3.inventory.Tag; import com.clover.sdk.v3.inventory.TaxRate; + +import android.accounts.Account; +import android.app.Activity; +import android.app.LoaderManager; +import android.content.ComponentName; +import android.content.Context; +import android.content.CursorLoader; +import android.content.Intent; +import android.content.Loader; +import android.content.ServiceConnection; +import android.database.Cursor; +import android.os.AsyncTask; +import android.os.Bundle; +import android.os.IBinder; +import android.os.RemoteException; +import android.text.TextUtils; +import android.util.Log; +import android.widget.TextView; import org.apache.http.HttpEntity; import org.apache.http.HttpException; import org.apache.http.HttpResponse; @@ -84,6 +84,7 @@ import java.lang.reflect.Constructor; import java.util.ArrayList; import java.util.List; +import java.util.Locale; public class InventoryTestActivity extends Activity { private static final String TAG = InventoryTestActivity.class.getSimpleName(); @@ -524,23 +525,23 @@ private void displayItem(Item item) { } private String dumpItem(Item item) { - return item != null ? String.format("%s{id=%s, name=%s, price=%d}", Item.class.getSimpleName(), item.getId(), item.getName(), item.getPrice()) : null; + return item != null ? String.format(Locale.US, "%s{id=%s, name=%s, price=%d}", Item.class.getSimpleName(), item.getId(), item.getName(), item.getPrice()) : null; } private String dumpTaxRate(TaxRate taxRate) { - return String.format("%s{id=%s, name=%s, rate=%d, is default=%b}", TaxRate.class.getSimpleName(), taxRate.getId(), taxRate.getName(), taxRate.getRate(), taxRate.getIsDefault()); + return String.format(Locale.US, "%s{id=%s, name=%s, rate=%d, is default=%b}", TaxRate.class.getSimpleName(), taxRate.getId(), taxRate.getName(), taxRate.getRate(), taxRate.getIsDefault()); } private String dumpModifier(Modifier modifier) { - return String.format("%s{id=%s, name=%s}", Modifier.class.getSimpleName(), modifier.getId(), modifier.getName()); + return String.format(Locale.US, "%s{id=%s, name=%s}", Modifier.class.getSimpleName(), modifier.getId(), modifier.getName()); } private String dumpModifierGroup(ModifierGroup modifierGroup) { - return String.format("%s{id=%s, name=%s}", ModifierGroup.class.getSimpleName(), modifierGroup.getId(), modifierGroup.getName()); + return String.format(Locale.US, "%s{id=%s, name=%s}", ModifierGroup.class.getSimpleName(), modifierGroup.getId(), modifierGroup.getName()); } private String dumpCategory(Category category) { - return String.format("%s{id=%s, name=%s, sort order=%d}", Category.class.getSimpleName(), category.getId(), category.getName(), category.getSortOrder()); + return String.format(Locale.US, "%s{id=%s, name=%s, sort order=%d}", Category.class.getSimpleName(), category.getId(), category.getName(), category.getSortOrder()); } @Override diff --git a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/LockScreenBootCompleteReceiver.java b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/LockScreenBootCompleteReceiver.java new file mode 100644 index 000000000..ccd4787f7 --- /dev/null +++ b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/LockScreenBootCompleteReceiver.java @@ -0,0 +1,74 @@ +package com.clover.android.sdk.examples; + +import com.clover.sdk.Lockscreen; + +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.os.Build; +import android.support.v4.app.NotificationCompat; +import android.support.v4.app.NotificationManagerCompat; +import android.util.Log; + +import static android.content.Context.MODE_PRIVATE; + +/** + * This is called when device boots and checks if an employee was selected from {@link LockScreenTestActivity} + * before the device was shut down last time. + *

+ * If yes, it logs in with the selected user and displays a notification in the device. + */ +public class LockScreenBootCompleteReceiver extends BroadcastReceiver { + private static final String TAG = LockScreenBootCompleteReceiver.class.getSimpleName(); + private static final String EMPLOYEE_PREF = "EmployeePreference"; + private static final String EMPLOYEE_ID = "EmployeeId"; + private static final String EMPLOYEE_NAME = "EmployeeName"; + private static final String CHANNEL_NAME = "LockscreenSDKSampleChannel"; + private static final String CHANNEL_DESCRIPTION = "LockscreenSDKSampleDesc"; + private static final String CHANNEL_ID = "LockscreenSDKTest"; + private static final String NOTIFICATION_TITLE = "LockscreenNotification"; + + + @Override + public void onReceive(Context context, Intent intent) { + if ("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) { + createNotificationChannel(context); + SharedPreferences prefs = context.getSharedPreferences(EMPLOYEE_PREF, MODE_PRIVATE); + String employeeId = prefs.getString(EMPLOYEE_ID, null); + String employeeName = prefs.getString(EMPLOYEE_NAME, null); + Log.i(TAG, "Logged in as name :" + employeeName + " id : " + employeeId); + if (employeeId != null && employeeName != null) { + /** + * Resetting the Shared Preferences to null after a successful login. + * */ + SharedPreferences.Editor editor = prefs.edit(); + editor.putString(EMPLOYEE_ID, null); + editor.putString(EMPLOYEE_NAME, null); + editor.apply(); + Lockscreen lockscreen = new Lockscreen(context); + lockscreen.unlock(employeeId); + NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL_ID) + .setSmallIcon(R.drawable.clover_logo_green) + .setContentTitle(NOTIFICATION_TITLE) + .setContentText(employeeName) + .setPriority(NotificationCompat.PRIORITY_DEFAULT); + NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context); + notificationManager.notify(1, builder.build()); + + } + } + } + + private void createNotificationChannel(Context context) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + int importance = NotificationManager.IMPORTANCE_DEFAULT; + NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, importance); + channel.setDescription(CHANNEL_DESCRIPTION); + NotificationManager notificationManager = context.getSystemService(NotificationManager.class); + notificationManager.createNotificationChannel(channel); + } + } +} diff --git a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/LockScreenTestActivity.java b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/LockScreenTestActivity.java new file mode 100644 index 000000000..115e78a0c --- /dev/null +++ b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/LockScreenTestActivity.java @@ -0,0 +1,143 @@ +package com.clover.android.sdk.examples; + +import com.clover.sdk.Lockscreen; +import com.clover.sdk.util.CloverAccount; +import com.clover.sdk.v1.BindingException; +import com.clover.sdk.v1.ClientException; +import com.clover.sdk.v1.ServiceException; +import com.clover.sdk.v3.employees.Employee; +import com.clover.sdk.v3.employees.EmployeeConnector; + +import android.accounts.Account; +import android.app.Activity; +import android.content.SharedPreferences; +import android.graphics.Color; +import android.os.AsyncTask; +import android.os.Bundle; +import android.os.RemoteException; +import android.support.v7.widget.LinearLayoutManager; +import android.support.v7.widget.RecyclerView; +import android.view.View; +import android.widget.Button; +import android.widget.TextView; + +import java.util.ArrayList; +import java.util.List; + +/** + * The activity locks the device using {@link #lockButton}. + * {@link #unlockButton} shows a list of registered employees on the device. + * Selected employee is saved in SharedPreference and is fetched in {@link LockScreenBootCompleteReceiver} when device + * reboots to unlock the device. + * If no employee is selected, {@link LockScreenBootCompleteReceiver} will not do anything. + * */ +public class LockScreenTestActivity extends Activity { + private static final String TAG = LockScreenTestActivity.class.getSimpleName(); + private static final String EMPLOYEE_PREF = "EmployeePreference"; + private static final String EMPLOYEE_ID = "EmployeeId"; + private static final String EMPLOYEE_NAME = "EmployeeName"; + + private Button lockButton; + private TextView selectText; + private Lockscreen lockscreen; + private EmployeeConnector employeeConnector; + private Account account; + private Button unlockButton; + private List employees; + private RecyclerView employeeRecyclerView; + private LockscreenEmployeeAdapter employeeAdapter; + private SharedPreferences.Editor editor; + private int selectedItem = -1; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_lockscreen); + lockscreen = new Lockscreen(this); + account = CloverAccount.getAccount(this); + employeeConnector = new EmployeeConnector(this, account, null); + employeeRecyclerView = new RecyclerView(this); + employees = new ArrayList<>(); + lockButton = findViewById(R.id.lockButton); + unlockButton = findViewById(R.id.unlockButton); + selectText = findViewById(R.id.selectTextView); + employeeRecyclerView = findViewById(R.id.rvEmployeeList); + editor = getSharedPreferences(EMPLOYEE_PREF, MODE_PRIVATE).edit(); + + LockscreenEmployeeAdapter.ClickListener listener = (position, v) -> { + selectedItem = position; + if (selectedItem == -1) { + editor.putString(EMPLOYEE_ID, null); + editor.putString(EMPLOYEE_NAME, null); + } else { + editor.putString(EMPLOYEE_ID, employees.get(position).getId()); + editor.putString(EMPLOYEE_NAME, employees.get(position).getName()); + } + editor.apply(); + }; + + employeeRecyclerView.setLayoutManager(new LinearLayoutManager(this)); + employeeAdapter = new LockscreenEmployeeAdapter(this, employees, listener); + employeeRecyclerView.setAdapter(employeeAdapter); + /** + * To lock the the device. + * @see Lockscreen#lock() + * */ + lockButton.setOnClickListener(v -> lockscreen.lock()); + /** + * Displays a list of registered employees on the merchant's device. + * @see EmployeeConnector#getEmployees() + * On next reboot device unlocks with the selected employee's profile. + * also see, @see Lockscreen#unlock(String) + * */ + unlockButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + new AsyncTask>() { + @Override + protected void onPostExecute(List employees) { + super.onPostExecute(employees); + if (employees == null) { + return; + } + LockScreenTestActivity.this.employees.clear(); + LockScreenTestActivity.this.employees.addAll(employees); + employeeAdapter.notifyDataSetChanged(); + unlockButton.setClickable(false); + unlockButton.setBackgroundColor(Color.GRAY); + selectText.setVisibility(View.VISIBLE); + return; + } + + @Override + protected List doInBackground(Void... voids) { + try { + return employeeConnector.getEmployees(); + } catch (RemoteException e) { + e.printStackTrace(); + } catch (ClientException e) { + e.printStackTrace(); + } catch (ServiceException e) { + e.printStackTrace(); + } catch (BindingException e) { + e.printStackTrace(); + } + return null; + } + }.execute(); + } + }); + } + + @Override + protected void onPause() { + employeeConnector.disconnect(); + super.onPause(); + } + + @Override + protected void onResume() { + super.onResume(); + employeeConnector.connect(); + } +} diff --git a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/LockscreenEmployeeAdapter.java b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/LockscreenEmployeeAdapter.java new file mode 100644 index 000000000..6e6846306 --- /dev/null +++ b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/LockscreenEmployeeAdapter.java @@ -0,0 +1,88 @@ +package com.clover.android.sdk.examples; + +import com.clover.sdk.v3.employees.Employee; + +import android.content.Context; +import android.support.annotation.NonNull; +import android.support.v7.widget.RecyclerView; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.CheckBox; +import android.widget.TextView; + +import java.util.List; + +public class LockscreenEmployeeAdapter extends RecyclerView.Adapter { + private List employeeList; + private Context context; + private static ClickListener clickListener; + private int selectedPosition = -1; + private int preSelected = -1; + + LockscreenEmployeeAdapter(Context context, List employeeList, ClickListener mClickListener) { + this.context = context; + this.employeeList = employeeList; + LockscreenEmployeeAdapter.clickListener = mClickListener; + } + + @NonNull + @Override + public EmployeeViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { + View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_adapter_lockscreen, viewGroup, false); + return new EmployeeViewHolder(v, clickListener); + } + + @Override + public void onBindViewHolder(@NonNull EmployeeViewHolder employeeViewHolder, int i) { + Employee employee = employeeList.get(i); + employeeViewHolder.tvEmployee.setText(employee.getName()); + if (selectedPosition == i) { + if (preSelected == selectedPosition) { + employeeViewHolder.tvEmployee.setSelected(false); + preSelected = -1; + } else { + employeeViewHolder.tvEmployee.setSelected(true); + preSelected = selectedPosition; + } + } else { + employeeViewHolder.tvEmployee.setSelected(false); + } + } + + @Override + public int getItemCount() { + return employeeList.size(); + } + + public class EmployeeViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { + private TextView tvEmployee; + + public EmployeeViewHolder(@NonNull View itemView, ClickListener listener) { + super(itemView); + tvEmployee = (TextView) itemView.findViewById(R.id.tv_employee_name); + itemView.setOnClickListener(this); + } + + @Override + public void onClick(View v) { + if (getAdapterPosition() == RecyclerView.NO_POSITION) { + return; + } + notifyItemChanged(selectedPosition); + selectedPosition = getAdapterPosition(); + if (preSelected == selectedPosition) { + LockscreenEmployeeAdapter.clickListener.onItemClick(-1, v); + } else { + LockscreenEmployeeAdapter.clickListener.onItemClick(selectedPosition, v); + } + notifyItemChanged(selectedPosition); + } + } + + public interface ClickListener { + void onItemClick(int position, View v); + } +} + + diff --git a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/MerchantTestActivity.java b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/MerchantTestActivity.java index eb8f9a3b8..b9faf8d7c 100644 --- a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/MerchantTestActivity.java +++ b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/MerchantTestActivity.java @@ -1,12 +1,12 @@ /** * Copyright (C) 2016 Clover Network, Inc. - * + *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,6 +15,14 @@ */ package com.clover.android.sdk.examples; +import com.clover.sdk.util.CloverAccount; +import com.clover.sdk.v1.ResultStatus; +import com.clover.sdk.v1.ServiceConnector; +import com.clover.sdk.v1.merchant.Merchant; +import com.clover.sdk.v1.merchant.MerchantAddress; +import com.clover.sdk.v1.merchant.MerchantConnector; +import com.clover.sdk.v1.merchant.MerchantIntent; + import android.accounts.Account; import android.accounts.AccountManager; import android.app.Activity; @@ -30,13 +38,6 @@ import android.widget.Button; import android.widget.EditText; import android.widget.TextView; -import com.clover.sdk.util.CloverAccount; -import com.clover.sdk.v1.ResultStatus; -import com.clover.sdk.v1.ServiceConnector; -import com.clover.sdk.v1.merchant.Merchant; -import com.clover.sdk.v1.merchant.MerchantAddress; -import com.clover.sdk.v1.merchant.MerchantConnector; -import com.clover.sdk.v1.merchant.MerchantIntent; import java.text.DateFormat; import java.util.Date; diff --git a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrintTaskTestActivity.java b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrintTaskTestActivity.java new file mode 100644 index 000000000..08559af16 --- /dev/null +++ b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrintTaskTestActivity.java @@ -0,0 +1,252 @@ +package com.clover.android.sdk.examples; + +import com.clover.sdk.util.CloverAccount; +import com.clover.sdk.v1.BindingException; +import com.clover.sdk.v1.ClientException; +import com.clover.sdk.v1.ServiceException; +import com.clover.sdk.v1.printer.Printer; +import com.clover.sdk.v1.printer.PrinterConnector; +import com.clover.sdk.v1.printer.job.ImagePrintJob; +import com.clover.sdk.v1.printer.job.PrintJob; +import com.clover.sdk.v1.printer.job.ViewPrintJob; + +import android.accounts.Account; +import android.app.Activity; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.graphics.Color; +import android.os.AsyncTask; +import android.os.Bundle; +import android.os.RemoteException; +import android.support.v7.widget.LinearLayoutManager; +import android.support.v7.widget.RecyclerView; +import android.util.Log; +import android.view.Gravity; +import android.view.View; +import android.view.ViewGroup; +import android.widget.Button; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.RelativeLayout; +import android.widget.TextView; + +import java.util.ArrayList; +import java.util.List; + +public class PrintTaskTestActivity extends Activity { + private static final String TAG = PrintTaskTestActivity.class.getSimpleName(); + private static final String ITEM = "Item"; + private static final String COST = "$ Cost"; + private static final String MERCHANT = "Merchant"; + + private Button imagePrintButton; + private Button viewPrintButton; + private Button viewPrintButton2; + private Account account; + private LinearLayout testView; + private Bitmap icon; + private PrinterConnector connector; + private RecyclerView recyclerView; + private List resultList; + private PrinterListAdapter adapter; + private int selectedPosition; + private int viewWidth; + + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_print_task_test); + imagePrintButton = findViewById(R.id.button2); + /** + * Button which uses the original view method from ViewPrintJob + * to print. + * */ + viewPrintButton = findViewById(R.id.button1); + /** + * Button which uses the new view method from ViewPrintJob + * to print. + * */ + viewPrintButton2 = findViewById(R.id.button3); + account = CloverAccount.getAccount(this); + resultList = new ArrayList(); + recyclerView = findViewById(R.id.recyclerView); + recyclerView.setLayoutManager(new LinearLayoutManager(this)); + + PrinterListAdapter.ClickListener clickListener = new PrinterListAdapter.ClickListener() { + @Override + public void onItemClick(int position, View v) { + selectedPosition = position; + new AsyncTask() { + @Override + protected Void doInBackground(Void... voids) { + try { + viewWidth = connector.getPrinterTypeDetails(resultList.get(selectedPosition)).getNumDotsWidth(); + Log.v(TAG, String.valueOf(viewWidth)); + } catch (RemoteException e) { + e.printStackTrace(); + } catch (ClientException e) { + e.printStackTrace(); + } catch (ServiceException e) { + e.printStackTrace(); + } catch (BindingException e) { + e.printStackTrace(); + } + return null; + } + }.execute(); + } + }; + + adapter = new PrinterListAdapter(this, resultList, clickListener); + recyclerView.setAdapter(adapter); + connector = new PrinterConnector(this, account, null); + getConnectedPrinters(); + testView = generateLayout(viewWidth); + icon = BitmapFactory.decodeResource(this.getResources(), R.drawable.clover_logo); + generateHeadLayout(testView); + generateBodyLayout(testView); + + /** + * Prints receipt by using the older {@link ViewPrintJob.Builder#view(View)} + * Must call {@link #layoutAndMeasureView(View, int)} before. + * */ + viewPrintButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + new AsyncTask() { + @Override + protected Void doInBackground(Void... voids) { + layoutAndMeasureView(testView, viewWidth); + ViewPrintJob.Builder builder = new ViewPrintJob.Builder().view(testView); + ViewPrintJob printJob = builder.build(); + printJob.print(getApplicationContext(), account); + return null; + } + }.execute(); + } + }); + + /** + * Prints receipt by using the older {@link ViewPrintJob.Builder#view(View, int)} + * */ + viewPrintButton2.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + new AsyncTask() { + @Override + protected Void doInBackground(Void... voids) { + ViewPrintJob.Builder builder = new ViewPrintJob.Builder().view(testView, viewWidth); + ViewPrintJob printJob = builder.build(); + printJob.print(getApplicationContext(), account); + return null; + } + }.execute(); + } + }); + + imagePrintButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + new AsyncTask() { + @Override + protected Void doInBackground(Void... voids) { + ImagePrintJob.Builder builder = new ImagePrintJob.Builder().bitmap(icon); + PrintJob imagePrintJob = builder.build(); + imagePrintJob.print(getApplicationContext(), account); + return null; + } + }.execute(); + } + }); + } +/** + * Fetch the list of all the connected printers. + * @see PrinterConnector#getPrinter(String) + * */ + private void getConnectedPrinters() { + new AsyncTask>() { + @Override + protected List doInBackground(Void... params) { + try { + return connector.getPrinters(); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + @Override + protected void onPostExecute(List printers) { + if (printers != null && !printers.isEmpty()) { + resultList.clear(); + resultList.addAll(printers); + adapter.notifyDataSetChanged(); + } + } + }.execute(); + } + + private void generateBodyLayout(LinearLayout testView) { + LinearLayout body = new LinearLayout(this); + RelativeLayout row = new RelativeLayout(this); + body.setMinimumWidth(ViewGroup.LayoutParams.MATCH_PARENT); + row.setMinimumWidth(ViewGroup.LayoutParams.MATCH_PARENT); + TextView item = new TextView(this); + TextView cost = new TextView(this); + row.addView(item); + row.addView(cost); + item.setText(ITEM); + item.setTextSize(25); + cost.setText(COST); + RelativeLayout.LayoutParams lp = (RelativeLayout.LayoutParams) cost.getLayoutParams(); + lp.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); + cost.setLayoutParams(lp); + cost.setTextSize(25); + body.addView(row); + testView.addView(body); + } + + private LinearLayout generateLayout(int viewWidth) { + LinearLayout mainLayout = new LinearLayout(this); + mainLayout.setLayoutParams(new LinearLayout.LayoutParams(viewWidth, LinearLayout.LayoutParams.MATCH_PARENT)); + mainLayout.setOrientation(LinearLayout.VERTICAL); + mainLayout.setBackgroundColor(Color.WHITE); + return mainLayout; + } + + public void layoutAndMeasureView(View view, int viewWidth) { + int measuredWidth = View.MeasureSpec.makeMeasureSpec(viewWidth, View.MeasureSpec.EXACTLY); + int measuredHeight = View.MeasureSpec.makeMeasureSpec(ViewGroup.LayoutParams.WRAP_CONTENT, View.MeasureSpec.UNSPECIFIED); + view.measure(measuredWidth, measuredHeight); + view.layout(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight()); + view.requestLayout(); + } + + @Override + protected void onPause() { + super.onPause(); + disconnect(); + } + + private void disconnect() { + if (connector != null) { + connector.disconnect(); + connector = null; + } + } + + public void generateHeadLayout(LinearLayout mainLayout) { + ImageView image = new ImageView(this); + image.setImageBitmap(icon); + testView.addView(image); + TextView merchantTv = new TextView(this); + merchantTv.setText(MERCHANT); + merchantTv.setWidth(ViewGroup.LayoutParams.MATCH_PARENT); + merchantTv.setGravity(Gravity.CENTER); + merchantTv.setTextSize(30); + mainLayout.addView(merchantTv); + } + + +} diff --git a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrintTestActivity.java b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrintTestActivity.java deleted file mode 100644 index c19835dcb..000000000 --- a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrintTestActivity.java +++ /dev/null @@ -1,263 +0,0 @@ -/** - * Copyright (C) 2015 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.clover.android.sdk.examples; - -import android.accounts.Account; -import android.app.Activity; -import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.os.AsyncTask; -import android.os.Bundle; -import android.text.TextUtils; -import android.util.Pair; -import android.view.View; -import android.widget.Button; -import android.widget.EditText; -import android.widget.Toast; -import com.clover.sdk.util.CloverAccount; -import com.clover.sdk.v1.printer.CashDrawer; -import com.clover.sdk.v1.printer.Category; -import com.clover.sdk.v1.printer.Printer; -import com.clover.sdk.v1.printer.PrinterConnector; -import com.clover.sdk.v1.printer.job.ImagePrintJob; -import com.clover.sdk.v1.printer.job.PrintJob; -import com.clover.sdk.v1.printer.job.PrintJobsConnector; -import com.clover.sdk.v1.printer.job.ReceiptPrintJob; -import com.clover.sdk.v1.printer.job.TextPrintJob; - -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.util.List; - -public class PrintTestActivity extends Activity { - private static final String TAG = "PrintTestActivity"; - private static final int REQUEST_ACCOUNT = 0; - - private Account account; - private PrinterConnector printerConnector; - - private EditText editPrinterId; - - private EditText editPrintOrderId; - private Button buttonPrintOrderReceipt; - - private Button buttonOpenCashdrawer; - - private EditText editPrintImageUrl; - private Button buttonPrintImage; - private Button buttonPrintImageSync; - - private EditText editPrintText; - private Button buttonPrintText; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_print_test); - - account = CloverAccount.getAccount(this); - printerConnector = new PrinterConnector(this, account, null); - fillPrinterId(); - - editPrinterId = (EditText) findViewById(R.id.edit_printer_id); - - editPrintOrderId = (EditText) findViewById(R.id.edit_print_order_id); - buttonPrintOrderReceipt = (Button) findViewById(R.id.button_print_order_receipt); - buttonPrintOrderReceipt.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - - final String id = editPrintOrderId.getText().toString().toUpperCase(); - new AsyncTask() { - @Override - protected Printer doInBackground(Void... params) { - return getPrinter(); - } - - @Override - protected void onPostExecute(Printer printer) { - if (printer == null) { - return; - } - new ReceiptPrintJob.Builder().orderId(id).build().print(PrintTestActivity.this, account, printer); - } - }.execute(); - - } - }); - - buttonOpenCashdrawer = (Button) findViewById(R.id.button_open_cashdrawer); - buttonOpenCashdrawer.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - new AsyncTask() { - @Override - protected Printer doInBackground(Void... params) { - return getPrinter(); - } - - @Override - protected void onPostExecute(Printer printer) { - if (printer == null) { - return; - } - CashDrawer.open(PrintTestActivity.this, account, printer); - } - }.execute(); - } - }); - - editPrintImageUrl = (EditText) findViewById(R.id.edit_print_image_url); - buttonPrintImage = (Button) findViewById(R.id.button_print_image); - buttonPrintImage.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - final String url = editPrintImageUrl.getText().toString(); - - if (TextUtils.isEmpty(url)) { - return; - } - - new AsyncTask>() { - @Override - protected Pair doInBackground(Void... voids) { - try { - InputStream is = (InputStream) new URL(url).getContent(); - Bitmap b = BitmapFactory.decodeStream(is); - - Printer p = getPrinter(); - - return Pair.create(p, b); - } catch (IOException e) { - e.printStackTrace(); - } - return null; - } - - @Override - protected void onPostExecute(Pair result) { - if (result == null || result.first == null || result.second == null) { - return; - } - new ImagePrintJob.Builder().bitmap(result.second).maxWidth().build().print(PrintTestActivity.this, account, result.first); - } - }.execute(); - } - }); - - buttonPrintImageSync = (Button) findViewById(R.id.button_print_image_sync); - buttonPrintImageSync.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - final String url = editPrintImageUrl.getText().toString(); - - if (TextUtils.isEmpty(url)) { - return; - } - - new AsyncTask() { - @Override - protected String doInBackground(Void... voids) { - try { - InputStream is = (InputStream) new URL(url).getContent(); - Bitmap b = BitmapFactory.decodeStream(is); - - Printer p = getPrinter(); - PrintJob printJob = new ImagePrintJob.Builder().bitmap(b).maxWidth().build(); - return new PrintJobsConnector(PrintTestActivity.this).print(p, printJob); - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - @Override - protected void onPostExecute(String id) { - if (id != null) { - Toast.makeText(PrintTestActivity.this, "Print success, print job ID: " + id, Toast.LENGTH_SHORT).show(); - } else { - Toast.makeText(PrintTestActivity.this, "Print failure", Toast.LENGTH_SHORT).show(); - } - } - }.execute(); - } - }); - - editPrintText = (EditText) findViewById(R.id.edit_print_text); - buttonPrintText = (Button) findViewById(R.id.button_print_text); - buttonPrintText.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - final String text = editPrintText.getText().toString(); - new TextPrintJob.Builder().text(text).build().print(PrintTestActivity.this, account); - } - }); - } - - @Override - protected void onDestroy() { - super.onDestroy(); - if (printerConnector != null) { - printerConnector.disconnect(); - printerConnector = null; - } - } - - private void fillPrinterId() { - new AsyncTask>() { - @Override - protected List doInBackground(Void... params) { - try { - return printerConnector.getPrinters(Category.RECEIPT); - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - @Override - protected void onPostExecute(List printers) { - if (printers != null && !printers.isEmpty()) { - editPrinterId.setText(printers.get(0).getUuid()); - } - } - }.execute(); - } - - private Printer getPrinter() { - String id = editPrinterId.getText().toString(); - if (TextUtils.isEmpty(id)) { - try { - List printers = printerConnector.getPrinters(Category.RECEIPT); - if (printers != null && !printers.isEmpty()) { - return printers.get(0); - } - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - try { - return printerConnector.getPrinter(id); - } catch (Exception e) { - e.printStackTrace(); - } - return null; - - } -} diff --git a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/ReceiptRegistrationTestProvider.java b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrinterImageProvider.java similarity index 80% rename from clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/ReceiptRegistrationTestProvider.java rename to clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrinterImageProvider.java index 078811244..ef29f647e 100644 --- a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/ReceiptRegistrationTestProvider.java +++ b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrinterImageProvider.java @@ -1,18 +1,3 @@ -/** - * Copyright (C) 2015 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ package com.clover.android.sdk.examples; import android.content.ContentProvider; @@ -24,6 +9,7 @@ import android.graphics.BitmapFactory; import android.net.Uri; import android.os.ParcelFileDescriptor; + import com.clover.sdk.v1.printer.ReceiptContract; import java.io.File; @@ -32,8 +18,8 @@ import java.io.IOException; import java.io.OutputStream; -public class ReceiptRegistrationTestProvider extends ContentProvider { - public static final String AUTHORITY = "com.clover.android.sdk.examples.receipt"; +public class PrinterImageProvider extends ContentProvider { + public static final String AUTHORITY = "com.clover.receipt_registration_sample"; public static final Uri AUTHORITY_URI = Uri.parse("content://" + AUTHORITY); public static final String CONTENT_DIRECTORY_IMAGE = "image"; @@ -60,6 +46,7 @@ public boolean onCreate() { @Override public Cursor query(Uri uri, String[] strings, String s, String[] strings2, String s2) { switch (uriMatcher.match(uri)) { + case TEXT: MatrixCursor cursor = new MatrixCursor(new String[]{ReceiptContract.Text._ID, ReceiptContract.Text.TEXT}); @@ -110,7 +97,7 @@ public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundEx OutputStream os = null; try { - File f = File.createTempFile("jeff", ".png", new File("/sdcard")); + File f = File.createTempFile("jtb", ".png", new File("/sdcard")); os = new FileOutputStream(f); b.compress(Bitmap.CompressFormat.PNG, 100, os); return ParcelFileDescriptor.open(f, ParcelFileDescriptor.MODE_READ_ONLY); diff --git a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrinterListAdapter.java b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrinterListAdapter.java new file mode 100644 index 000000000..59466ea68 --- /dev/null +++ b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrinterListAdapter.java @@ -0,0 +1,93 @@ +package com.clover.android.sdk.examples; + +import com.clover.sdk.v1.printer.Category; +import com.clover.sdk.v1.printer.Printer; + +import android.content.Context; +import android.support.annotation.NonNull; +import android.support.v7.widget.RecyclerView; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.CheckBox; +import android.widget.TextView; + +import java.util.List; + +/** + * Adapter class to populate data in the RecyclerView used in PrintTaskTestActivity + * @see PrintTaskTestActivity + */ +public class PrinterListAdapter extends RecyclerView.Adapter { + List printerList; + Context context; + private static ClickListener mClickListener; + private int selectedPosition = -1; + + public PrinterListAdapter(Context context, List result, ClickListener mClickListener) { + this.printerList = result; + this.context = context; + this.mClickListener = mClickListener; + } + + @NonNull + @Override + public PrinterViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { + View v = LayoutInflater.from(context) + .inflate(R.layout.printer_adapter_layout, viewGroup, false); + PrinterViewHolder holder = new PrinterViewHolder(v, mClickListener); + return holder; + } + + @Override + public void onBindViewHolder(@NonNull PrinterViewHolder printerViewHolder, int i) { + Printer item = printerList.get(i); + printerViewHolder.tvId.setText(item.getUuid()); + printerViewHolder.tvName.setText(item.getName()); + int categoryIndex = item.getCategory().ordinal(); + printerViewHolder.tvType.setText(Category.values()[categoryIndex].toString()); + if (selectedPosition == i) { + printerViewHolder.cbSelectedPrinter.setChecked(true); + } else { + printerViewHolder.cbSelectedPrinter.setChecked(false); + } + } + + @Override + public int getItemCount() { + return printerList.size(); + } + + public class PrinterViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { + TextView tvId; + ClickListener mClickListener; + TextView tvName; + TextView tvType; + CheckBox cbSelectedPrinter; + + public PrinterViewHolder(@NonNull View itemView, ClickListener clickListener) { + super(itemView); + tvId = (TextView) itemView.findViewById(R.id.tvId); + tvName = (TextView) itemView.findViewById(R.id.tvName); + tvType = (TextView) itemView.findViewById(R.id.tvType); + cbSelectedPrinter = (CheckBox) itemView.findViewById(R.id.cbPrinterSelect); + this.mClickListener = clickListener; + itemView.setOnClickListener(this); + } + + @Override + public void onClick(View v) { + if (getAdapterPosition() == RecyclerView.NO_POSITION) { + return; + } + notifyItemChanged(selectedPosition); + PrinterListAdapter.mClickListener.onItemClick(getAdapterPosition(), v); + selectedPosition = getAdapterPosition(); + notifyItemChanged(selectedPosition); + } + } + + public interface ClickListener { + void onItemClick(int position, View v); + } +} diff --git a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrinterTestActivity.java b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrinterTestActivity.java index f3703ea26..e53a3c740 100644 --- a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrinterTestActivity.java +++ b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/PrinterTestActivity.java @@ -1,12 +1,12 @@ /** * Copyright (C) 2016 Clover Network, Inc. - * + *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,6 +15,17 @@ */ package com.clover.android.sdk.examples; +import com.clover.sdk.util.CloverAccount; +import com.clover.sdk.v1.BindingException; +import com.clover.sdk.v1.ClientException; +import com.clover.sdk.v1.ResultStatus; +import com.clover.sdk.v1.ServiceConnector; +import com.clover.sdk.v1.ServiceException; +import com.clover.sdk.v1.printer.Category; +import com.clover.sdk.v1.printer.Printer; +import com.clover.sdk.v1.printer.PrinterConnector; +import com.clover.sdk.v1.printer.Type; + import android.accounts.Account; import android.accounts.AccountManager; import android.app.Activity; @@ -30,20 +41,11 @@ import android.widget.EditText; import android.widget.RadioGroup; import android.widget.TextView; -import com.clover.sdk.util.CloverAccount; -import com.clover.sdk.v1.BindingException; -import com.clover.sdk.v1.ClientException; -import com.clover.sdk.v1.ResultStatus; -import com.clover.sdk.v1.ServiceConnector; -import com.clover.sdk.v1.ServiceException; -import com.clover.sdk.v1.printer.Category; -import com.clover.sdk.v1.printer.Printer; -import com.clover.sdk.v1.printer.PrinterConnector; -import com.clover.sdk.v1.printer.Type; import java.text.DateFormat; import java.util.Date; import java.util.List; +import java.util.Locale; import java.util.Random; public class PrinterTestActivity extends Activity implements ServiceConnector.OnServiceConnectedListener { @@ -80,6 +82,10 @@ public class PrinterTestActivity extends Activity implements ServiceConnector.On private EditText editRemovePrinter; private Button buttonRemovePrinter; + private static String getStatusString(String status, ResultStatus resultStatus) { + return "<" + status + " " + (resultStatus != null ? resultStatus : "") + ": " + DateFormat.getDateTimeInstance().format(new Date()) + ">"; + } + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -300,10 +306,6 @@ public void onServiceConnectionFailure() { } - private static String getStatusString(String status, ResultStatus resultStatus) { - return "<" + status + " " + (resultStatus != null ? resultStatus : "") + ": " + DateFormat.getDateTimeInstance().format(new Date()) + ">"; - } - private void updateRemovePrinter(String status, ResultStatus resultStatus) { statusRemovePrinterText.setText(getStatusString(status, resultStatus)); } diff --git a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/ReceiptRegistrationTestActivity.java b/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/ReceiptRegistrationTestActivity.java deleted file mode 100644 index 189a5e3d2..000000000 --- a/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/ReceiptRegistrationTestActivity.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * Copyright (C) 2015 Clover Network, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.clover.android.sdk.examples; - -import android.accounts.Account; -import android.accounts.AccountManager; -import android.app.Activity; -import android.content.Intent; -import android.net.Uri; -import android.os.Bundle; -import android.view.View; -import android.widget.Button; -import android.widget.EditText; -import android.widget.TextView; -import com.clover.sdk.util.CloverAccount; -import com.clover.sdk.v1.ResultStatus; -import com.clover.sdk.v1.printer.ReceiptRegistration; -import com.clover.sdk.v1.printer.ReceiptRegistrationConnector; -import com.clover.sdk.v1.printer.job.PrintJob; -import com.clover.sdk.v1.printer.job.ReceiptPrintJob; - -import java.text.DateFormat; -import java.util.Date; -import java.util.List; - -public class ReceiptRegistrationTestActivity extends Activity { - private static final String TAG = "PrintTestActivity"; - private static final int REQUEST_ACCOUNT = 0; - - private Account account; - private ReceiptRegistrationConnector connector; - - private TextView textAddStatus; - private EditText editRegister; - private Button buttonRegister; - - private TextView textGetStatus; - private TextView textGetResult; - private Button buttonGet; - - private EditText editPrint; - private Button buttonPrint; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_receipt_registration_test); - - textAddStatus = (TextView) findViewById(R.id.text_add_status); - editRegister = (EditText) findViewById(R.id.edit_register); - editRegister.setText(ReceiptRegistrationTestProvider.CONTENT_URI_IMAGE.toString()); - buttonRegister = (Button) findViewById(R.id.button_register); - buttonRegister.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - connector.register(Uri.parse(editRegister.getText().toString()), new ReceiptRegistrationConnector.ReceiptRegistrationCallback() { - @Override - public void onServiceSuccess(Void result, ResultStatus status) { - super.onServiceSuccess(result, status); - updateAdd(status); - } - - @Override - public void onServiceFailure(ResultStatus status) { - super.onServiceFailure(status); - updateAdd(status); - } - - @Override - public void onServiceConnectionFailure() { - super.onServiceConnectionFailure(); - updateAdd(null); - } - }); - } - }); - - textGetStatus = (TextView) findViewById(R.id.text_get_status); - textGetResult = (TextView) findViewById(R.id.text_get_result); - buttonGet = (Button) findViewById(R.id.button_get); - buttonGet.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - connector.getRegistrations(new ReceiptRegistrationConnector.ReceiptRegistrationCallback>() { - @Override - public void onServiceSuccess(List result, ResultStatus status) { - super.onServiceSuccess(result, status); - updateGet(status, result); - } - - @Override - public void onServiceFailure(ResultStatus status) { - super.onServiceFailure(status); - updateGet(status, null); - } - - @Override - public void onServiceConnectionFailure() { - super.onServiceConnectionFailure(); - updateGet(null, null); - } - }); - } - }); - - editPrint = (EditText) findViewById(R.id.edit_print); - buttonPrint = (Button) findViewById(R.id.button_print); - buttonPrint.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - PrintJob pj = new ReceiptPrintJob.Builder().orderId(editPrint.getText().toString().toUpperCase()).build(); - pj.print(ReceiptRegistrationTestActivity.this, account); - } - }); - } - - private void updateAdd(ResultStatus resultStatus) { - textAddStatus.setText(""); - } - - private void updateGet(ResultStatus resultStatus, List result) { - textGetStatus.setText(""); - if (result != null) { - textGetResult.setText(result.toString()); - } else { - textGetResult.setText(""); - } - } - - - @Override - protected void onResume() { - super.onResume(); - - if (account != null) { - connect(); - } else { - startAccountChooser(); - } - } - - @Override - protected void onPause() { - disconnect(); - super.onPause(); - } - - private void connect() { - disconnect(); - if (account != null) { - connector = new ReceiptRegistrationConnector(this, account, null); - connector.connect(); - } - } - - private void disconnect() { - if (connector != null) { - connector.disconnect(); - connector = null; - } - } - - private void startAccountChooser() { - Intent intent = AccountManager.newChooseAccountIntent(null, null, new String[]{CloverAccount.CLOVER_ACCOUNT_TYPE}, false, null, null, null, null); - startActivityForResult(intent, REQUEST_ACCOUNT); - } - - @Override - protected void onActivityResult(int requestCode, int resultCode, Intent data) { - if (requestCode == REQUEST_ACCOUNT) { - if (resultCode == RESULT_OK) { - String name = data.getStringExtra(AccountManager.KEY_ACCOUNT_NAME); - String type = data.getStringExtra(AccountManager.KEY_ACCOUNT_TYPE); - - account = new Account(name, type); - } else { - if (account == null) { - finish(); - } - } - } - } -} diff --git a/clover-android-sdk-examples/src/main/res/drawable/clover_logo.png b/clover-android-sdk-examples/src/main/res/drawable/clover_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..f2e8d801e6c99c9fac904461b487f2c7be9f69d0 GIT binary patch literal 12772 zcmW+-by!qS7v7~oI;6Xl?kaWGizGTJGvUyq14+YSp;u;kbgc2a(9t2nNq0q~l_?f*M?ZU58hTMc*odtob33>n! zG&F@2{gzMc^?)=zX62Z*aP~Llm{z*{GF`9q!>cFR0?Af?e0!xs5N0$+gSh_8-H%4r`|Np7B-nrefm+bU04qLpI;zwIi5Lwq+92J(2*qdZeC)cb9n zslu?q%J1UZbEthd3i>XGe6Ni0>HDg^SP#AWs_@B1Wm-FR*k_SQLfx%AGJd)RumNy@ExKl1cr4OIG8i)X*oZL>mZ90fcN>B~e!y);po} z2k?*d#U)u`KatYrK!=aFz)d0(-i?{hAY#j8I|%u0wbmq%;&5Z}FR=?AT3z2vBRLKm zq%z#5yEk&ji4M8%wXuF38a10M)gG}nhpa-__`06vK`HV%5f!bVo$& zGSUNbca+>*Q6sKKVVplCE2pz2wwLy`REX}8Sl=s)P*)Tbbk?}$asry@c-Gk|^&dZ} z=ur4YRKsWWm5?y;L+IYy_#KQLg#yrQW;NfL#S#BNGSb0%VsmvRcreP!tqBh%OPA^E z`@<&v_ZFFNW6>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rt0r7R$l(%n2} zaqd=h@|>DSdG;@Z#*JCC_VZ0?U87AtbiSx`ZJbr84NLn3&($YX*Co>Ejd}LfrEO7> zg`>Eh^=HPV=^S)Mj;x{tne)fMBz`WOe3?^X+NY}ey@f`^9|_P{E(ALc6EQxZ|2RE zvo3A9Xl>!>(iVR`zp*Cvkjyq#?0=%9_RB9~y6;<|PBH)(8XKlv=rJE zCRR(x3=YFuHSzY$H8uLsqYnF1VBI=eKuV@5L;R0iounIo86?!$*l0gm7};ja*b>?I zcKf5st-)W7Z2%_Jw%-VL8P|$T6B{?%z36jM#owQEuI+K6>?=6Uesi-Ho@>3kOD}@m zJXH{q(ALrXvcY|xZJ=vK`;yYdYciRw?0ntAxL30<=4l&u{D{d=ZG`y07hjtx^V1p& z+UO=UZuh`5R#JoeUC-uU3fe3O6)$N6;9?iqKTin7V0!>3yBttej2t21ya@ z@>(%tpZDY0@bqMGw#ePg^z|W^Z^-pW}V$S9B6IS{L + + + + + + + \ No newline at end of file diff --git a/clover-android-sdk-examples/src/main/res/layout/activity_custom_item_test.xml b/clover-android-sdk-examples/src/main/res/layout/activity_custom_item_test.xml new file mode 100644 index 000000000..a64124db1 --- /dev/null +++ b/clover-android-sdk-examples/src/main/res/layout/activity_custom_item_test.xml @@ -0,0 +1,127 @@ + + + +