Clover Android SDK v262.2 Release Notes
We have recently released version 262.2 of Clover Android SDK.
clover-android-sdk
Data model changes
AdditionalChargeAmount- added theratefield and associated methodsAdditionalChargeType- addedCONVENIENCE_FEE,CREDIT_SURCHARGE, andINTERAC_V2charge types. TheINTERACtype is deprecated.- Added the
IdArrayclass DisplayOrder- added theisVatfield and associated methodsPayment- added theDISCOUNTandOFFLINE_RETRYINGresult statusesPrintState- addedPRINTINGstateVoidedLineItem- added theapprovedByfield and associated methods
New features
- When working with an order, apps can create and display manager overrides for voided line items using the new
approvedByfield. - Information about merchant-set additional charges on a credit transaction can be accessed using
AdditionalChargeAmount.getRate. Apps displaying transaction details or printing custom receipts will need to be updated to show any fees (returned in theadditionalChargesof the JSON response). - The SDK’s cash drawer APIs were adjusted to make it easier for apps to connect to and use external cash drawers or those built into Clover devices. In the future, this will make it easier and faster for Clover developers to support new models of native and external cash drawers. The updated
CashDrawerandCashDrawersclasses provide functions for working with Clover-printer-connected and external drawers, respectively. - The
ACTION_KEYPADaction was added to provide a consistent way to take customer input on Clover devices. The keypad can be one of three types: numeric, email, or phone. See the documentation for complete details. OrderV31Connectornow has methods to allow you add line items in bulk:addFixedPriceLineItems,addPerUnitLineItems, andaddVariablePriceLineItems.
Deprecations and removals
Additional charges
In AdditionalChargeType, the INTERAC charge type is deprecated and should be replaced with INTERAC_V2.
Cash drawers
Several hardware-specific cash drawer classes are deprecated in favor of the more general CashDrawer and CashDrawers:
APG554aCashDrawerMiniPrinterCashDrawerStation2018PrinterCashDrawerStationPrinterCashDrawer
The ACTION_OPEN_CASH_DRAWER_SERVICE action and the v1.printers.CashDrawer class are now deprecated.
EmployeeConnector
- Usages of the
setEmployeePinmethod should be replaced withupdateEmployee - Usages of the
logoutmethod should be replaced withLockscreen.lock
Equipment
The Equipment class has been removed from the SDK.
Intents
Usages of the ACTION_MANUAL_PAY and ACTION_MANUAL_REFUND actions should be replaced with ACTION_CLOVER_PAY.
InventoryConnector
The following methods have been deprecated:
getItems()getItemsWithCategories()getItemIds()getItems(ServiceConnector.Callback<List<Item>> callback)getItemsWithCategories(ServiceConnector.Callback<List<Item>> callback)getItemIds(ServiceConnector.Callback<List<String>> callback)
Item
Usages of the getStockCount method should be replaced with getItemStock.
ItemStock
Usages of the getStockCount method should be replaced with getQuantity.
Merchant
- Usages of the
getPhoneNumbermethod should be replaced withAddress.getPhoneNumber. - Methods associated with merchant equipment have been removed:
clearEquipmentgetEquipmenthasEquipmentisNotEmptyEquipmentisNotNullEquipmentsetEquipment
OrderV3Connector
Usages of OrderV3Connector should be replaced with OrderV31Connector.
OrderV31Connector
Usages of the deleteLineItemsWithReason method should be replaced with deleteLineItems2.
Platform
The previously deprecated Platform class has been removed from the SDK.
Service charges
Usages of the ServiceCharge.getPercentage method should be replaced with ServiceCharge.getPercentageDecimal.
clover-android-sdk-examples
The following samples have been created or updated for v262.2:
- Added a new Cash Drawers Test example showing how to use the SDK to work with built-in and external cash drawers
- Added a new Keypad Test example showing the usage of the new keypad intent
- Fixed a bug in the Print Task example that would cause the app to crash
Updated 10 months ago
