""" Author: Mitchell Pomery (bobgeorge33) Dispense is an abstract class that allows easy configuration between different systems. Anything that is intended to talk to OpenDispense or similar should comply with this class. Using this class in particular will cause you a lot of problems. """ class DispenseInterface(object): """ Create a new dispense object. """ def __init__(self, username=None, loggedIn=False, disabled=False): pass """ Create a new dispense interface as the supplied user. """ @staticmethod def authUsernamePin(username, pin): pass """ Create a new dispense interface as the supplied user. """ @staticmethod def authMifare(cardId): pass """ Add a MIFARE card for this user """ def addCard(self, cardId): pass """ Check if creating the user worked correctly. """ def isLoggedIn(self): pass """ Get the users username. """ def getUsername(self, user): pass """ Get the users current balance. """ def getBalance(self, user): pass """ Get the name and price of an item. itemId is the number entered into the vending machine """ @staticmethod def getItemInfo(itemId): pass """ Check if the user is disabled. """ def isDisabled(self): pass """ Dispense an item for the current user. itemId is the number entered into the vending machine """ def dispenseItem(self, itemId): pass