Subversion Repositories SmartDukaan

Rev

Rev 646 | Rev 673 | 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,
667 chandransh 18
	2:string name,
19
	3:string accountNo
412 ashish 20
}
21
 
646 chandransh 22
struct AwbUpdate{
23
    1:string awbNumber,
24
    2:string providerName,
25
    3:string location,
26
    4:i64 entryDate,
27
    5:string description
412 ashish 28
}
29
 
483 rajveer 30
struct LogisticsInfo{
646 chandransh 31
	1:i64 warehouseId,
32
	2:i64 providerId,
33
	3:i64 deliveryTime,
34
	4:string airway_billno
483 rajveer 35
}
36
 
472 rajveer 37
exception LogisticsServiceException{
38
	1:i64 id,
39
	2:string message
40
}
41
 
667 chandransh 42
service LogisticsService{
646 chandransh 43
	/**
667 chandransh 44
	 Returns a provider for a given provider ID. Throws an exception if none found.
45
	*/
46
	Provider getProvider(1:i64 providerId) throws (1:LogisticsServiceException lse),
47
 
48
	/**
646 chandransh 49
	 Returns a LogisticsInfo structure w/o an airway bill number. Use this method during the estimation phase.
50
	 Raises an exception if this pincode is not allocated to any warehouse zone or provider. Also, if the pincode
51
	 is allocated to a warehouse zone but there are no actual warehouses in that zone, an exception is raised. 
52
	 */
53
	LogisticsInfo getLogisticsEstimation(1:i64 itemId, 2:string destination_pin) throws (1:LogisticsServiceException se),
483 rajveer 54
 
646 chandransh 55
	/**
56
	 Same as above excpet that an airway bill number is also allocated and returned.
57
	*/
58
	LogisticsInfo getLogisticsInfo(1:string destination_pincode, 2:string item_id) throws (1:LogisticsServiceException se),
477 rajveer 59
 
646 chandransh 60
	/**
61
	 Returns an unused AWB number for the given provider.
62
	*/
63
	string getEmptyAWB(1:i64 providerId) throws (1:LogisticsServiceException se),
472 rajveer 64
 
646 chandransh 65
	/**
66
	 Returns the list of updates for the given AWB number and provider id. The list is empty if there are no updates yet.
67
	*/
68
	list<AwbUpdate> getShipmentInfo(1:string awb, 2:i64 providerId) throws (1:LogisticsServiceException se)
412 ashish 69
}
70