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