| Line 44... |
Line 44... |
| 44 |
enum TransactionStatus{
|
44 |
enum TransactionStatus{
|
| 45 |
INIT,
|
45 |
INIT,
|
| 46 |
IN_PROCESS,
|
46 |
IN_PROCESS,
|
| 47 |
COMPLETED,
|
47 |
COMPLETED,
|
| 48 |
FAILED,
|
48 |
FAILED,
|
| 49 |
AUTHORIZED
|
49 |
AUTHORIZED,
|
| - |
|
50 |
COD_IN_PROCESS
|
| 50 |
}
|
51 |
}
|
| 51 |
|
52 |
|
| 52 |
struct LineItem{
|
53 |
struct LineItem{
|
| 53 |
1:i64 id,
|
54 |
1:i64 id,
|
| 54 |
2:i64 item_id,
|
55 |
2:i64 item_id,
|
| Line 123... |
Line 124... |
| 123 |
32:i64 batchNo,
|
124 |
32:i64 batchNo,
|
| 124 |
33:i64 serialNo,
|
125 |
33:i64 serialNo,
|
| 125 |
34:bool doaFlag,
|
126 |
34:bool doaFlag,
|
| 126 |
35:string pickupRequestNo,
|
127 |
35:string pickupRequestNo,
|
| 127 |
36:i64 transactionId,
|
128 |
36:i64 transactionId,
|
| 128 |
37:string purchaseOrderNo
|
129 |
37:string purchaseOrderNo,
|
| - |
|
130 |
38:bool cod
|
| 129 |
}
|
131 |
}
|
| 130 |
|
132 |
|
| 131 |
struct Transaction{
|
133 |
struct Transaction{
|
| 132 |
1:i64 id,
|
134 |
1:i64 id,
|
| 133 |
2:list<Order> orders,
|
135 |
2:list<Order> orders,
|
| Line 209... |
Line 211... |
| 209 |
list<i64> getCancellableOrdersForCustomer(1:i64 customer_id, 2:i64 limit) throws (1:TransactionServiceException ex),
|
211 |
list<i64> getCancellableOrdersForCustomer(1:i64 customer_id, 2:i64 limit) throws (1:TransactionServiceException ex),
|
| 210 |
|
212 |
|
| 211 |
bool changeOrderStatus(1:i64 orderId, 2:OrderStatus status, 3:string description) throws (1:TransactionServiceException ex),
|
213 |
bool changeOrderStatus(1:i64 orderId, 2:OrderStatus status, 3:string description) throws (1:TransactionServiceException ex),
|
| 212 |
|
214 |
|
| 213 |
/**
|
215 |
/**
|
| 214 |
Add billing details such as the bill number and the biller to the Order.
|
- |
|
| 215 |
*/
|
- |
|
| 216 |
bool addBillingDetails(1:i64 orderId, 2:string invoice_number, 3:string billed_by) throws (1:TransactionServiceException ex),
|
- |
|
| 217 |
|
- |
|
| 218 |
/**
|
- |
|
| 219 |
Adds jacket number and IMEI no. to the order. Doesn't update the IMEI no. if a -1 is supplied.
|
- |
|
| 220 |
Also marks the order as billed and sets the billing timestamp.
|
- |
|
| 221 |
Return false if it doesn't find the order with the given ID.
|
- |
|
| 222 |
*/
|
- |
|
| 223 |
bool addJacketNumber(1:i64 orderId, 2:i64 jacketNumber, 3:i64 imeiNumber, 4:string itemNumber, 5:string billedBy, 6:i64 billingType) throws (1:TransactionServiceException ex),
|
- |
|
| 224 |
|
- |
|
| 225 |
bool acceptOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
|
- |
|
| 226 |
bool billOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
|
- |
|
| 227 |
|
- |
|
| 228 |
/**
|
- |
|
| 229 |
Returns list of orders for given transaction Id. Also filters based on customer Id so that
|
216 |
Returns list of orders for given transaction Id. Also filters based on customer Id so that
|
| 230 |
only user who owns the transaction can view its order details.
|
217 |
only user who owns the transaction can view its order details.
|
| 231 |
*/
|
218 |
*/
|
| 232 |
list<Order> getOrdersForTransaction(1:i64 transactionId 2:i64 customerId) throws (1:TransactionServiceException ex),
|
219 |
list<Order> getOrdersForTransaction(1:i64 transactionId 2:i64 customerId) throws (1:TransactionServiceException ex),
|
| 233 |
|
220 |
|
| Line 246... |
Line 233... |
| 246 |
Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
|
233 |
Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
|
| 247 |
Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
|
234 |
Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
|
| 248 |
*/
|
235 |
*/
|
| 249 |
Order getOrderForCustomer(1:i64 orderId, 2:i64 customerId) throws (1:TransactionServiceException ex),
|
236 |
Order getOrderForCustomer(1:i64 orderId, 2:i64 customerId) throws (1:TransactionServiceException ex),
|
| 250 |
|
237 |
|
| - |
|
238 |
//Alerts apis
|
| - |
|
239 |
list<Alert> getAlerts(1:i64 orderId, 2:bool valid),
|
| - |
|
240 |
void setAlert(1:i64 orderId, 2:bool unset, 3:i64 type, 4: string comment),
|
| - |
|
241 |
|
| - |
|
242 |
/**
|
| - |
|
243 |
Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
|
| - |
|
244 |
*/
|
| - |
|
245 |
i64 getValidOrderCount(),
|
| - |
|
246 |
|
| - |
|
247 |
/**
|
| - |
|
248 |
Returns the number of distinct customers who have done successful transactions
|
| - |
|
249 |
*/
|
| - |
|
250 |
i64 getNoOfCustomersWithSuccessfulTransaction(),
|
| - |
|
251 |
|
| - |
|
252 |
/**
|
| - |
|
253 |
Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
|
| - |
|
254 |
List contains two values, first minimum amount and second maximum amount.
|
| - |
|
255 |
*/
|
| - |
|
256 |
list<double> getValidOrdersAmountRange(),
|
| - |
|
257 |
|
| 251 |
/**
|
258 |
/**
|
| - |
|
259 |
Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
|
| - |
|
260 |
If limit is passed as 0, then all valid Orders are returned.
|
| - |
|
261 |
*/
|
| - |
|
262 |
list<Order> getValidOrders(1:i64 limit),
|
| - |
|
263 |
|
| - |
|
264 |
/**
|
| 252 |
Create a batch of all the pending orders for the given warehouse.
|
265 |
Create a batch of all the pending orders for the given warehouse.
|
| 253 |
The returned list is orderd by created_timestamp.
|
266 |
The returned list is orderd by created_timestamp.
|
| 254 |
If there are no pending orders, an empty list is returned.
|
267 |
If there are no pending orders, an empty list is returned.
|
| 255 |
*/
|
268 |
*/
|
| 256 |
list<Order> batchOrders(1:i64 warehouseId) throws (1:TransactionServiceException ex),
|
269 |
list<Order> batchOrders(1:i64 warehouseId) throws (1:TransactionServiceException ex),
|
| 257 |
|
270 |
|
| 258 |
/**
|
271 |
/**
|
| 259 |
Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
|
272 |
Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
|
| 260 |
*/
|
273 |
*/
|
| 261 |
bool markOrderAsOutOfStock(1:i64 orderId) throws (1:TransactionServiceException ex),
|
274 |
bool markOrderAsOutOfStock(1:i64 orderId) throws (1:TransactionServiceException ex),
|
| 262 |
|
275 |
|
| 263 |
/**
|
276 |
/**
|
| - |
|
277 |
Marks the given order as SUBMITTED_FOR_PROCESSING and updates the verified
|
| - |
|
278 |
timestamp. It is intended to be used for COD orders but can be harmlessly
|
| - |
|
279 |
used for all other orders as well.
|
| - |
|
280 |
Throws an exception if no such order exists.
|
| - |
|
281 |
*/
|
| - |
|
282 |
bool verifyOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
|
| - |
|
283 |
|
| - |
|
284 |
/**
|
| 264 |
Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
|
285 |
Marks the given order as ACCEPTED and updates the accepted timestamp. If the
|
| - |
|
286 |
given order is not a COD order, it also captures the payment if the same has
|
| - |
|
287 |
not been captured.
|
| - |
|
288 |
Throws an exception if no such order exists.
|
| 265 |
*/
|
289 |
*/
|
| - |
|
290 |
bool acceptOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
|
| - |
|
291 |
|
| - |
|
292 |
bool billOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
|
| - |
|
293 |
|
| - |
|
294 |
/**
|
| - |
|
295 |
Add billing details such as the bill number and the biller to the Order.
|
| - |
|
296 |
Should be used when the bill is issued by a 3rd party and we've to feed
|
| - |
|
297 |
the information into our system.
|
| - |
|
298 |
*/
|
| - |
|
299 |
bool addBillingDetails(1:i64 orderId, 2:string invoice_number, 3:string billed_by) throws (1:TransactionServiceException ex),
|
| - |
|
300 |
|
| - |
|
301 |
/**
|
| - |
|
302 |
Adds jacket number, item number and IMEI no. to the order. Doesn't update
|
| - |
|
303 |
the IMEI no. if a -1 is supplied.
|
| - |
|
304 |
Also, it generates an invoice number for the order, marks the order as
|
| - |
|
305 |
BILLED and sets the billing timestamp.
|
| - |
|
306 |
It should be used when we are billing the orders ourselves.
|
| - |
|
307 |
|
| - |
|
308 |
Returns false if it doesn't find the order with the given ID.
|
| - |
|
309 |
*/
|
| - |
|
310 |
bool addJacketNumber(1:i64 orderId, 2:i64 jacketNumber, 3:i64 imeiNumber, 4:string itemNumber, 5:string billedBy, 6:i64 billingType) throws (1:TransactionServiceException ex),
|
| - |
|
311 |
|
| - |
|
312 |
/**
|
| - |
|
313 |
Depending on the third parameter, marks either all prepaid or all cod orders BILLED by the
|
| - |
|
314 |
given warehouse and were picked up by the given provider as SHIPPED_FROM_WH.
|
| - |
|
315 |
*/
|
| 266 |
bool markOrdersAsManifested(1:i64 warehouseId, 2:i64 providerId) throws (1:TransactionServiceException ex),
|
316 |
bool markOrdersAsManifested(1:i64 warehouseId, 2:i64 providerId, 3:bool cod) throws (1:TransactionServiceException ex),
|
| 267 |
|
317 |
|
| 268 |
/**
|
318 |
/**
|
| 269 |
Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
|
319 |
Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
|
| 270 |
Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
|
320 |
Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
|
| 271 |
Raises an exception if we encounter report for an AWB number that we did not ship.
|
321 |
Raises an exception if we encounter report for an AWB number that we did not ship.
|
| Line 296... |
Line 346... |
| 296 |
undelivered orders, pass them as -1.
|
346 |
undelivered orders, pass them as -1.
|
| 297 |
Returns an empty list if no such orders exist.
|
347 |
Returns an empty list if no such orders exist.
|
| 298 |
*/
|
348 |
*/
|
| 299 |
list<Order> getUndeliveredOrders(1:i64 providerId, 2:i64 warehouseId),
|
349 |
list<Order> getUndeliveredOrders(1:i64 providerId, 2:i64 warehouseId),
|
| 300 |
|
350 |
|
| 301 |
//Alerts apis
|
- |
|
| 302 |
list<Alert> getAlerts(1:i64 orderId, 2:bool valid),
|
- |
|
| 303 |
void setAlert(1:i64 orderId, 2:bool unset, 3:i64 type, 4: string comment),
|
- |
|
| 304 |
|
- |
|
| 305 |
/**
|
- |
|
| 306 |
Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
|
- |
|
| 307 |
*/
|
- |
|
| 308 |
i64 getValidOrderCount(),
|
- |
|
| 309 |
|
- |
|
| 310 |
/**
|
- |
|
| 311 |
Returns the number of distinct customers who have done successful transactions
|
- |
|
| 312 |
*/
|
- |
|
| 313 |
i64 getNoOfCustomersWithSuccessfulTransaction(),
|
- |
|
| 314 |
|
- |
|
| 315 |
/**
|
- |
|
| 316 |
Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
|
- |
|
| 317 |
List contains two values, first minimum amount and second maximum amount.
|
- |
|
| 318 |
*/
|
- |
|
| 319 |
list<double> getValidOrdersAmountRange(),
|
- |
|
| 320 |
|
- |
|
| 321 |
/**
|
- |
|
| 322 |
Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
|
- |
|
| 323 |
If limit is passed as 0, then all valid Orders are returned.
|
- |
|
| 324 |
*/
|
- |
|
| 325 |
list<Order> getValidOrders(1:i64 limit),
|
- |
|
| 326 |
|
- |
|
| 327 |
/**
|
351 |
/**
|
| 328 |
Toggle the DOA flag of an order. This should be used to flag an order for follow-up and unflag it when the follow-up is complete.
|
352 |
Toggle the DOA flag of an order. This should be used to flag an order for follow-up and unflag it when the follow-up is complete.
|
| 329 |
Returns the final flag status.
|
353 |
Returns the final flag status.
|
| 330 |
Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS.
|
354 |
Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS.
|
| 331 |
*/
|
355 |
*/
|