| 412 |
ashish |
1 |
namespace java in.shop2020.logistics
|
|
|
2 |
namespace py shop2020.thriftpy.logistics
|
|
|
3 |
|
| 3374 |
rajveer |
4 |
include "GenericService.thrift"
|
|
|
5 |
|
| 646 |
chandransh |
6 |
enum StationType{
|
|
|
7 |
OWN_STATION = 0, //The service provider's own station.
|
|
|
8 |
ASSOCIATE_STATION = 1 //An associate's station
|
| 472 |
rajveer |
9 |
}
|
| 442 |
rajveer |
10 |
|
| 3044 |
chandransh |
11 |
enum DeliveryType {
|
|
|
12 |
PREPAID = 0,
|
|
|
13 |
COD = 1
|
|
|
14 |
}
|
|
|
15 |
|
| 5527 |
anupam.sin |
16 |
enum PickUpType {
|
|
|
17 |
COURIER = 0,
|
|
|
18 |
RUNNER = 1,
|
|
|
19 |
SELF = 2
|
|
|
20 |
}
|
|
|
21 |
|
| 3044 |
chandransh |
22 |
struct ProviderDetails{
|
|
|
23 |
1:string accountNo,
|
|
|
24 |
2:string email
|
| 7792 |
anupam.sin |
25 |
3:i64 logisticLocation
|
|
|
26 |
4:DeliveryType deliveryType
|
| 3044 |
chandransh |
27 |
}
|
|
|
28 |
|
| 412 |
ashish |
29 |
struct Provider{
|
|
|
30 |
1:i64 id,
|
| 667 |
chandransh |
31 |
2:string name,
|
| 7792 |
anupam.sin |
32 |
3:list<ProviderDetails> details,
|
| 5527 |
anupam.sin |
33 |
4:PickUpType pickup
|
| 412 |
ashish |
34 |
}
|
|
|
35 |
|
| 646 |
chandransh |
36 |
struct AwbUpdate{
|
|
|
37 |
1:string awbNumber,
|
| 6643 |
rajveer |
38 |
2:i64 providerId,
|
|
|
39 |
3:i64 date,
|
|
|
40 |
4:string status,
|
|
|
41 |
5:string description,
|
|
|
42 |
6:string location
|
| 412 |
ashish |
43 |
}
|
|
|
44 |
|
| 5110 |
mandeep.dh |
45 |
struct LogisticsInfo {
|
| 646 |
chandransh |
46 |
1:i64 warehouseId,
|
|
|
47 |
2:i64 providerId,
|
|
|
48 |
3:i64 deliveryTime,
|
| 4009 |
chandransh |
49 |
4:string airway_billno,
|
| 4865 |
rajveer |
50 |
5:i64 shippingTime,
|
| 5110 |
mandeep.dh |
51 |
6:bool codAllowed,
|
| 6524 |
rajveer |
52 |
7:i64 fulfilmentWarehouseId,
|
| 6725 |
rajveer |
53 |
8:bool otgAvailable,
|
|
|
54 |
9:i64 deliveryDelay
|
| 483 |
rajveer |
55 |
}
|
|
|
56 |
|
| 5553 |
rajveer |
57 |
struct PickupStore {
|
| 5719 |
rajveer |
58 |
1:i64 id,
|
|
|
59 |
2:string hotspotId,
|
|
|
60 |
3:string name,
|
|
|
61 |
4:string line1,
|
|
|
62 |
5:string line2,
|
|
|
63 |
6:string city,
|
|
|
64 |
7:string state,
|
|
|
65 |
8:string pin,
|
| 5739 |
rajveer |
66 |
9:string phone,
|
| 5863 |
rajveer |
67 |
10:string email,
|
|
|
68 |
11:string zone,
|
|
|
69 |
12:string bdm,
|
|
|
70 |
13:string bdmEmail
|
| 5553 |
rajveer |
71 |
}
|
| 7785 |
manish.sha |
72 |
|
|
|
73 |
struct LogisticsLocationInfo {
|
|
|
74 |
1:i64 providerId,
|
|
|
75 |
2:string pinCode,
|
|
|
76 |
3:string destinationCode,
|
|
|
77 |
4:bool expAvailable,
|
|
|
78 |
5:bool codAvailable,
|
|
|
79 |
6:bool otgAvailable,
|
|
|
80 |
7:i64 codLimit,
|
|
|
81 |
8:i64 prepaidLimit,
|
|
|
82 |
9:i64 warehouseId,
|
|
|
83 |
10:i64 deliveryTime,
|
|
|
84 |
11:i64 delivery_delay
|
|
|
85 |
}
|
| 5553 |
rajveer |
86 |
|
| 472 |
rajveer |
87 |
exception LogisticsServiceException{
|
|
|
88 |
1:i64 id,
|
|
|
89 |
2:string message
|
|
|
90 |
}
|
|
|
91 |
|
| 3374 |
rajveer |
92 |
service LogisticsService extends GenericService.GenericService{
|
| 646 |
chandransh |
93 |
/**
|
| 667 |
chandransh |
94 |
Returns a provider for a given provider ID. Throws an exception if none found.
|
|
|
95 |
*/
|
|
|
96 |
Provider getProvider(1:i64 providerId) throws (1:LogisticsServiceException lse),
|
|
|
97 |
|
|
|
98 |
/**
|
| 673 |
chandransh |
99 |
Returns a list containing all the providers.
|
|
|
100 |
*/
|
|
|
101 |
list<Provider> getAllProviders() throws (1:LogisticsServiceException lse),
|
|
|
102 |
|
|
|
103 |
/**
|
| 646 |
chandransh |
104 |
Returns a LogisticsInfo structure w/o an airway bill number. Use this method during the estimation phase.
|
|
|
105 |
Raises an exception if this pincode is not allocated to any warehouse zone or provider. Also, if the pincode
|
| 4630 |
mandeep.dh |
106 |
is allocated to a warehouse zone but there are no actual warehouses in that zone, an exception is raised.
|
| 646 |
chandransh |
107 |
*/
|
| 4630 |
mandeep.dh |
108 |
LogisticsInfo getLogisticsEstimation(1:i64 itemId, 2:string destination_pin, 3:DeliveryType type) throws (1:LogisticsServiceException se),
|
| 483 |
rajveer |
109 |
|
| 7256 |
rajveer |
110 |
LogisticsInfo getLogisticsEstimationForStore(1:i64 itemId, 2:string destination_pin, 3:DeliveryType type) throws (1:LogisticsServiceException se),
|
|
|
111 |
|
| 646 |
chandransh |
112 |
/**
|
|
|
113 |
Same as above excpet that an airway bill number is also allocated and returned.
|
|
|
114 |
*/
|
| 5766 |
rajveer |
115 |
LogisticsInfo getLogisticsInfo(1:string destination_pincode, 2:i64 item_id, 3:DeliveryType type, 4:PickUpType pickUp) throws (1:LogisticsServiceException se),
|
| 477 |
rajveer |
116 |
|
| 646 |
chandransh |
117 |
/**
|
|
|
118 |
Returns an unused AWB number for the given provider.
|
|
|
119 |
*/
|
| 5247 |
rajveer |
120 |
string getEmptyAWB(1:i64 providerId, DeliveryType type) throws (1:LogisticsServiceException se),
|
| 472 |
rajveer |
121 |
|
| 646 |
chandransh |
122 |
/**
|
|
|
123 |
Returns the list of updates for the given AWB number and provider id. The list is empty if there are no updates yet.
|
|
|
124 |
*/
|
| 6643 |
rajveer |
125 |
list<AwbUpdate> getShipmentInfo(1:string awbNumber, 2:i64 providerId) throws (1:LogisticsServiceException se),
|
| 729 |
chandransh |
126 |
|
|
|
127 |
/**
|
| 6643 |
rajveer |
128 |
Store the update for the given AWB number and provider id.
|
|
|
129 |
*/
|
|
|
130 |
void storeShipmentInfo(1:AwbUpdate update) throws (1:LogisticsServiceException se),
|
|
|
131 |
|
|
|
132 |
|
|
|
133 |
/**
|
| 729 |
chandransh |
134 |
Returns the short three letter code of a pincode for the given provider.
|
|
|
135 |
Raises an exception if the pin code is not serviced by the given provider.
|
|
|
136 |
*/
|
| 1138 |
chandransh |
137 |
string getDestinationCode(1:i64 providerId, 2:string pinCode) throws (1:LogisticsServiceException se),
|
|
|
138 |
|
|
|
139 |
/**
|
| 3103 |
chandransh |
140 |
Returns the number of unused AWB numbers for the given provider of the given type
|
| 1138 |
chandransh |
141 |
*/
|
| 3103 |
chandransh |
142 |
i64 getFreeAwbCount(1:i64 providerId, 2:string type),
|
| 1730 |
ankur.sing |
143 |
|
|
|
144 |
/**
|
|
|
145 |
Returns list of Holiday dates between fromDate and toDate (both inclusive)
|
|
|
146 |
fromDate should be passed as milliseconds corresponding to the start of the day.
|
|
|
147 |
If fromDate is passed as -1, fromDate is not considered for filtering
|
|
|
148 |
If toDate is passed as -1, toDate is not considered for filtering
|
|
|
149 |
*/
|
| 4934 |
amit.gupta |
150 |
list<i64> getHolidays(1:i64 fromDate, 2:i64 toDate),
|
|
|
151 |
|
|
|
152 |
/**
|
|
|
153 |
Returns a LogisticsInfo structure w/o an airway bill number. Use this method during the estimation phase.
|
|
|
154 |
Raises an exception if this pincode is not allocated to any warehouse zone or provider. Also, if the pincode
|
|
|
155 |
is allocated to a warehouse zone but there are no actual warehouses in that zone, an exception is raised.
|
|
|
156 |
*/
|
|
|
157 |
list<i64> getEntityLogisticsEstimation(1:i64 catalogItemId, 2:string destination_pin, 3:DeliveryType type) throws (1:LogisticsServiceException se)
|
| 5527 |
anupam.sin |
158 |
|
|
|
159 |
/**
|
|
|
160 |
* Returns the id for a given pickUpType
|
|
|
161 |
*/
|
| 5553 |
rajveer |
162 |
i64 getProviderForPickupType(1:i64 pickUp),
|
|
|
163 |
|
|
|
164 |
|
|
|
165 |
list<PickupStore> getAllPickupStores(),
|
|
|
166 |
|
| 5719 |
rajveer |
167 |
PickupStore getPickupStore(1:i64 storeId),
|
|
|
168 |
|
| 6322 |
amar.kumar |
169 |
PickupStore getPickupStoreByHotspotId(1:string hotspotId),
|
|
|
170 |
|
| 7567 |
rajveer |
171 |
void addPincode(1:i64 providerId, 2:string pincode, 3:string destCode, 4:bool exp, 5:bool cod, 6:i32 stationType, 7:bool otgAvailable),
|
| 6322 |
amar.kumar |
172 |
|
| 7567 |
rajveer |
173 |
void updatePincode(1:i64 providerId, 2:string pincode, 3:bool exp, 4:bool cod, 5:bool otgAvailable),
|
|
|
174 |
|
| 7734 |
manish.sha |
175 |
bool addNewAwbs(1:i64 providerId, 2:bool cod, 3:list<string> awbs),
|
|
|
176 |
|
| 7785 |
manish.sha |
177 |
void runLogisticsLocationInfoUpdate(1:list<LogisticsLocationInfo> logisticsLocationInfoList, 2:bool runCompleteUpdate)
|
| 412 |
ashish |
178 |
}
|