-
Couldn't load subscription status.
- Fork 0
Architecture
Denys edited this page Dec 3, 2016
·
7 revisions
- CashModule
- CardModule
- Core
- Display
- Buttons
- Card Reader
- Cash Output
- Check Output
- CardHolder
- CashLoader
Module wraps logic of working with card data
Proposed API
-
readCard(cardDataModel)- loads card model into module -
checkPin(pin)- check pin,throws PinIncorrectError() -
isAuthorized()- return true if pin was correct -
getBalance()- return card balance -
updateBalance(sum)- change balance - ...
Wraps logic of holding money
Proposed API
-
getCash(amount, nominal)- return money as an list(?) of notes different nominal
- parameter
amountis total sum of notes - parameter
nominalis value from Enum(BIG, SMALL, FREE), parameter is not required - throws
NotEnoughMoneyError
should have next methods
- showText(text)
- showInput(text, inputValue, hide)
- text - text above input
- inputValue - value of input
- hide - if
trueshow inputValue with****
- showButtons(text, buttonsArray)
- text in the middle of screen
- buttonsArray - list of 8 items ["title1", "title2", ..., null, "title8"]
Feel Free to ask questions or edit!