Class CloverServiceCashDrawer

  • All Implemented Interfaces:

    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.
    • Constructor Detail

      • CloverServiceCashDrawer

        public CloverServiceCashDrawer​(String identifier,
                                       int drawerNumber,
                                       String displayName)
        For internal use only.
    • 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:
        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 class CashDrawer
        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 class CashDrawer
      • 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 class CashDrawer
        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.