Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
412 ashish 1
namespace java in.shop2020.logistics
2
namespace py shop2020.thriftpy.logistics
3
 
646 chandransh 4
enum StationType{
5
	OWN_STATION = 0,		//The service provider's own station.
6
	ASSOCIATE_STATION = 1	//An associate's station
472 rajveer 7
}
442 rajveer 8
 
646 chandransh 9
enum WarehouseLocation{
10
	Delhi = 0,
11
	Mumbai = 1,
12
	Bangalore = 2,
13
	Kolkata = 3
412 ashish 14
}
15
 
16
struct Provider{
17
	1:i64 id,
18
	2:string name
19
}
20
 
646 chandransh 21
struct AwbUpdate{
22
    1:string awbNumber,
23
    2:string providerName,
24
    3:string location,
25
    4:i64 entryDate,
26
    5:string description
412 ashish 27
}
28
 
483 rajveer 29
struct LogisticsInfo{
646 chandransh 30
	1:i64 warehouseId,
31
	2:i64 providerId,
32
	3:i64 deliveryTime,
33
	4:string airway_billno
483 rajveer 34
}
35
 
472 rajveer 36
exception LogisticsServiceException{
37
	1:i64 id,
38
	2:string message
39
}
40
 
646 chandransh 41
service LogisticsService{	
42
	/**
43
	 Returns a LogisticsInfo structure w/o an airway bill number. Use this method during the estimation phase.
44
	 Raises an exception if this pincode is not allocated to any warehouse zone or provider. Also, if the pincode
45
	 is allocated to a warehouse zone but there are no actual warehouses in that zone, an exception is raised. 
46
	 */
47
	LogisticsInfo getLogisticsEstimation(1:i64 itemId, 2:string destination_pin) throws (1:LogisticsServiceException se),
483 rajveer 48
 
646 chandransh 49
	/**
50
	 Same as above excpet that an airway bill number is also allocated and returned.
51
	*/
52
	LogisticsInfo getLogisticsInfo(1:string destination_pincode, 2:string item_id) throws (1:LogisticsServiceException se),
477 rajveer 53
 
646 chandransh 54
	/**
55
	 Returns an unused AWB number for the given provider.
56
	*/
57
	string getEmptyAWB(1:i64 providerId) throws (1:LogisticsServiceException se),
472 rajveer 58
 
646 chandransh 59
	/**
60
	 Returns the list of updates for the given AWB number and provider id. The list is empty if there are no updates yet.
61
	*/
62
	list<AwbUpdate> getShipmentInfo(1:string awb, 2:i64 providerId) throws (1:LogisticsServiceException se)
412 ashish 63
}
64