Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
48 ashish 1
namespace java in.shop2020.model.v1.user
95 ashish 2
namespace py shop2020.thriftpy.model.v1.user
48 ashish 3
 
3374 rajveer 4
include "GenericService.thrift"
5
 
48 ashish 6
/**
7
Exceptions
8
*/
9
exception AuthenticationException{
10
	1:string message,
11
	2:i32 errorCode
12
}
13
 
14
exception UserContextException{
15
	1:i32 errorCode,
16
	2:string message
17
}
18
 
552 chandransh 19
exception ShoppingCartException{
20
	1:i64 id,
21
	2:string message
22
}
23
 
1116 varun.gupt 24
exception UserCommunicationException{
25
	1:i64 id,
26
	2:string message
27
}
28
 
1995 vikas 29
exception UserAffiliateException{
1848 vikas 30
    1:i64 id,
31
    2:string message
32
}
33
 
1599 ankur.sing 34
enum UserType{
35
	USER = 0,
36
	ANONYMOUS = 1 
37
}
38
 
6367 amit.gupta 39
enum PromotionType{
40
	DISCOUNT_COUPON = 0,
41
	GIFT_VOUCHER = 1 
42
}
43
 
121 ashish 44
enum AddressType{
130 ashish 45
	WORK = 0,
46
	HOME = 1
48 ashish 47
}
48
 
130 ashish 49
 
48 ashish 50
/**
1116 varun.gupt 51
Form types for Contact Us form
52
*/
53
enum UserCommunicationType{
54
	RETURN_FORM = 1,
55
	ORDER_CANCELLATION = 2,
56
	DELIVERY_PROBLEM = 3,
57
	PAYMENT_STATUS = 4,
58
	ORDER_STATUS = 5,
59
	PRODUCT_REQUEST = 6,
6176 amit.gupta 60
	RECHARGE_RELATED = 7,
3339 mandeep.dh 61
	OTHER = 8
6176 amit.gupta 62
 
1116 varun.gupt 63
}
64
 
65
/**
3379 vikas 66
Affiliate track log types for affiliate tracking
67
*/
68
enum TrackLogType{
69
    NEW_REGISTRATION = 1,
70
    PAYMENT_SUCCESS = 2
71
}
72
 
73
/**
121 ashish 74
Address
75
*/
76
struct Address{
552 chandransh 77
	1:i64 id,
78
	2:string line1,
79
	3:string line2,
80
	4:string landmark,
81
	5:string city,
82
	6:string state,
83
	7:string pin,
84
	8:string country,
48 ashish 85
	9:bool enabled,
123 ashish 86
	10:AddressType type,
414 ashish 87
	11:i64 addedOn,
88
	12:string name,
89
	13:string phone
48 ashish 90
}
91
 
552 chandransh 92
enum Sex{
93
	MALE,
94
	FEMALE,
95
	WONT_SAY
96
}
97
 
121 ashish 98
/**
552 chandransh 99
The user structure holding the basic information that identifies the user.
121 ashish 100
**/
552 chandransh 101
struct User{
102
	1:i64 userId,
103
	2:string email,
104
	3:string password,
105
	4:string name,
566 rajveer 106
	5:string dateOfBirth,
1116 varun.gupt 107
	6:Sex sex,
3853 mandeep.dh 108
	7:optional string mobileNumber,
5326 rajveer 109
	8:i64 lastLogin,
110
	9:i64 lastLogout,
111
	10:i64 activeSince,
112
	11:list<Address> addresses,
113
	12:i64 defaultAddressId,
114
	13:string communicationEmail,
115
	14:i64 activeCartId,
116
	15:string jsessionId,
117
	16:bool isAnonymous,
118
	17:string source,
119
	18:i64 sourceStartTime,
7825 amar.kumar 120
	19:double trustLevel,
121
	20:bool isFacebookUser,
122
	21:string facebookAccessToken,
8201 rajveer 123
	22:string facebookId,
124
	23:i64 sourceId
48 ashish 125
}
126
 
1116 varun.gupt 127
struct UserCommunication{
128
	1:i64 id,
129
	2:i64 userId,
130
	3:UserCommunicationType communicationType,
131
	4:i64 orderId,
132
	5:string airwaybillNo,
133
	6:string replyTo,
134
	7:string productName,
135
	8:string subject,
136
	9:string message,
1299 varun.gupt 137
	10:i64 communication_timestamp
1116 varun.gupt 138
}
139
 
1848 vikas 140
struct MasterAffiliate{
141
    1:i64 id,
142
    2:string name,
1861 vikas 143
    3:i64 addedOn
1848 vikas 144
}
145
 
146
struct Affiliate{
147
    1:i64 id,
148
    2:string name,
149
    3:string url,
1861 vikas 150
    4:i64 masterAffiliateId,
151
    5:i64 addedOn
1848 vikas 152
}
153
 
154
struct Tracker{
155
    1:i64 id,
1861 vikas 156
    2:i64 affiliateId,
1848 vikas 157
}
158
 
159
struct TrackLog{
160
    1:i64 id,
1861 vikas 161
    2:i64 addedOn,
1995 vikas 162
    3:i64 affiliateId,
1861 vikas 163
    4:i64 userId,
3379 vikas 164
    5:TrackLogType eventType,
1861 vikas 165
    6:string url,
166
    7:string data
1848 vikas 167
}
168
 
552 chandransh 169
//Various statuses for line items
170
enum LineStatus{
171
	LINE_ACTIVE,			//line is active
172
	LINE_DELETED,			//line is deleted
173
	LINE_EXPIRED,			//line is expired, on laspse of fixed amount of time
174
	LINE_COMMITED,			//line is committed, sent for processing.
175
	LINE_COMMIT_FAILED,		//line was committed, but commit failed due to some reason, possibly during cart validation.
176
	LINE_AUTO_DELETED,		//line was auto deleted internally due to some reason(item delisted, price changed etc).
177
}
178
 
179
//Various statuses for Cart
180
enum CartStatus{
181
	ACTIVE,					
182
	INACTIVE,
183
	EXPIRED,
184
	COMMITTED,
185
	COMMIT_FAILED
186
}
187
 
3554 varun.gupt 188
struct Discount{
189
	1:i64 cart_id,
190
    2:i64 item_id,
191
    3:double discount,
192
    4:double quantity
193
}
194
 
552 chandransh 195
struct Line{
646 chandransh 196
	1:i64 cartId,				//identifier
552 chandransh 197
	2:i64 itemId,			//item id added
198
	3:double quantity,		//quantity added 
199
	4:i64 createdOn,		//addition timestamp
200
	5:i64 updatedOn, 		//any updation in quantity or status
201
	6:LineStatus lineStatus,	//current status
1984 varun.gupt 202
	7:i32 estimate,			//delivery estimate in hours
203
	8:double actualPrice,
3554 varun.gupt 204
	9:double discountedPrice,
6903 anupam.sin 205
	10:list<Discount> discounts,
206
	11:i64 insurer,
207
	12:double insuranceAmount
552 chandransh 208
}
209
 
210
struct Cart{
211
	1:i64 id,				//identifier
212
	2:list<Line> lines,		//list of lines
213
	3:CartStatus status,	//current status
214
	4:i64 createdOn,		//creation timestamp
215
	5:i64 updatedOn,		//time of last update in cart (like addition/deletion/updation of cart items )
687 chandransh 216
	6:i64 checkedOutOn,		//commited timestamp
5326 rajveer 217
	7:i64 addressId,	    //address on which this will be shipped
218
	8:double totalPrice,
219
	9:double discountedPrice,
5553 rajveer 220
	10:string couponCode,
6736 amit.gupta 221
	11:i64 pickupStoreId,
222
	12:string message		//This is introduced to display custom message as and when required to the Website for user display.
552 chandransh 223
}
224
 
225
enum WidgetType{
770 rajveer 226
	MY_RESEARCH,
227
	BROWSE_HISTORY
228
}
229
 
2981 rajveer 230
struct UserWidgetItem{
231
	1:i64 userId,
232
	2:i64 widgetId,
233
	3:i64 itemId,
234
	4:i64 addedOn
552 chandransh 235
}
236
 
237
exception WidgetException{
238
	1:i64 id,
239
	2:string message
240
}
241
 
48 ashish 242
/**
1984 varun.gupt 243
Exceptions for Promotion Service
244
*/
245
exception PromotionException{
246
	1:i64 id,
247
	2:string message
248
}
249
 
250
/**
251
Types for Promotion Service
252
*/
253
 
254
struct Promotion{
255
	1:i64 id,
256
	2:string name,
257
	3:string ruleExecutionSrc,
258
	4:i64 startOn,
259
	5:i64 endOn,
260
	6:i64 createdOn
261
}
262
 
263
struct Coupon{
3554 varun.gupt 264
	1:string couponCode,
265
	2:Promotion promotion,
1984 varun.gupt 266
	3:string arguments
267
}
268
 
269
struct PromotionTracking{
270
	1:string couponCode,
271
	2:i64 transactionId,
272
	3:i64 userId,
273
	4:bool appliedOn
274
}
275
 
4189 varun.gupt 276
struct ItemCouponDiscount{
277
	1:i64 itemId,
278
	2:string couponCode,
279
	3:double discount
280
}
281
 
5469 rajveer 282
enum VoucherType{
5492 rajveer 283
	SPICEDECK_MOBILE=1
5469 rajveer 284
}
285
 
286
struct Voucher{
287
	1:i64 id,
288
	2:string voucherCode,
289
	3:VoucherType voucherType,
290
	4:i64 issuedOn,
291
	5:double amount,
292
	6:i64 expiredOn,
293
	7:string userEmail
294
}
295
 
296
 
1984 varun.gupt 297
/**
298
Promotion Service
299
*/
3374 rajveer 300
service PromotionService extends GenericService.GenericService{
1984 varun.gupt 301
	void createPromotion(1:string name, 2:string ruleExecutionSrc, 3:i64 startOn, 4:i64 endOn) throws (1:PromotionException pex),
7746 amit.gupta 302
	i64 removeAllCouponsByPromotionId(1:i64 promotionId) throws (1:PromotionException pex),
6301 amit.gupta 303
	Coupon getCoupon(1:string couponCode) throws (1:PromotionException pex),
304
	bool isGiftVoucher(1:string couponCode) throws (1:PromotionException pex),
6356 amit.gupta 305
	bool isCodApplicable(1:string couponCode) throws (1:PromotionException pex),
1984 varun.gupt 306
	list<Promotion> getAllPromotions() throws (1:PromotionException pex),
307
	Promotion getPromotionById(1:i64 promotionId) throws (1:PromotionException pex),
308
	void generateCouponsForPromotion(1:i64 promotionId, 2:string couponCode) throws (1:PromotionException pex),
309
	Cart applyCoupon(1:string couponCode, 2:i64 cartId) throws (1:PromotionException pex),
6736 amit.gupta 310
	map<i64,double>  getEmiDiscount(1:i64 cartId) throws (1:PromotionException pex),
6433 anupam.sin 311
	map<i64, string> applyRechargeCoupon(1:string couponCode, 2:i64 totalAmount, 3:i64 userId) throws (1:PromotionException pex),
1984 varun.gupt 312
    void trackCouponUsage(1:string couponCode, 2:i64 transactionId, 3:i64 userId) throws (1:PromotionException pex),
3385 varun.gupt 313
    i64 getCouponUsageCountByUser(1:string couponCode, 2:i64 userId) throws (1:PromotionException pex),
6497 amit.gupta 314
    list<Coupon> getActiveCodes(1:i64 promotionId) throws (1:PromotionException pex),
315
    void deleteCoupon(1:string couponCode) throws (1:PromotionException pex),
7092 amit.gupta 316
    list<Coupon> getAllCouponsByPromotionId(1:i64 promotionId) throws (1:PromotionException pex),
3385 varun.gupt 317
 
318
    /**
319
     Returns a list of active coupons
320
     */
321
    list<Coupon> getActiveCoupons() throws (1:PromotionException pex),
322
 
323
    /**
6561 amit.gupta 324
     Creates a coupon with prefix (optional, pass null)and returns couponcode if successfully created.
6250 amit.gupta 325
     */
6730 anupam.sin 326
    string createCoupon(1:i64 promotionId, 2:string couponCode, 3:string arguments 4:bool isCod, 5:string prefix) throws (1:PromotionException pex),
6250 amit.gupta 327
 
328
    /**
3385 varun.gupt 329
     Returns the count of successful payments done using a given coupon
330
     */
331
    i64 getSuccessfulPaymentCountForCoupon(1:string couponCode) throws (1:PromotionException pex),
332
 
333
    /**
334
     Returns the doc string of the rule module
335
     */
4189 varun.gupt 336
    string getRuleDocString(1:string ruleName),
337
 
4494 varun.gupt 338
    list<ItemCouponDiscount> getItemDiscountMap(1:list<i64> itemIds) throws (1:PromotionException pex),
339
 
5469 rajveer 340
    map<string, double> getDiscountsForEntity(1:i64 entityId),
341
 
342
    void addVoucher(1:Voucher voucher),
343
    Voucher assignVoucher(1:i64 userId, 2:string userEmail, 3:VoucherType voucherType, 4:i64 amount),
344
    bool markVoucherAsRedeemed(1:string voucherCode, 2:i64 redeemedOn)
1984 varun.gupt 345
}
346
 
347
/**
48 ashish 348
service
349
*/
3374 rajveer 350
service UserContextService extends GenericService.GenericService{
763 rajveer 351
 
552 chandransh 352
	User createAnonymousUser(1:string jsessionId) throws (1:UserContextException ucex),
353
	User getUserById(1:i64 userId) throws (1:UserContextException ucex),
5326 rajveer 354
	User getUserByCartId(1:i64 cartId) throws (1:UserContextException ucex),
1491 vikas 355
	User getUserByEmail(1:string email) throws (1:UserContextException ucex),
3026 mandeep.dh 356
    User getUserByMobileNumber(1:i64 mobileNumber) throws (1:UserContextException ucex),
552 chandransh 357
	User createUser(1:User user) throws (1:UserContextException ucex),
358
	User updateUser(1:User user) throws (1:UserContextException ucex),
359
	User authenticateUser(1:string email, 2:string password) throws (1:AuthenticationException auex),
360
	bool userExists(1:string email) throws (1:UserContextException ucx),
566 rajveer 361
	i64 addAddressForUser(1:i64 userId, 2:Address address, 3:bool setDefault)throws (1:UserContextException ucx),
48 ashish 362
	bool removeAddressForUser(1:i64 userid, 2:i64 addressId)throws (1:UserContextException ucx),
363
	bool setUserAsLoggedIn(1:i64 userId, 2:i64 timestamp)throws (1:UserContextException ucx),
364
	bool setUserAsLoggedOut(1:i64 userid, 2:i64 timestamp)throws (1:UserContextException ucx),
506 rajveer 365
	bool setDefaultAddress(1:i64 userid, 2:i64 addressId)throws (1:UserContextException ucx),
592 rajveer 366
	bool updatePassword(1:i64 userid, 2:string oldPassword, 3:string newPassword)throws (1:UserContextException ucx),
895 rajveer 367
	bool forgotPassword(1:string email, 2:string newPassword)throws (1:UserContextException ucx),
592 rajveer 368
	list<Address> getAllAddressesForUser(1:i64 userId)throws (1:UserContextException ucx),
1892 vikas 369
	Address getAddressById(1:i64 addressId)throws (1:UserContextException ucx),
592 rajveer 370
	i64 getDefaultAddressId(1:i64 userId)throws (1:UserContextException ucx),
783 rajveer 371
	string getDefaultPincode(1:i64 userId)throws (1:UserContextException ucx),
552 chandransh 372
 
1167 varun.gupt 373
	bool saveUserCommunication(1:i64 userId, 2:string replyTo, 3:i64 communicationType, 4:i64 orderId, 5:string airwaybillNo, 6:string productName, 7:string subject, 8:string message)throws (1:UserCommunicationException ucx)
1590 varun.gupt 374
	UserCommunication getUserCommunicationById(1:i64 id) throws (1:UserCommunicationException ucx)
375
	list<UserCommunication> getUserCommunicationByUser(1:i64 userId) throws (1:UserCommunicationException ucx)
376
	list<UserCommunication> getAllUserCommunications() throws (1:UserCommunicationException ucx)
5407 amar.kumar 377
	void removeUserCommunication(1:i64 id) throws (1:UserCommunicationException ucx)
1116 varun.gupt 378
 
1995 vikas 379
	MasterAffiliate createMasterAffiliate(1:string name, 2:i64 addedOn) throws (1:UserAffiliateException utx)
380
	list<MasterAffiliate> getAllMasterAffiliates() throws (1:UserAffiliateException utx)
381
	MasterAffiliate getMasterAffiliateById(1:i64 id) throws (1:UserAffiliateException utx)
382
    MasterAffiliate getMasterAffiliateByName(1:string name) throws (1:UserAffiliateException utx)
383
	Affiliate createAffiliate(1:string name, 2:string url, 3:i64 masterAffiliateId, 4:i64 addedOn) throws (1:UserAffiliateException utx)
384
	Affiliate getAffiliateById(1:i64 id) throws (1:UserAffiliateException utx)
385
	Affiliate getAffiliateByName(1:string name) throws (1:UserAffiliateException utx)
386
	Tracker getTrackerById(1:i64 id) throws (1:UserAffiliateException utx)
387
	list<Affiliate> getAffiliatesByMasterAffiliate(1:i64 id) throws (1:UserAffiliateException utx)
3379 vikas 388
	i64 addTrackLog(1:i64 affiliateId, 2:i64 userId, 3:TrackLogType event, 4:string url, 5:string data, 6:i64 addedOn) throws (1:UserAffiliateException utx)
1995 vikas 389
	TrackLog getTrackLogById(1:i64 id) throws (1:UserAffiliateException utx)
3293 vikas 390
	list<TrackLog> getTrackLogsByAffiliate(1:i64 affiliateId, 2:i64 startDate, 3:i64 endDate) throws (1:UserAffiliateException utx)
1995 vikas 391
	list<TrackLog> getTrackLogsByUser(1:i64 userId) throws (1:UserAffiliateException utx)
392
	list<TrackLog> getTrackLogs(1:i64 userId, 2:string event, 3:string url) throws (1:UserAffiliateException utx)
1848 vikas 393
 
552 chandransh 394
	Cart getCurrentCart(1:i64 userId) throws (1:ShoppingCartException scx),	
395
	Cart getCart(1:i64 cartId) throws (1:ShoppingCartException scx),
396
	list<Cart> getCartsByTime(1:i64 from_time, 2:i64 to_time, 3:CartStatus status) throws (1:ShoppingCartException scx),
3556 rajveer 397
	string addItemToCart(1:i64 cartId, 2:i64 itemId, 3:i64 quantity, 4:i64 sourceId) throws (1:ShoppingCartException scx),
552 chandransh 398
	void deleteItemFromCart(1:i64 cartId, 2:i64 itemId) throws (1:ShoppingCartException scx),
577 chandransh 399
	void addAddressToCart(1:i64 cartId, 2:i64 addressId) throws (1:ShoppingCartException scx),
5553 rajveer 400
	void addStoreToCart(1:i64 cartId, 2:i64 storeId) throws (1:ShoppingCartException scx),
6922 anupam.sin 401
	void applyCouponToCart(1:Cart cart, 2:string couponCode) throws (1:ShoppingCartException scx),
1984 varun.gupt 402
	void removeCoupon(1:i64 cartId) throws (1:ShoppingCartException scx),
687 chandransh 403
 
404
	/**
3554 varun.gupt 405
	Deletes all the discounts associated with the cart
406
	*/
407
	void deleteDiscountsFromCart(1:i64 cartId) throws (1:ShoppingCartException scx),
408
 
409
	/**
410
	Accepts a list of thrift objects of Discount type and saves them
411
	*/
412
	void saveDiscounts(1:list<Discount> discounts) throws (1:ShoppingCartException scx),
413
 
414
	/**
687 chandransh 415
	 Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
416
	*/
6389 rajveer 417
	i64 createOrders(1:i64 cartId, 2:string sessionSource, 3:i64 sessionStartTime, 4:string firstSource, 5:i64 firstSourceTime, 6:i64 userId, 7:i64 schemeId) throws (1:ShoppingCartException scx),
687 chandransh 418
 
419
	/**
420
	 Validates that:
421
	 1. The checkout timestamp is greater than the updatedOn timestamp.
1466 ankur.sing 422
	 2. All of the lines in the cart are active items.
687 chandransh 423
	 3. The estimate for any of the lines in cart doesn't change.
1466 ankur.sing 424
	 If all three are true, returns empty string; else returns appropriate message.
687 chandransh 425
	*/
6736 amit.gupta 426
	list<string> validateCart(1:i64 cartId, 2:i64 sourceId) throws (1:ShoppingCartException scex),
552 chandransh 427
 
687 chandransh 428
	/**
429
	 Merges the lines from the first cart into the second cart. Lines with duplicate items are removed.
430
	*/
431
	void mergeCart(1:i64 fromCartId, 2:i64 toCartId),
432
 
433
	/**
434
	 Sets the checkedOutOn timestamp of the cart. Raises an exception if the specified cart can't be found.
435
	*/
436
	bool checkOut(1:i64 cartId) throws (1:ShoppingCartException scex),
437
 
438
	/**
439
	 The second parameter is a map of item ids and their quantities which have been successfully processed.
440
	 This methods removes the specified quantiry of the specified item from the cart.
770 rajveer 441
	 */
442
	bool resetCart(1:i64 cartId, 2:map<i64, double> items) throws (1:ShoppingCartException scex),
443
 
687 chandransh 444
 
1599 ankur.sing 445
	/**
446
	Returns number of registered users.
447
	If userType = null, then it returns count of all users, including anonymous
448
	If userType = UserType.ANONYMOUS, then it returns count of anonymous users only
449
	If userType = UserType.USER, then it returns count of non-anonymous users only
450
	*/
1672 ankur.sing 451
	i64 getUserCount(1:UserType userType),
1599 ankur.sing 452
 
1672 ankur.sing 453
	/**
1891 ankur.sing 454
	Returns list of users of type userType who registered between startDate and endDate (both inclusive).
455
	If any of startDate or endDate is -1, then that filter is ignored. 
456
	If userType is null, then returns all the users, irrespective of anonymous flag
457
 
1672 ankur.sing 458
	*/
2642 varun.gupt 459
	list<User> getAllUsers(1:UserType userType, 2:i64 startDate, 3:i64 endDate),
2717 varun.gupt 460
 
1599 ankur.sing 461
 
2981 rajveer 462
 
463
	/**
464
	Returns list of item ids in myresearch for the user
465
	*/
466
	list<i64> getMyResearchItems(1:i64 userId) throws (1:WidgetException scx),
467
	/**
468
	add item to my research for a user
469
	*/
470
	bool updateMyResearch(1:i64 userId, 2:i64 itemId) throws (1:WidgetException scx),
471
	/**
472
	delete item from my research for a user
473
	*/
474
	void deleteItemFromMyResearch(1:i64 userId, 2:i64 itemId) throws (1:WidgetException scx),
475
	/**
476
	Returns list of item ids in browse history for the user. It will return maximum 10 items.
477
	*/
478
	list<i64> getBrowseHistoryItems(1:i64 userId) throws (1:WidgetException scx),
479
	/**
480
	add item to browse history for a user
481
	*/
3385 varun.gupt 482
	void updateBrowseHistory(1:i64 userId, 2:i64 itemId),
483
 
484
	/**
485
	Returns count of Carts with given coupon applied
486
	*/
3499 mandeep.dh 487
	i64 getCartsWithCouponCount(1:string couponCode),
488
 
489
	/**
490
	 * Updates COD trust level of a user
491
	 */
4668 varun.gupt 492
	oneway void increaseTrustLevel(1:i64 userId, 2:double trustLevelDelta),
5407 amar.kumar 493
 
494
	/**
495
	 * Get trust level of a user
496
	 */	
497
	double getTrustLevel(1:i64 userId),
4668 varun.gupt 498
 
499
	/**
500
	 * Returns true/false depending on wether COD is allowed for a cart or not
501
	 */
6903 anupam.sin 502
	bool showCODOption(1:i64 cartId, 2:i64 sourceId, 3:string pincode),
5623 anupam.sin 503
 
504
	/**
505
	 * Get email addresses for users activated within a given date range
506
	 */
6903 anupam.sin 507
	list<string> getUserEmails(1:i64 startDate, 2:i64 endDate),
6821 amar.kumar 508
 
509
	/**
6903 anupam.sin 510
	 * Mark a cart lineitem as insured. Returns true/false. 
511
	 */
512
	 bool insureItem(1:i64 itemId, 2:i64 cartId, 3:bool toInsure),
513
 
514
	 /**
515
	 * Cancel insurance for all items in the cart
516
	 */
517
	 bool cancelInsurance(1:i64 cartId),
518
 
519
	 /**
520
	 * Stores insurance specific details like date of birth and guardianName
521
	 */
522
	 bool storeInsuranceSpecificDetails(1:i64 addressId, 2:string dob, 3:string guardianName),
523
 
524
	 /**
525
	 * Return true or false based on whether the user has stored any insurance info corresponding to the given addressId
526
	 */
527
	 bool isInsuranceDetailPresent(1:i64 addressId)
528
 
529
	/**
6821 amar.kumar 530
	 * Returns whether product is added to cart from startDate to endDate 
531
	 */
532
	bool isProductAddedToCart(1:i64 itemId, 2:i64 startDate, 3:i64 endDate)
2642 varun.gupt 533
}