Subversion Repositories SmartDukaan

Rev

Rev 2382 | Rev 2589 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2382 Rev 2537
Line 21... Line 21...
21
	DELIVERY_FAILED_SECOND_ATTEMPT,
21
	DELIVERY_FAILED_SECOND_ATTEMPT,
22
	DELIVERY_FAILED_THIRD_ATTEMPT,
22
	DELIVERY_FAILED_THIRD_ATTEMPT,
23
	DELIVERY_FAILED_WORNG_ADDRESS
23
	DELIVERY_FAILED_WORNG_ADDRESS
24
	COMPLETED,
24
	COMPLETED,
25
	CANCELED,
25
	CANCELED,
26
	FAILED
26
	FAILED,
-
 
27
	SALES_RETURN_IN_TRANSIT,
-
 
28
	SALES_RETURNED,
-
 
29
	SALES_RET_PENDING,
-
 
30
	DOA_PICKUP_REQUESTED,
-
 
31
	DOA_RETURN_AUTHORIZED,
-
 
32
	DOA_RETURN_IN_TRANSIT,
-
 
33
	DOA_RETURNED,
-
 
34
	DOA_CERT_INVALID,
-
 
35
	DOA_PENDING
27
}
36
}
28
 
37
 
29
enum TransactionStatus{
38
enum TransactionStatus{
30
	INIT,
39
	INIT,
31
	IN_PROCESS,
40
	IN_PROCESS,
Line 102... Line 111...
102
	28:i64 delivery_timestamp,
111
	28:i64 delivery_timestamp,
103
	29:i64 outofstock_timestamp,
112
	29:i64 outofstock_timestamp,
104
	30:i64 jacket_number,
113
	30:i64 jacket_number,
105
	31:string receiver,
114
	31:string receiver,
106
	32:i64 batchNo,
115
	32:i64 batchNo,
107
	33:i64 serialNo
116
	33:i64 serialNo,
-
 
117
	34:bool doaFlag,
-
 
118
	35:string pickupRequestNo
108
}
119
}
109
 
120
 
110
struct Transaction{
121
struct Transaction{
111
	1:i64 id,
122
	1:i64 id,
112
	2:list<Order> orders,
123
	2:list<Order> orders,
Line 285... Line 296...
285
	
296
	
286
	/**
297
	/**
287
	Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
298
	Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
288
	If limit is passed as 0, then all valid Orders are returned. 
299
	If limit is passed as 0, then all valid Orders are returned. 
289
	*/
300
	*/
290
	list<Order> getValidOrders(1:i64 limit)
301
	list<Order> getValidOrders(1:i64 limit),
291
	
302
	
-
 
303
	/**
-
 
304
	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.
-
 
305
	Returns the final flag status.
-
 
306
	Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS. 
-
 
307
	*/
-
 
308
	bool toggleDOAFlag(1:i64 orderId) throws (1:TransactionServiceException ex),
-
 
309
	
-
 
310
	/**
-
 
311
	Sends out an email to the account manager of the original courier provider used to ship the order.
-
 
312
	If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUESTED.
-
 
313
	If the order status was DOA_PICKUP_REQUESTED, it is left unchanged.
-
 
314
	For any other status, it returns false.
-
 
315
	Throws an exception if the order with the given id couldn't be found.
-
 
316
	*/
-
 
317
	bool requestPickupNumber(1:i64 orderId) throws (1:TransactionServiceException ex),
-
 
318
	
-
 
319
	/**
-
 
320
	If the order status is DOA_PICKUP_REQUESTED, it does the following
-
 
321
		1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
-
 
322
		2. Changes order status to be DOA_PICKUP_AUTHORIZED.
-
 
323
		3. Returns true
-
 
324
	If the order is any other status, it returns false.
-
 
325
	Throws an exception if the order with the given id couldn't be found.
-
 
326
	*/
-
 
327
	bool authorizePickup(1:i64 orderId, 2:string pickupNumber) throws (1:TransactionServiceException ex),
292
}
328
}
293
329