Package com.clover.sdk.cashdrawer
Class CloverServiceCashDrawer
- java.lang.Object
-
- com.clover.sdk.cashdrawer.CashDrawer
-
- com.clover.sdk.cashdrawer.CloverServiceCashDrawer
-
- All Implemented Interfaces:
Parcelable
public class CloverServiceCashDrawer extends CashDrawer implements Parcelable
A cash drawer managed by Clover Services. Instances are created by Clover and should not be created by third party apps.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.clover.sdk.cashdrawer.CashDrawer
CashDrawer.Discovery<T extends CashDrawer>
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<CloverServiceCashDrawer>
CREATOR
-
Fields inherited from class com.clover.sdk.cashdrawer.CashDrawer
context, drawerNumber, TAG
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Constructor Description CloverServiceCashDrawer(String identifier, int drawerNumber, String displayName)
For internal use only.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
describeContents()
String
getDisplayName()
A human readable name for this cash drawer.String
getIdentifier()
The identifier String along with the drawer number uniquely identify cash drawer.boolean
pop()
Attempt to pop (open) this cash drawer.String
toString()
void
writeToParcel(Parcel dest, int flags)
-
Methods inherited from class com.clover.sdk.cashdrawer.CashDrawer
equals, getDrawerNumber, getUniqueIdentifier, hashCode
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<CloverServiceCashDrawer> CREATOR
-
-
Method Detail
-
getIdentifier
public String getIdentifier()
Description copied from class:CashDrawer
The identifier String along with the drawer number uniquely identify cash drawer. Some examples (not exhaustive) are:com.clover.BAYLEAF com.clover.USB org.otherapp.XYZ77
Subclasses written by 3rd party developers should never prefix their cash drawer identifier with "com.clover" to avoid conflicts with cash drawers discovered by Clover Services.- Specified by:
getIdentifier
in classCashDrawer
- Returns:
- the identifier, never null
-
getDisplayName
public String getDisplayName()
Description copied from class:CashDrawer
A human readable name for this cash drawer. The name does not include the drawer number. The name is adjusted to the currently chosen device locale.- Specified by:
getDisplayName
in classCashDrawer
-
pop
public boolean pop()
Description copied from class:CashDrawer
Attempt to pop (open) this cash drawer.This method may perform blocking IO operations depending on the specific cash drawer hardware. It must not be called from the main (UI) thread.
Direct use of this method is not recommended, prefer to use the
CashEvents
class to pop the cash drawer so that cash event logging is also performed.- Specified by:
pop
in classCashDrawer
- Returns:
- false indicates the cash drawer definitely did not open, true indicates the cash drawer likely opened but possibly did not open due to mechanical or electrical issues or may simply be locked.
-
describeContents
public int describeContents()
- Specified by:
describeContents
in interfaceParcelable
-
writeToParcel
public void writeToParcel(Parcel dest, int flags)
- Specified by:
writeToParcel
in interfaceParcelable
-
-