Added model CardType and some API & logic for it