try around parsing upc data
[omsmith/pos-js.git] / pos-bookie.thrift
1 namespace cpp posbookie
2
3 enum E_PURCHASE_STATUS { EPS_FAIL, EPS_NOMONEY, EPS_SUCCESS }
4
5 service PosBookie {
6         void ping(),
7
8         string getSalt(),
9
10   E_PURCHASE_STATUS
11     purchaseItems(1:string auth, 2:string dataToHash, 3:list<i64> upcs),
12
13
14         i32 getUPCPrice(1:i64 upc),
15   i32 getStock(1:i64 upc)
16 }
17
18 /* POS interface :
19         i32 getAccountFromHash(1:string dataToHash),
20         list<string> getHashesFromAccountId(1:i32 account),
21         list<string> getHashesFromAccountName(1:string account),
22
23         i32 getHashAccountBalance(1:string dataToHash),
24         i32 getIdAccountBalance(1:i32 account),
25         i32 getNameAccountBalance(1:string account),
26
27         i64 associateHashWithId(1:string auth, 2:string dataToHash, 3:i32 account),
28         i64 associateHashWithName(1:string auth, 2:string dataToHash, 3:string account),
29         i64 deassociateHash(1:string auth, 2:string dataToHash),
30
31         i32 getUPCPrice(1:i64 upc),
32         i64 setUPCPrice(1:string auth, 2:i64 upc, 3:i32 price),
33
34         i64 doTransactionOnHash(1:string auth, 2:string dataToHash, 3:i32 delta),
35         i64 doTransactionOnId(1:string auth, 2:i32 account, 3:i32 delta),
36         i64 doTransactionOnName(1:string auth, 2:string account, 3:i32 delta),
37         i64 revertTransaction(1:string auth, 2:i64 serial),
38
39         i32 getStock(1:i64 upc),
40         i64 doStockChange(1:string auth, 2:i64 upc, 3:i32 delta),
41
42         list<string> toString()
43 */
44