Subversion Repositories SmartDukaan

Rev

Rev 116 | Rev 302 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
116 ashish 1
namespace java in.shop2020.utils
2
namespace py shop2020.thriftpy.utils
3
 
4
/**
5
Helper service
6
created by @ashish
7
**/
8
 
9
struct ItemLogistics{
10
	1:i64 warehouseId,
11
	2:i64 availability,
12
	3:i64 deliveryBy
13
}
14
 
121 ashish 15
struct Mail{
16
	1:list<string> to,
17
	2:string subject,
18
	3:string data,
19
	4:string from
20
}
21
 
22
struct TextMessage{
23
	1:string number,
24
	2:string message,
25
	3:i64 dispatchTime,
26
	4:i64 deliveryTime
27
}
28
 
116 ashish 29
exception HelperServiceException{
30
	1:i64 id,
31
	2:string message
32
}
33
 
121 ashish 34
struct Message{
35
	1:i64 id,
36
	2:string message
37
}
38
 
116 ashish 39
service EstimationService{
40
 
41
	//This call would return a map having the following 
121 ashish 42
	list<ItemLogistics> getLogisticsEstimation(1:i64 itemId,2:map<string,string> location) throws (1:HelperServiceException se),
43
	void sendMail(1:Mail mail) throws (1:HelperServiceException se),
44
	void sendText(1:TextMessage message) throws (1:HelperServiceException se),
45
 
46
	void addMessage(1:Message) throws (1:HelperServiceException se),
47
	void updateMessage(1:i64 id, 2:string message) throws (1:HelperServiceException se),
48
	void getMessage(1:i64 id) throws (1:HelperServiceException se),
49
	void getSubstitutedMessage(1:i64 id, 2:map<string,string> params) throws (1:HelperServiceException se)
116 ashish 50
}