SGRGGOQHQZHXBJ2W6YQIHFGSX3L2LW43T6GEYLF3KFMKKQ3EISQQC
}
service RFKPOS {
rpc CommitTransaction(CommitTransactionRequest) returns (CommitTransactionResponse);
}
enum Currency {
EUR = 0;
USD = 1;
NOK = 2;
BTC = 3;
LTN = 4;
ETH = 5;
DOT = 6;
}
message Money {
int64 value = 0;
uint64 dec = 1;
Currency cur = 2;
}
message Timestamp {
uint32 year = 1;
uint32 month = 2;
uint32 day = 3;
uint32 hour = 4;
uint32 minute = 5;
uint32 second = 6;
uint32 tz = 7;
}
message Created {
uint64 id = 0;
optional string comment = 1;
}
enum ErrorPriority {
ERR_INFO = 0;
ERR_WARNING = 1;
ERR_ERROR = 2;
ERR_CRITICAL = 3;
}
message Error {
string message = 0;
ErrorPriority prio = 1;
enum TransactionState {
TRANS_OPEN = 0;
TRANS_PAYED = 1;
TRANS_REVOKED = 2;
}
enum TransactionType {
TRANS_SELL = 0;
TRANS_BUY = 1;
}
message TransactionData {
Timestamp ts = 2;
TransactionType type = 3;
Money discount = 4;
Timestamp expire = 5;
optional string comment = 6;
}
message Transaction {
uint64 id = 0;
TransactionData data = 1;
TransactionState state = 2;
}
message CommitTransactionRequest {
TransactionData tr = 0;
Signature signature = 1;
}
message CommitTransactionResponse {
optional Created created = 0;
optional Error err = 1;
}