Tangram VENDING services, version: 1.02

Datove typy:
--------------------------------------------------------
String		dlzka moze byt <0,2147483647>
Boolean		hodnoty su true alebo false
Integer 	cele cislo, <-2147483648,2147483647>
Long		cele cislo, <-2^63,2^63-1>
Decimal		desatinne cislo, desatinna ciarka je znak '.'
Date		datum formatu yyyy-MM-dd
Time		datum a cas formatu yyyy-MM-dd HH:mm:ss
List		viacnasobne opakovanie struktur, CAN NULL znamena ze nemusi byt ziadna, NOT NULL znamena ze vzdy aspon jedna



Poziadavky:
--------------------------------------------------------
info
cards?client={string}&pswd={string}
card?client={string}&pswd={string}&cardid={string}
cancel?client={string}&pswd={string}&transid={string}
transaction?client={string}&pswd={string}&cardid={string}&transid={string}&type={V|C}&date={yyyy-mm-dd}[&time={hh:mm}]&value={number}&deviceid={string}[&slot={string}]

Detaily parametrov poziadavky transaction:
parameter type moze byt:
 V   - znizenie stavu kreditu (vydaj, nakup)
 C   - navysenie stavu kreditu (dobitie, vklad)

parameter transid max 9 znakov, musi byt jedinecny v ramci vsetkych automatov a pocas celeho obdobia, pouziva sa ako jedinecny kluc (xx) k zaznamu v tabulke FO_TRANS.
V pripde ze je potrebene transakciu stornovat (vydaj jedla neprebehol), tak treba zavolat pozadiavku cancel s hodnotu parametrom transid ako bola v poziadavke transaction.



Struktury:
--------------------------------------------------------
<info>
Decimal	version		NOT NULL verzia API
Time	time		NOT NULL aktualny datum a cas



<result>
String	code		NOT NULL string 'OK' alebo 'WARNING'
String	text		CAN NULL text varovania


<card>
String	cardid		NOT NULL
String	pid		CAN NULL osobne cislo, null ak karta neexistuje
String	name		NOT NULL meno cloveka alebo string 'Unknown card', 'Card not attached', 'Unknown PID', 'Unnamed'
String	department;	CAN NULL kod stredisko
String	departmentName	CAN NULL nazov strediska
Decimal	credit		NOT NULL maximalna suma ktoru je mozne prave teraz pouzit



Priklady:
--------------------------------------------------------
http://localhost:8080/tangram/vending/info

http://localhost:8080/tangram/vending/cards?client=TEST&pswd=***

http://localhost:8080/tangram/vending/card?client=TEST&pswd=***&cardid=123456
http://localhost:8080/tangram/vending/card?client=TEST&pswd=***&cardid=000
http://localhost:8080/tangram/vending/card?client=TEST&pswd=***&cardid=888
http://localhost:8080/tangram/vending/card?client=TEST&pswd=***&cardid=999
http://localhost:8080/tangram/vending/card?client=TEST&pswd=***&cardid=ZZZ

http://localhost:8080/tangram/vending/cancel?client=TEST&pswd=***&transid=YBAGBOJ

http://localhost:8080/tangram/vending/transaction?client=TEST&pswd=***&cardid=123456&transid=YBAGBOJ&type=V&date=2017-04-12&time=07:52&value=8.3&deviceid=DEV01&slot=23
http://localhost:8080/tangram/vending/transaction?client=TEST&pswd=***&cardid=ZZZ&transid=XPDZXBQH&type=V&date=2017-04-12&value=11.03&deviceid=DEV03
http://localhost:8080/tangram/vending/transaction?client=TEST&pswd=***&cardid=123456&transid=WWCYWGKSP&type=C&date=2017-04-12&value=11.03&deviceid=DEV03