Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
68 ashish 1
namespace java in.shop2020.model.v1.order
95 ashish 2
namespace py shop2020.thriftpy.model.v1.order
3374 rajveer 3
 
4
include "GenericService.thrift"
5
 
68 ashish 6
/***
7
	Order objects.
8
*/
11173 vikram.rag 9
 
10
enum AmazonFCWarehouseLocation {
11
	Mumbai = 0,
12
	Bangalore = 1
13
}
14
 
483 rajveer 15
enum OrderStatus{
845 chandransh 16
	PAYMENT_PENDING,
17
	PAYMENT_FAILED,
4661 rajveer 18
	COD_VERIFICATION_PENDING,
483 rajveer 19
	SUBMITTED_FOR_PROCESSING,
20
	ACCEPTED,
21
	INVENTORY_LOW,
495 rajveer 22
	REJECTED,
483 rajveer 23
	BILLED,
4245 rajveer 24
	PAYMENT_FLAGGED, 
483 rajveer 25
	SHIPPED_FROM_WH,
26
	SHIPPED_TO_LOGST,
4245 rajveer 27
	PAYMENT_FLAGGED_DENIED,      
483 rajveer 28
	DELIVERY_SUCCESS,
4245 rajveer 29
	CANCEL_REQUEST_RECEIVED,
30
	CANCEL_REQUEST_CONFIRMED,
31
	CANCELLED_ON_CUSTOMER_REQUEST,
4910 phani.kuma 32
	SHIPPED_TO_DESTINATION_CITY,
33
	REACHED_DESTINATION_CITY,
4682 rajveer 34
	COD_VERIFICATION_FAILED,
2537 chandransh 35
	FAILED,
4484 rajveer 36
	RTO_IN_TRANSIT,
37
	RTO_RECEIVED_PRESTINE,
4452 rajveer 38
	DOA_PICKUP_REQUEST_RAISED,
39
	DOA_PICKUP_CONFIRMED,
2537 chandransh 40
	DOA_RETURN_IN_TRANSIT,
4452 rajveer 41
	DOA_RECEIVED_PRESTINE,
2537 chandransh 42
	DOA_CERT_INVALID,
2614 chandransh 43
	DOA_CERT_VALID,
4484 rajveer 44
	RTO_RESHIPPED,
2614 chandransh 45
	DOA_INVALID_RESHIPPED,
4452 rajveer 46
	DOA_VALID_RESHIPPED,
4484 rajveer 47
	RTO_REFUNDED,
2614 chandransh 48
	DOA_VALID_REFUNDED,
49
	DOA_INVALID_REFUNDED,
4682 rajveer 50
	CANCELLED_DUE_TO_LOW_INVENTORY,
4303 rajveer 51
	LOW_INV_PO_RAISED,
52
	LOW_INV_REVERSAL_IN_PROCESS,
4369 rajveer 53
	LOW_INV_NOT_AVAILABLE_AT_HOTSPOT,
54
	LOW_INV_PO_RAISED_TIMEOUT,
4410 rajveer 55
	LOW_INV_REVERSAL_TIMEOUT,
4910 phani.kuma 56
	FIRST_DELIVERY_ATTEMPT_MADE,
4452 rajveer 57
	CAPTURE_IN_PROCESS,
58
	DOA_REQUEST_RECEIVED,
59
	DOA_REQUEST_AUTHORIZED,
60
	DOA_PICKUP_DENIED,
61
	DOA_RECEIVED_DAMAGED,
62
	DOA_LOST_IN_TRANSIT,
4459 rajveer 63
	DOA_RESHIPPED_RCVD_DAMAGED,
64
	DOA_REFUNDED_RCVD_DAMAGED,
65
	DOA_RESHIPPED_LOST_IN_TRANSIT,
4486 rajveer 66
	DOA_REFUNDED_LOST_IN_TRANSIT,
67
	RTO_RECEIVED_DAMAGED,
68
	RTO_LOST_IN_TRANSIT,
69
	RTO_DAMAGED_RESHIPPED,
70
	RTO_DAMAGED_REFUNDED,
71
	RTO_LOST_IN_TRANSIT_RESHIPPED,
72
	RTO_LOST_IN_TRANSIT_REFUNDED,
4488 rajveer 73
	RTO_INVENTORY_REVERSED,
74
	RET_REQUEST_RECEIVED,
75
	RET_REQUEST_AUTHORIZED,
76
	RET_PICKUP_REQUEST_RAISED,
77
	RET_PICKUP_DENIED,
78
	RET_PICKUP_CONFIRMED,
79
	RET_RETURN_IN_TRANSIT,
80
	RET_RECEIVED_PRESTINE,
81
	RET_RECEIVED_DAMAGED,
82
	RET_LOST_IN_TRANSIT,
83
	RET_PRODUCT_USABLE,
84
	RET_PRODUCT_UNUSABLE,
85
	RET_PRODUCT_USABLE_RESHIPPED,
86
	RET_PRODUCT_USABLE_REFUNDED,
87
	RET_PRODUCT_UNUSABLE_RESHIPPED,
88
	RET_PRODUCT_UNUSABLE_REFUNDED,
89
	RET_RESHIPPED_RCVD_DAMAGED,
90
	RET_REFUNDED_RCVD_DAMAGED,
91
	RET_RESHIPPED_LOST_IN_TRANSIT,
4661 rajveer 92
	RET_REFUNDED_LOST_IN_TRANSIT,
93
	LOST_IN_TRANSIT,
94
	LOST_IN_TRANSIT_RESHIPPED,
5553 rajveer 95
	LOST_IN_TRANSIT_REFUNDED,
96
	DELIVERED_AT_STORE,
97
	RECEIVED_AT_STORE
483 rajveer 98
}
99
 
100
enum TransactionStatus{
101
	INIT,
102
	IN_PROCESS,
103
	COMPLETED,
2964 chandransh 104
	FAILED,
3060 chandransh 105
	AUTHORIZED,
4245 rajveer 106
	COD_IN_PROCESS,
107
	FLAGGED
483 rajveer 108
}
109
 
5527 anupam.sin 110
enum OrderType{
6055 rajveer 111
	B2C,
112
	B2Cbulk,
113
	B2B,
7096 anupam.sin 114
	RECHARGE,
115
	RCH4HOTSPOT,
116
	WALLETCREDIT
5527 anupam.sin 117
}
118
 
4008 mandeep.dh 119
enum ExtraTransactionProcessingType {
120
    COD_VERIFICATION,
4245 rajveer 121
    DELAYED_DELIVERY,
6104 rajveer 122
    PAYMENT_FLAGGED,
123
    RECHARGE_UNKNOWN
4008 mandeep.dh 124
}
125
 
6289 anupam.sin 126
enum DenominationType {
127
	TOPUP = 1,
128
    SPECIAL = 2,
129
    DATA = 3
130
}
131
 
9159 amar.kumar 132
enum TaxType {
133
	VAT = 0,
134
	CST = 1,
135
	CFORM = 2
136
}
137
 
483 rajveer 138
struct LineItem{
139
	1:i64 id,
698 chandransh 140
	2:i64 item_id,
4008 mandeep.dh 141
	3:string productGroup,
956 chandransh 142
	4:string brand,
143
	5:string model_number,
4586 mandeep.dh 144
	6:string color,
956 chandransh 145
	7:string model_name,
146
	8:string extra_info,
147
	9:double quantity,
148
	10:double unit_price,
149
	11:double unit_weight,
150
	12:double total_price,
1000 varun.gupt 151
	13:double transfer_price,
2780 chandransh 152
	14:double total_weight,
4658 mandeep.dh 153
	15:optional string serial_number,
4172 rajveer 154
	16:optional string item_number,
4295 varun.gupt 155
	17:optional string dealText,
6039 amit.gupta 156
	18:i64 warrantry_expiry_timestamp,
7672 rajveer 157
	19:double vatRate,
158
	20:double nlc
483 rajveer 159
}
160
 
3553 chandransh 161
enum DelayReason {
162
	INVENTORY_LOW_PHASED_OUT,
163
	INVENTORY_LOW_COLOR_NOT_AVAILABLE,
164
	INVENTORY_LOW_REVERSAL_NOT_ON_TIME,
165
	INVENTORY_LOW_PRODUCT_NOT_SEALED,
166
	COURIER_DELAY_NOT_DELIVERED_TO_COURIER_ON_TIME,
167
	COURIER_DELAY_DID_NOT_CONNECT,
168
	COURIER_DELAY_CUSTOMER_NOT_AVAILABLE,
9416 amar.kumar 169
	COURIER_DELAY_INCORRECT_ADDRESS,
3553 chandransh 170
	COURIER_DELAY_OCTROI_DELAY,
171
	COURIER_DELAY_FORCES_OF_NATURE,
172
	COD_VERIFICATION_DELAY,
173
	PAYMENT_FLAGGED,
174
	OTHERS
175
}
483 rajveer 176
 
8717 amar.kumar 177
enum ProductCondition{
178
	GOOD,
179
	BAD
180
}
181
 
483 rajveer 182
struct Order{
183
	1:i64 id,
184
	2:i64 warehouse_id,
185
	/**
186
		item info
187
	**/
188
	3:list<LineItem> lineitems,
189
	/**
190
	  logistics info
191
	**/
192
	4:i64 logistics_provider_id,
193
	5:string airwaybill_no,
194
	6:string tracking_id,
195
	7:i64 expected_delivery_time,
196
	/**
197
	  customer info
198
	**/
199
	8:i64 customer_id,
200
	9:string customer_name,
201
	10:string customer_mobilenumber,
202
	11:string customer_pincode,
735 chandransh 203
	12:string customer_address1,
204
	13:string customer_address2,
205
	14:string customer_email,
206
	15:string customer_city,
207
	16:string customer_state,
483 rajveer 208
 
209
	/**
210
		status and misc info
211
	**/
735 chandransh 212
	17:OrderStatus status,
213
	18:string statusDescription,
214
	19:double total_amount,
215
	20:double total_weight,
483 rajveer 216
	/**
217
		billing info
218
	**/
735 chandransh 219
	21:string invoice_number,
220
	22:string billed_by,
483 rajveer 221
	/**
222
		timestamps
223
	**/
735 chandransh 224
	23:i64 created_timestamp,
225
	24:i64 accepted_timestamp,
226
	25:i64 billing_timestamp,
227
	26:i64 shipping_timestamp,
1115 chandransh 228
	27:i64 pickup_timestamp,
229
	28:i64 delivery_timestamp,
1210 chandransh 230
	29:i64 outofstock_timestamp,
231
	30:i64 jacket_number,
1223 chandransh 232
	31:string receiver,
233
	32:i64 batchNo,
2537 chandransh 234
	33:i64 serialNo,
235
	34:bool doaFlag,
2675 vikas 236
	35:string pickupRequestNo,
2819 chandransh 237
	36:i64 transactionId,
3060 chandransh 238
	37:string purchaseOrderNo,
3553 chandransh 239
	38:bool cod,
4004 chandransh 240
	39:DelayReason delayReason,
241
	40:i64 promised_delivery_time,
242
	41:i64 expected_shipping_time,
4102 chandransh 243
	42:i64 verification_timestamp,
4192 anupam.sin 244
	43:i64 promised_shipping_time,
245
	44:optional i64 reship_timestamp,
246
	45:optional i64 refund_timestamp,
4245 rajveer 247
	46:optional i64 new_order_id,
4269 anupam.sin 248
	47:OrderStatus previousStatus,
4506 phani.kuma 249
	48:i64 vendorId,
4647 rajveer 250
	49:optional i64 doa_auth_timestamp,
4709 rajveer 251
	50:string delayReasonText,
4758 mandeep.dh 252
	51:string refundReason,
4815 phani.kuma 253
	52:i64 purchaseOrderId,
5062 varun.gupt 254
	53:optional i64 doa_logistics_provider_id,
5110 mandeep.dh 255
	54:i64 originalOrderId,
5189 varun.gupt 256
	55:i64 fulfilmentWarehouseId,
5354 anupam.sin 257
	56:bool vendorPaid,
258
	57:optional i64 received_return_timestamp,
5527 anupam.sin 259
	58:optional i64 first_attempt_timestamp,
5553 rajveer 260
	59:OrderType orderType,
261
	60:i64 pickupStoreId,
6318 rajveer 262
	61:bool logisticsCod,
6525 rajveer 263
	62:i64 gvAmount,
6726 rajveer 264
	63:bool otg,
265
	64:i64 courier_delivery_time
6903 anupam.sin 266
	65:i64 insurer,
267
	66:double insuranceAmount,
268
	67:string dob,
7190 amar.kumar 269
	68:string guardianName,
7293 anupam.sin 270
	69:i64 freebieItemId,
271
	70:i64 source,
272
	71:double advanceAmount,
8717 amar.kumar 273
	72:i64 storeId,
9299 kshitij.so 274
	73:ProductCondition productCondition,
275
	74:i64 dataProtectionInsurer,
9416 amar.kumar 276
	75:double dataProtectionAmount,
277
	76:TaxType taxType
483 rajveer 278
}
279
 
5527 anupam.sin 280
struct Attribute{
281
	1:string name,
282
	2:string value
283
}
284
 
4245 rajveer 285
struct OrderStatusAuditTrail{
286
	1:i64 id,
287
	2:i64 orderId,
288
	3:i64 status,
289
	4:i64 timestamp,
290
	5:i64 description
291
}
292
 
7442 vikram.rag 293
struct AmazonOrdersToAcknowledge{
294
	1:string amazonOrderId,
295
	2:string amazonOrderItemId,
296
	3:string status,
297
	4:i64 transaction_id,
298
	5:i32 count
299
}
300
 
483 rajveer 301
struct Transaction{
302
	1:i64 id,
303
	2:list<Order> orders,
680 rajveer 304
	3:i64 createdOn,
305
	4:TransactionStatus transactionStatus,
306
	5:string statusDescription,
307
	6:i64 shoppingCartid,
2219 varun.gupt 308
	7:i64 customer_id,
2814 vikas 309
	8:string coupon_code,
310
	9:string sessionSource,
3858 vikas 311
	10:i64 sessionStartTime,
312
	11:string firstSource,
6389 rajveer 313
    12:i64 firstSourceTime,
314
    13:i64 emiSchemeId
483 rajveer 315
}
316
 
4393 rajveer 317
enum AlertType{
318
	NEW_INVENTORY_ALERT,
319
	ORDER_READY_TO_ACCEPT
320
}
321
 
483 rajveer 322
struct Alert{
323
	1:i64 id,
4393 rajveer 324
	2:AlertType type,
325
	3:i64 status,
326
	4:i64 timestamp,
327
	5:string description
4444 rajveer 328
	6:i64 warehouseId
483 rajveer 329
}
330
 
2688 chandransh 331
struct ReturnOrder{
332
	1:i64 orderId,
2697 chandransh 333
	2:i64 warehouseId,
334
    3:i64 jacketNumber,
335
    4:string invoiceNumber,
336
    5:i64 itemId,
337
    6:string productGroup,
338
    7:string brand,
339
    8:string modelNumber,
340
    9:string modelName,
341
    10:string color,
342
    11:double totalPrice,
343
    12:double transferPrice,
344
    13:bool processedStatus,
345
    14:i64 createdAt,
346
    15:i64 processedAt
2688 chandransh 347
}
348
 
4600 varun.gupt 349
struct PaymentSettlement	{
350
    2:i64 paymentGatewayId,
4905 varun.gupt 351
    3:i64 referenceId,
4600 varun.gupt 352
    4:i64 settlementDate,
353
    5:double serviceTax,
354
    6:double otherCharges,
355
    7:double netCollection
356
}
357
 
4875 varun.gupt 358
struct CODPaymentSettlement	{
359
    1:i64 orderId,
360
    2:i64 settlementDate,
361
    3:double collection
362
}
363
 
4303 rajveer 364
enum HotspotAction{
365
	PO_RAISED,
366
	REVERSAL_INITIATED,
367
	NOT_AVAILABLE
368
}
369
 
4369 rajveer 370
struct TimeoutSummary{
371
	1:i32 poRaised,
372
	2:i32 poEstimate
373
	3:i32 reversalInitiated,
374
	4:i32 reversalEstimate
375
}
376
 
5447 anupam.sin 377
struct CODVerificationAgent{
378
	1:i64 orderId,
379
	2:string agentEmailId
380
}
381
 
6000 mandeep.dh 382
enum RechargeType {
383
    MOBILE = 1,
384
    DTH = 2
385
}
386
 
387
enum RechargeOrderStatus {
388
    PAYMENT_PENDING = 1,
6031 rajveer 389
    PAYMENT_FAILED = 2,
390
    PAYMENT_SUCCESSFUL = 3,
6000 mandeep.dh 391
    RECHARGE_FAILED = 4,
6235 rajveer 392
    RECHARGE_SUCCESSFUL = 5,
6507 anupam.sin 393
    RECHARGE_FAILED_REFUNDED = 6,
394
    REFUNDED = 7,
7073 anupam.sin 395
    PARTIALLY_REFUNDED = 8,
396
    INIT = 9,
397
    RECHARGE_UNKNOWN = 10
6000 mandeep.dh 398
}
399
 
7293 anupam.sin 400
enum OrderSource {
401
	WEBSITE = 1,
7355 vikram.rag 402
	STORE = 2,
7410 amar.kumar 403
	AMAZON =3,
404
	HOMESHOP18  = 4,
405
	NAAPTOL = 5,
8488 amar.kumar 406
	EBAY = 6,
8983 vikram.rag 407
	SNAPDEAL = 7,
8982 vikram.rag 408
	FLIPKART = 8 	
7293 anupam.sin 409
}
410
 
6000 mandeep.dh 411
struct RechargeOrder {
6031 rajveer 412
    1:i64 id,
413
    2:string displayId,
414
    3:i64 totalAmount,
415
    4:i64 walletAmount,
416
    5:i64 transactionId,
6077 anupam.sin 417
    6:i64 invoiceNumber,
6031 rajveer 418
    7:OrderType orderType,
419
    8:i64 operatorId,
420
    9:RechargeType rechargeType,
421
   10:RechargeOrderStatus status,
422
   11:string deviceNumber,
423
   12:i64 userId,
424
   13:string userEmailId,
6048 rajveer 425
   14:i64 creationTimestamp,
426
   15:string spiceTID,
6094 rajveer 427
   16:i64 responseTimestamp,
6159 rajveer 428
   17:string description,
6433 anupam.sin 429
   18:string plan,
430
   19:string couponCode,
6515 anupam.sin 431
   20:i64 couponAmount,
6591 anupam.sin 432
   21:i64 refundTimestamp,
433
   22:string ipAddress
6000 mandeep.dh 434
}
435
 
6188 rajveer 436
struct RechargeStatistics{
6190 rajveer 437
	1:map<i64, i64> statusCounts,
438
	2:map<i64, i64> operatorCounts,
6188 rajveer 439
    3:map<string, list<RechargeOrder>> currentOrders,
440
    4:map<string, i64> amounts
441
}
442
 
6159 rajveer 443
struct RechargePlan {
444
	1:i64 operatorId,
445
    2:string name,
446
    3:string displayName,
447
    4:string description
448
}
449
 
6289 anupam.sin 450
struct RechargeDenomination {
451
	1:i64 operatorId,
452
	2:i64 circleId,
453
	3:DenominationType denominationType,
454
	4:i64 amount,
455
	5:string validity,
456
	6:string description
457
}
458
 
459
struct DeviceNumberInfo {
460
	1:i64 operatorId,
6336 anupam.sin 461
	2:string circleCode
6310 anupam.sin 462
	3:string operatorName
6289 anupam.sin 463
}
464
 
6031 rajveer 465
struct UserWallet {
6000 mandeep.dh 466
    1:i64 id,
467
    2:i64 amount,
6031 rajveer 468
    3:i64 userId   
6000 mandeep.dh 469
}
470
 
6031 rajveer 471
struct UserWalletHistory {
472
	1:i64 id,
473
    2:i64 walletId,
474
    3:i64 orderId,
475
    4:i64 amount,
476
    5:i64 timestamp    
6000 mandeep.dh 477
}
478
 
6389 rajveer 479
enum EmiChargeType {
480
    FIXED = 1,
481
    PERCENTAGE = 2
482
}
483
 
484
struct EmiScheme{
485
    1:i64 id,
486
    2:i64 gatewayId,
487
	3:i64 bankId,
488
    4:i64 tenure,
489
    5:string bankName,
6392 amit.gupta 490
    6:i64 minAmount,
6389 rajveer 491
    7:string tenureDescription,
492
    8:EmiChargeType	chargeType,
8942 rajveer 493
    9:double chargeValue,
494
    10:double interestRate    
6389 rajveer 495
}
496
 
483 rajveer 497
exception TransactionServiceException{
498
	1:i32 errorCode,
499
	2:string message
500
}
501
 
7073 anupam.sin 502
struct Company{
503
    1:i64 id,
504
    2:string name,
505
    3:string Address
506
}
507
 
508
struct WalletForCompany{
509
    1:i64 id,
510
    2:i64 companyId,
511
    3:double amount
512
}
513
 
514
struct WalletHistoryForCompany{
515
    1:i64 id,
516
    2:i64 walletId,
517
    3:double amount,
518
    4:i64 transactionTime,
519
    5:double openingBal,
520
    6:double closingBal,
521
    7:i64 referenceNumber,
522
    8:string description
523
}
524
 
525
enum PayMethod{
526
	CASH = 1,
8008 anupam.sin 527
	CARD = 2,
528
	CHEQUE = 3
7073 anupam.sin 529
}
530
 
7080 anupam.sin 531
struct FRC {
532
    1:i64 id,
533
    2:i64 operatorId,
534
    3:i64 circleId,
535
    4:i64 denomination,
536
    5:i64 maxDiscount
537
}
538
 
7096 anupam.sin 539
struct HotspotStore {
540
	1:i64 id,
541
    2:string hotspotId,	
542
    3:i64 companyId,
543
    4:string name,
544
    5:string city,
545
    6:i64 collectedAmount,
546
    7:i64 availableLimit,
547
    8:i64 creditLimit,
548
    9:string salt,
549
    10:string password,
550
    11:bool isActive,
7169 anupam.sin 551
    12:i64 circleId,
7308 rajveer 552
    13:string email,
553
    14:string line1,
554
    15:string line2,
555
    16:string state,
556
    17:string pin,
557
    18:string phone,
558
    19:string approvalEmail
7096 anupam.sin 559
}
560
 
7967 anupam.sin 561
struct HotspotServiceMatrix {
562
	1:i64 storeId,
563
	2:string hotspotId,
564
	3:bool pickupFromStoreService,
565
	4:bool storeWebsiteService,
566
	5:bool rechargeService
567
}
568
 
7073 anupam.sin 569
struct RechargeTransaction{
570
    1:i64 id,
571
    2:i64 storeId,
572
    3:double amount,
573
    4:i64 transactionTime,
574
    5:string deviceNum,
575
    6:RechargeType deviceType,
576
    7:bool isFrc,
577
    8:string email,
578
    9:double discount,
579
    10:double paymentAmount,
580
    11:PayMethod payMethod,
581
    12:RechargeOrderStatus status,
582
    13:string invoiceNumber,
583
    14:i64 circleId,
584
    15:i64 operatorId,
585
    16:string plan,
586
    17:string ipAddress,
587
    18:string name,
588
    19:string cafNum,
7080 anupam.sin 589
    20:string simNum,
7096 anupam.sin 590
    21:string alternateNumber,
7169 anupam.sin 591
    22:string description,
7369 rajveer 592
    23:i64 responseTime,
593
	24:string spiceTID,
594
    25:string aggTID,
595
    26:string providerTID
7073 anupam.sin 596
}
597
 
7096 anupam.sin 598
struct TelecomCircle {
599
	1:i64 id,
600
    2:string name,
601
    3:string code
602
}
603
 
7263 anupam.sin 604
struct SourceDetail {
605
	1:i64 id,
606
    2:string name,
7410 amar.kumar 607
    3:string email,
7530 kshitij.so 608
    4:string tinNumber,
609
    5:i64 lastUpdatedOn
7263 anupam.sin 610
}
611
 
7311 kshitij.so 612
struct AmazonOrder {
613
    1:i64 orderId,
7322 vikram.rag 614
    2:string amazonOrderCode,
615
    3:string amazonOrderItemCode,
7311 kshitij.so 616
    4:i64 transactionId,
7715 vikram.rag 617
    5:i64 item_id,
618
    6:string status,
619
    7:i64 purchaseDateOnAmazon
7311 kshitij.so 620
}
621
 
7386 anupam.sin 622
enum StorePaymentStatus{
623
	ADV_RECEIVED = 1,
624
	ADV_REFUNDED = 2,
625
	FULL_PAY_RECEIVED = 3,
626
	REFUNDED = 4,
7423 anupam.sin 627
	REFUND_REQUESTED = 5,
628
	REFUND_INITIATED = 6
7386 anupam.sin 629
}
630
 
631
struct StoreOrderDetail {
632
	1:i64 orderId,
633
	2:i64 storeId,
634
	3:double advanceAmount,
635
	4:double cashAmount,
636
	5:double cardAmount,
7393 anupam.sin 637
	6:StorePaymentStatus payStatus,
638
	7:string edcBank,
639
	8:double cashRefundAmount,
7423 anupam.sin 640
	9:double cardRefundAmount,
7611 anupam.sin 641
	10:string approvalCode,
642
	11:string cardType
7386 anupam.sin 643
}
644
 
7423 anupam.sin 645
struct StoreOrderCollection {
646
    1:string hotspotId,
647
    2:i64 orderId,
648
    3:string collectionType,
649
    4:string productName,
650
    5:i64 advanceAmount,
651
    6:i64 cash,
652
    7:i64 card,
653
    8:i64 addedAt,
654
    9:i64 pushedAt,
655
    10:bool pushedToOcr
656
}
657
 
8182 amar.kumar 658
struct EbayOrder {
659
	1:i64 orderId,
660
	2:i64 salesRecordNumber,
661
	3:string paisaPayId,
662
	4:string ebayListingId,
663
	5:double subsidyAmount,
664
	6:i64 ebayTxnDate,
665
	7:string transactionId,
666
	8:string listingName,
8241 amar.kumar 667
	9:double listingPrice,
8247 amar.kumar 668
	10:string bluedartPaisaPayRef	
8182 amar.kumar 669
}
670
 
8532 vikram.rag 671
struct FbaItemPrices{
672
	 1:i64 item_id	
673
     2:double minFbaPrice,
674
     3:double minMfnPrice,
675
     4:double ourPrice,
676
     5:double salePrice,
677
     6:i64 minFbaPriceSnapshotDate
678
     7:i64 minMfnPriceSnapshotDate
679
     8:i64 ourPriceSnapshotDate
680
     9:i64 salePriceSnapshotDate
681
 
682
} 
683
 
8488 amar.kumar 684
struct SnapdealOrder {
685
	1:i64 orderId,
686
	2:string referenceCode,
9627 vikram.rag 687
	3:string subOrderId,
8488 amar.kumar 688
	4:double listingPrice,
689
	5:string productName,
690
	6:i64 snapdealTxnDate
9456 vikram.rag 691
	7:double maxNlc
8488 amar.kumar 692
}
693
 
8961 vikram.rag 694
struct FlipkartOrder {
695
	1:string flipkartOrderId,
696
	2:string flipkartSubOrderId,
697
	3:i64 flipkartTxnDate,
698
	4:i64 orderId,
699
	5:double shippingPrice,
700
	6:double octroiFee,  
701
	7:double emiFee
9456 vikram.rag 702
	8:double maxNlc 
8961 vikram.rag 703
}
704
 
4815 phani.kuma 705
struct OrderStatusGroups{
706
	1:list<OrderStatus> codCancellable = [OrderStatus.COD_VERIFICATION_PENDING,
707
										OrderStatus.SUBMITTED_FOR_PROCESSING,
708
										OrderStatus.ACCEPTED,
709
										OrderStatus.INVENTORY_LOW,
710
										OrderStatus.LOW_INV_PO_RAISED,
711
										OrderStatus.LOW_INV_REVERSAL_IN_PROCESS,
712
										OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT,
713
										OrderStatus.BILLED,
714
										OrderStatus.PAYMENT_FLAGGED],
4837 varun.gupt 715
 
4815 phani.kuma 716
	2:list<OrderStatus> prepaidCancellableBeforeBilled = [OrderStatus.COD_VERIFICATION_PENDING,
717
										OrderStatus.SUBMITTED_FOR_PROCESSING,
718
										OrderStatus.ACCEPTED,
719
										OrderStatus.INVENTORY_LOW,
720
										OrderStatus.LOW_INV_PO_RAISED,
721
										OrderStatus.LOW_INV_REVERSAL_IN_PROCESS,
722
										OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT],
4837 varun.gupt 723
 
724
	3:list<OrderStatus> prepaidCancellableAfterBilled = [OrderStatus.BILLED, OrderStatus.PAYMENT_FLAGGED],
725
 
726
	4:list<OrderStatus> openOrders = [
727
										OrderStatus.PAYMENT_PENDING,			OrderStatus.COD_VERIFICATION_PENDING,
728
										OrderStatus.SUBMITTED_FOR_PROCESSING,	OrderStatus.ACCEPTED,
729
										OrderStatus.INVENTORY_LOW,				OrderStatus.BILLED,
730
										OrderStatus.PAYMENT_FLAGGED,			OrderStatus.SHIPPED_FROM_WH,
731
										OrderStatus.SHIPPED_TO_LOGST,			OrderStatus.PAYMENT_FLAGGED_DENIED,
4910 phani.kuma 732
										OrderStatus.SHIPPED_TO_DESTINATION_CITY,	OrderStatus.REACHED_DESTINATION_CITY,
4837 varun.gupt 733
										OrderStatus.CANCEL_REQUEST_RECEIVED,	OrderStatus.CANCEL_REQUEST_CONFIRMED,
734
										OrderStatus.RTO_IN_TRANSIT,				OrderStatus.RTO_RECEIVED_PRESTINE,
735
										OrderStatus.DOA_PICKUP_REQUEST_RAISED,	OrderStatus.DOA_PICKUP_CONFIRMED,
736
										OrderStatus.DOA_RETURN_IN_TRANSIT,		OrderStatus.DOA_RECEIVED_PRESTINE,
737
										OrderStatus.DOA_CERT_INVALID,			OrderStatus.DOA_CERT_VALID,
738
										OrderStatus.LOW_INV_PO_RAISED,			OrderStatus.LOW_INV_REVERSAL_IN_PROCESS,
739
										OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT,	OrderStatus.LOW_INV_PO_RAISED_TIMEOUT,
4910 phani.kuma 740
										OrderStatus.LOW_INV_REVERSAL_TIMEOUT,	OrderStatus.FIRST_DELIVERY_ATTEMPT_MADE,
4837 varun.gupt 741
										OrderStatus.CAPTURE_IN_PROCESS,			OrderStatus.DOA_REQUEST_RECEIVED,
742
										OrderStatus.DOA_REQUEST_AUTHORIZED,		OrderStatus.DOA_RECEIVED_DAMAGED,
743
										OrderStatus.DOA_LOST_IN_TRANSIT,		OrderStatus.RTO_RECEIVED_DAMAGED,
744
										OrderStatus.RTO_LOST_IN_TRANSIT,		OrderStatus.RTO_INVENTORY_REVERSED,
745
										OrderStatus.RET_REQUEST_RECEIVED,		OrderStatus.RET_REQUEST_AUTHORIZED,
746
										OrderStatus.RET_PICKUP_REQUEST_RAISED,	OrderStatus.RET_PICKUP_DENIED,
747
										OrderStatus.RET_PICKUP_CONFIRMED,		OrderStatus.RET_RETURN_IN_TRANSIT,
748
										OrderStatus.RET_RECEIVED_PRESTINE,		OrderStatus.RET_RECEIVED_DAMAGED,
749
										OrderStatus.RET_LOST_IN_TRANSIT,		OrderStatus.RET_PRODUCT_USABLE,
5867 rajveer 750
										OrderStatus.DELIVERED_AT_STORE,			OrderStatus.RECEIVED_AT_STORE
4983 phani.kuma 751
									],
5031 varun.gupt 752
	5:list<OrderStatus> refundedOrders = [
753
										OrderStatus.CANCELLED_ON_CUSTOMER_REQUEST,	OrderStatus.RTO_REFUNDED,
754
										OrderStatus.DOA_VALID_REFUNDED,				OrderStatus.DOA_INVALID_REFUNDED,
755
										OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY,	OrderStatus.DOA_REFUNDED_RCVD_DAMAGED,
756
										OrderStatus.DOA_REFUNDED_LOST_IN_TRANSIT,	OrderStatus.RTO_DAMAGED_REFUNDED,
757
										OrderStatus.RTO_LOST_IN_TRANSIT_REFUNDED,	OrderStatus.RET_PRODUCT_USABLE_REFUNDED,
758
										OrderStatus.RET_PRODUCT_UNUSABLE_REFUNDED,	OrderStatus.RET_REFUNDED_LOST_IN_TRANSIT,
759
										OrderStatus.RET_REFUNDED_RCVD_DAMAGED,		OrderStatus.LOST_IN_TRANSIT_REFUNDED
760
									],
761
	6:list<OrderStatus> shippedOrders = [
4983 phani.kuma 762
										OrderStatus.SHIPPED_FROM_WH,			OrderStatus.SHIPPED_TO_LOGST,
763
										OrderStatus.SHIPPED_TO_DESTINATION_CITY,	OrderStatus.REACHED_DESTINATION_CITY,
764
										OrderStatus.RTO_IN_TRANSIT,				OrderStatus.RTO_RECEIVED_PRESTINE,
765
										OrderStatus.DOA_PICKUP_REQUEST_RAISED,	OrderStatus.DOA_PICKUP_CONFIRMED,
766
										OrderStatus.DOA_RETURN_IN_TRANSIT,		OrderStatus.DOA_RECEIVED_PRESTINE,
767
										OrderStatus.DOA_CERT_INVALID,			OrderStatus.DOA_CERT_VALID,
768
										OrderStatus.FIRST_DELIVERY_ATTEMPT_MADE,OrderStatus.DOA_REQUEST_RECEIVED,
769
										OrderStatus.DOA_REQUEST_AUTHORIZED,		OrderStatus.DOA_RECEIVED_DAMAGED,
770
										OrderStatus.DOA_LOST_IN_TRANSIT,		OrderStatus.RTO_RECEIVED_DAMAGED,
771
										OrderStatus.RTO_LOST_IN_TRANSIT,		OrderStatus.RTO_INVENTORY_REVERSED,
772
										OrderStatus.RET_REQUEST_RECEIVED,		OrderStatus.RET_REQUEST_AUTHORIZED,
773
										OrderStatus.RET_PICKUP_REQUEST_RAISED,	OrderStatus.RET_PICKUP_DENIED,
774
										OrderStatus.RET_PICKUP_CONFIRMED,		OrderStatus.RET_RETURN_IN_TRANSIT,
775
										OrderStatus.RET_RECEIVED_PRESTINE,		OrderStatus.RET_RECEIVED_DAMAGED,
776
										OrderStatus.RET_LOST_IN_TRANSIT,		OrderStatus.RET_PRODUCT_USABLE,
5867 rajveer 777
										OrderStatus.RET_PRODUCT_UNUSABLE,		OrderStatus.LOST_IN_TRANSIT,
778
										OrderStatus.DELIVERED_AT_STORE,			OrderStatus.RECEIVED_AT_STORE
4983 phani.kuma 779
									],
5031 varun.gupt 780
	7:list<OrderStatus> failedOrders = [
4983 phani.kuma 781
										OrderStatus.PAYMENT_FAILED,				OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY,
782
										OrderStatus.REJECTED,					OrderStatus.DOA_INVALID_REFUNDED,
783
										OrderStatus.DOA_INVALID_RESHIPPED,		OrderStatus.DOA_VALID_REFUNDED,
784
										OrderStatus.DOA_VALID_RESHIPPED,		OrderStatus.RTO_REFUNDED,
6566 amit.gupta 785
										OrderStatus.RTO_RESHIPPED, OrderStatus.COD_VERIFICATION_FAILED
4837 varun.gupt 786
									]
4815 phani.kuma 787
}
788
 
8282 kshitij.so 789
struct AmazonFbaSalesSnapshot {
790
	1:i64 dateOfSale
791
	2:i64 item_id
8363 vikram.rag 792
	3:i32 totalOrderCount
8282 kshitij.so 793
	4:i64 amazonFbaInventory
794
	5:bool isOutOfStock
795
    6:double salePrice
796
    7:double minFbaPrice
8363 vikram.rag 797
    8:double minMfnPrice
798
    9:double totalSale
799
    10:double promotionSale
8445 vikram.rag 800
    11:i32 promotionOrderCount
801
    12:double ourPrice
8532 vikram.rag 802
    13:i64 minFbaPriceSnapshotDate
803
    14:i64 minMfnPriceSnapshotDate
804
    15:i64 ourPriceSnapshotDate
805
    16:i64 salePriceSnapshotDate
11173 vikram.rag 806
    17:AmazonFCWarehouseLocation fcLocation
8282 kshitij.so 807
}
808
 
3374 rajveer 809
service TransactionService extends GenericService.GenericService{
483 rajveer 810
 
811
	i64 createTransaction(1:Transaction transaction) throws (1:TransactionServiceException ex),
812
 
813
	//	Get transaction methods.
814
	Transaction getTransaction(1:i64 id) throws (1:TransactionServiceException ex),
815
	list<Transaction> getTransactionsForCustomer(1:i64 customerId, 2:i64 from_date, 3:i64 to_date, 4:TransactionStatus status) throws (1:TransactionServiceException ex),
816
	list<Transaction> getTransactionsForShoppingCartId(1:i64 shoppingCartId) throws (1:TransactionServiceException ex),
817
	TransactionStatus getTransactionStatus(1:i64 transactionId) throws (1:TransactionServiceException ex),
7293 anupam.sin 818
	bool changeTransactionStatus(1:i64 transactionId, 2:TransactionStatus status, 3:string description, 4:i64 pickUp, 5:OrderType orderType, 6:OrderSource source) throws (1:TransactionServiceException ex),
1382 varun.gupt 819
 
1398 varun.gupt 820
	bool enqueueTransactionInfoEmail(1:i64 transactionId) throws (1:TransactionServiceException ex),
1382 varun.gupt 821
 
4801 anupam.sin 822
	list<Order> getAllOrders(1:list<OrderStatus> statuses, 2:i64 from_date, 3:i64 to_date, 4:i64 warehouse_id) throws (1:TransactionServiceException ex),
1111 varun.gupt 823
 
1115 chandransh 824
	/**
4133 chandransh 825
	Returns at most 'limit' orders with the given statuses for the given warehouse starting from the given offset.
826
	Pass the status as null and the limit as 0 to ignore them.
827
	*/
8303 amar.kumar 828
	list<Order> getOrdersInBatch(1:list<OrderStatus> statuses, 2:i64 offset, 3:i64 limit, 4:i64 warehouse_id, 5:i64 source) throws (1:TransactionServiceException ex),
4133 chandransh 829
 
830
	/**
831
	Returns the count of orders with the given statuses assigned to the given warehouse.
832
	*/
8303 amar.kumar 833
	i32 getOrderCount(1:list<OrderStatus> statuses, 2:i64 warehouseId, 3:i64 source) throws (1:TransactionServiceException ex),
4133 chandransh 834
 
835
	/**
1115 chandransh 836
	Returns orders within a range of their billing dates
837
	*/
1000 varun.gupt 838
	list<Order> getOrdersByBillingDate(1:OrderStatus status, 2:i64 start_billing_date, 3:i64 end_billing_date, 4:i64 warehouse_id) throws (1:TransactionServiceException ex),
1111 varun.gupt 839
 
1382 varun.gupt 840
	/**
3427 chandransh 841
	Returns orders for a particular provider and warehouse which were shipped between the given dates.
3451 chandransh 842
	Returned orders comprise of COD orders if cod parameter is true. It comprises of prepaid orders otherwise. 
843
	Pass providerId and warehouseId as -1 to ignore both these parameters.
3427 chandransh 844
	*/
3451 chandransh 845
	list<Order> getOrdersByShippingDate(1:i64 fromShippingDate, 2:i64 toShippingDate, 3:i64 providerId, 4:i64 warehouseId, 5:bool cod) throws (1:TransactionServiceException ex),
3427 chandransh 846
 
847
	/**
1382 varun.gupt 848
	Returns order ids for orders which can be returned
849
	*/
850
	list<i64> getReturnableOrdersForCustomer(1:i64 customer_id, 2:i64 limit) throws (1:TransactionServiceException ex),
851
 
852
	/**
853
	Returns order ids for orders which can be cancelled
854
	*/
855
	list<i64> getCancellableOrdersForCustomer(1:i64 customer_id, 2:i64 limit) throws (1:TransactionServiceException ex),
856
 
483 rajveer 857
	bool changeOrderStatus(1:i64 orderId, 2:OrderStatus status, 3:string description) throws (1:TransactionServiceException ex),
1147 chandransh 858
 
859
	/**
1529 ankur.sing 860
	Returns list of orders for given transaction Id. Also filters based on customer Id so that
861
	only user who owns the transaction can view its order details.
862
	*/
863
	list<Order> getOrdersForTransaction(1:i64 transactionId 2:i64 customerId)  throws (1:TransactionServiceException ex),
3014 chandransh 864
 
865
	/**
866
	Returns list of orders for the given customer created between the given dates and having the given statuses.
867
	Pass and empty list to ignore filtering on statuses.
868
	*/	
869
	list<Order> getOrdersForCustomer(1:i64 customerId, 2:i64 from_date, 3:i64 to_date, 4:list<OrderStatus> statuses) throws (1:TransactionServiceException ex),
1529 ankur.sing 870
 
483 rajveer 871
	i64 createOrder(1:Order order) throws (1:TransactionServiceException ex),
872
	Order getOrder(1:i64 id) throws (1:TransactionServiceException ex),
873
	list<LineItem> getLineItemsForOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
874
 
4999 phani.kuma 875
	list<Order> getOrderList(1:list<i64> order_ids),
1529 ankur.sing 876
 
5386 phani.kuma 877
	list<Order> getOrderListForVendor(1:list<i64> order_ids, 2:i64 vendorId),
878
 
757 chandransh 879
	/**
1529 ankur.sing 880
	Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
881
	Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
882
	*/
883
	Order getOrderForCustomer(1:i64 orderId, 2:i64 customerId) throws (1:TransactionServiceException ex),
884
 
3060 chandransh 885
	//Alerts apis 
4444 rajveer 886
	list<Alert> getAlerts(1:i64 type, 2:i64 warehouseId, 3:i64 status, 4:i64 timestamp),
887
	void addAlert(1:i64 type, 2:i64 warehouseId, 3:string description),
888
	void markAlertsAsSeen(1:i64 warehouseId),
3060 chandransh 889
 
1529 ankur.sing 890
	/**
3060 chandransh 891
	Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
892
	*/
893
	i64 getValidOrderCount(),
894
 
895
	/**
896
	Returns the number of distinct customers who have done successful transactions
897
	*/
898
	i64 getNoOfCustomersWithSuccessfulTransaction(),
899
 
900
	/**
901
	Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
902
	List contains two values, first minimum amount and second maximum amount.	
903
	*/
904
	list<double> getValidOrdersAmountRange(),
905
 
906
	/**
907
	Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
908
	If limit is passed as 0, then all valid Orders are returned. 
909
	*/
5874 rajveer 910
	list<Order> getValidOrders(1:i64 limit, 2:bool onlyStore),
3060 chandransh 911
 
912
	/**
913
	Create a batch of all the pending orders for the given warehouse.
914
	The returned list is orderd by created_timestamp.
915
	If there are no pending orders, an empty list is returned.
916
	*/
1223 chandransh 917
	list<Order> batchOrders(1:i64 warehouseId) throws (1:TransactionServiceException ex),
918
 
919
	/**
920
	Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found. 
1244 chandransh 921
	*/
1210 chandransh 922
	bool markOrderAsOutOfStock(1:i64 orderId) throws (1:TransactionServiceException ex),
923
 
924
	/**
3060 chandransh 925
	Marks the given order as SUBMITTED_FOR_PROCESSING and updates the verified
926
	timestamp. It is intended to be used for COD orders but can be harmlessly 
927
	used for all other orders as well.
928
	Throws an exception if no such order exists.
757 chandransh 929
	*/
3060 chandransh 930
	bool verifyOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
1115 chandransh 931
 
932
	/**
3060 chandransh 933
	Marks the given order as ACCEPTED and updates the accepted timestamp. If the
934
	given order is not a COD order, it also captures the payment if the same has
935
	not been captured.
936
	Throws an exception if no such order exists.
937
	*/
938
	bool acceptOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
939
 
940
	/**
941
	Add billing details such as the bill number and the biller to the Order.
4658 mandeep.dh 942
	Adds jacket number, item number and Serial no. to the order. Doesn't update
3060 chandransh 943
	the IMEI no. if a -1 is supplied.
944
	Also, it generates an invoice number for the order, marks the order as
945
	BILLED and sets the billing timestamp.
946
	Returns false if it doesn't find the order with the given ID.
947
	*/
7190 amar.kumar 948
	bool addBillingDetails(1:i64 orderId, 2:string invoice_number, 3:list<string> serialNumber, 4:list<string> itemNumber, 5:i64 freebieWarehouseId, 6:string billed_by, 7:i64 jacketNumber, 8:i64 billingType, 9:i64 fulfilmentWarehouseId, 10:bool authorize) throws (1:TransactionServiceException ex),
4579 rajveer 949
 
950
	/**
951
	Add the invoice number to the order.
952
	*/	
6747 amar.kumar 953
	void addInvoiceNumber(1:i64 orderId, 2:string invoiceNumber, 3:string color, 4:string serialNumber, 5:string itemNumber) throws (1:TransactionServiceException ex),
4910 phani.kuma 954
 
3060 chandransh 955
	/**
956
	Depending on the third parameter, marks either all prepaid or all cod orders BILLED by the
4410 rajveer 957
	given warehouse and were picked up by the given provider as SHIPPED_FROM_WH.
958
	*/
4788 rajveer 959
	bool markOrdersAsShippedFromWarehouse(1:i64 warehouseId, 2:i64 providerId, 3:bool cod, 4:list<i64> orderIds) throws (1:TransactionServiceException ex),
5676 rajveer 960
 
5713 rajveer 961
	bool markOrdersAsReturnedFromStore(1:i64 providerId, 2:list<i64> orderIds, 3:list<string> awbs) throws (1:TransactionServiceException ex),
4410 rajveer 962
 
963
	/**
1115 chandransh 964
	Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
4910 phani.kuma 965
	Raises an exception if we encounter report for an AWB number that we did not ship.	
966
	*/
967
	void markOrdersAsPickedUp(1:i64 providerId, 2:map<string, string> pickupDetails) throws (1:TransactionServiceException ex),
968
 
969
	/**
1115 chandransh 970
	Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
971
	*/
4910 phani.kuma 972
	list<Order> getOrdersNotPickedUp(1:i64 providerId),
1134 chandransh 973
 
974
	/**
975
	Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
976
	the name of the receiver.
977
	Raises an exception if we encounter report for an AWB number that we did not ship.
978
	*/
979
	void markOrdersAsDelivered(1:i64 providerId, 2:map<string, string> deliveredOrders) throws (1:TransactionServiceException ex),
980
 
981
	/**
4910 phani.kuma 982
	Mark all orders with AWBs in the given map as RTO. Also sets the delivery timestamp.
1134 chandransh 983
	Raises an exception if we encounter report for an AWB number that we did not ship.
984
	*/
4910 phani.kuma 985
	void markAsRTOrders(1:i64 providerId, 2:map<string, string> returnedOrders) throws (1:TransactionServiceException ex),
1134 chandransh 986
 
1244 chandransh 987
	/**
4910 phani.kuma 988
	Returns a list of orders that were returned by courier.
989
	*/
990
	list<Order> getRTOrders(1:i64 providerId),
991
 
992
	/**
1244 chandransh 993
	Update the status description of orders whose AWB numbers are keys of the Map.
4910 phani.kuma 994
	*/
995
	void updateNonDeliveryReason(1:i64 providerId, 2:map<string, string> undeliveredOrders) throws (1:TransactionServiceException ex),
996
 
997
	/**
4581 phani.kuma 998
	Returns a list of orders that were picked up or shipped four days ago but did not get delivered.
1244 chandransh 999
	*/
4910 phani.kuma 1000
	list<Order> getNonDeliveredOrdersbyCourier(1:i64 providerId),
1244 chandransh 1001
 
1407 ankur.sing 1002
	/**
4910 phani.kuma 1003
	Mark all orders with AWBs in the given map as local connected. Also sets the local connected timestamp.
1004
	*/
1005
	void markOrdersAsLocalConnected(1:i64 providerId, 2:map<string, string> local_connected_orders) throws (1:TransactionServiceException ex),
1006
 
1007
	/**
1008
	Returns a list of orders that were picked up or shipped but pending local connection.
1009
	*/
1010
	list<Order> getOrdersNotLocalConnected(1:i64 providerId),
1011
 
1012
	/**
1013
	Mark all orders with AWBs in the given map as reached destination city. Also sets the reached destination timestamp.
1014
	*/
1015
	void markOrdersAsDestinationCityReached(1:i64 providerId, 2:map<string, string> destination_city_reached_orders) throws (1:TransactionServiceException ex),
1016
 
1017
	/**
1018
	Mark all orders with AWBs in the given map as first delivery attempt made. Also sets the first delivery attempted timestamp.
1019
	*/
1020
	void markOrdersAsFirstDeliveryAttempted(1:i64 providerId, 2:map<string, string> first_atdl_orders) throws (1:TransactionServiceException ex),
1021
 
1022
	/**
1407 ankur.sing 1023
	Returns the list of orders whose delivery time has passed but have not been
1024
	delivered yet for the given provider and warehouse. To get a complete list of
1025
	undelivered orders, pass them as -1. 
1026
	Returns an empty list if no such orders exist.
1027
	*/
1028
	list<Order> getUndeliveredOrders(1:i64 providerId, 2:i64 warehouseId),
1029
 
1599 ankur.sing 1030
	/**
4783 phani.kuma 1031
	Returns the list of orders whose expected delivery date has passed but have not been
1032
	delivered yet.
1033
	Returns an empty list if no such orders exist.
1034
	*/
1035
	list<Order> getUndeliveredOrdersExpectedDeliveryDateNotMet(),
1036
 
1037
	/**
2537 chandransh 1038
	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.
1039
	Returns the final flag status.
1040
	Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS. 
1041
	*/
1042
	bool toggleDOAFlag(1:i64 orderId) throws (1:TransactionServiceException ex),
1043
 
4712 rajveer 1044
	void markOrderAsDelivered(1:i64 orderId, 2:i64 deliveryTimestamp, string receiver) throws (1:TransactionServiceException ex),
1045
 
5553 rajveer 1046
	void markOrderAsReceivedAtStore(1:i64 orderId, 2:i64 deliveryTimestamp) throws (1:TransactionServiceException ex),
1047
 
2537 chandransh 1048
	/**
4454 rajveer 1049
	 Once user raise the request for a DOA, order status will be changed from DELVIERY_SUCCESS to DOA_REQUEST_RECEIVED 
1050
	*/
1051
	bool markOrderDoaRequestReceived(1:i64 orderId) throws (1:TransactionServiceException ex),
1052
 
1053
	/**
1054
	 CRM person can authorize or deny the request reised by customer. If he authorizes order will change from DOA_REQUEST_RECEIVED 
1055
	 to DOA_REQUEST_AUTHORIZED. If he denies, status will be changed back to DELVIERY_SUCCESS. 
1056
	*/
7645 anupam.sin 1057
	bool markOrderDoaRequestAuthorized(1:i64 orderId, 2:bool isAuthorized, 3:bool fromStore, 4:bool isReship) throws (1:TransactionServiceException ex),
4454 rajveer 1058
 
1059
	/**
4488 rajveer 1060
	 Once user raise the request for a RET, order status will be changed from DELVIERY_SUCCESS to RET_REQUEST_RECEIVED 
1061
	*/
1062
	bool markOrderReturnRequestReceived(1:i64 orderId) throws (1:TransactionServiceException ex),
1063
 
1064
	/**
1065
	 CRM person can authorize or deny the request reised by customer. If he authorizes order will change from RET_REQUEST_RECEIVED 
1066
	 to RET_REQUEST_AUTHORIZED. If he denies, status will be changed back to DELVIERY_SUCCESS. 
1067
	*/
7645 anupam.sin 1068
	bool markOrderReturnRequestAuthorized(1:i64 orderId, 2:bool isAuthorized, 3:bool fromStore, 4:bool isReship) throws (1:TransactionServiceException ex),
4488 rajveer 1069
 
1070
	/**
2537 chandransh 1071
	Sends out an email to the account manager of the original courier provider used to ship the order.
4452 rajveer 1072
	If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUEST_RAISED.
1073
	If the order status was DOA_PICKUP_REQUEST_RAISED, it is left unchanged.
2537 chandransh 1074
	For any other status, it returns false.
1075
	Throws an exception if the order with the given id couldn't be found.
1076
	*/
4579 rajveer 1077
	bool requestPickupNumber(1:i64 orderId, 2:i64 providerId) throws (1:TransactionServiceException ex),
2537 chandransh 1078
 
1079
	/**
4452 rajveer 1080
	If the order status is DOA_PICKUP_REQUEST_RAISED, it does the following
2537 chandransh 1081
		1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
1082
		2. Changes order status to be DOA_PICKUP_AUTHORIZED.
1083
		3. Returns true
2589 chandransh 1084
	If the order is in any other status, it returns false.
2537 chandransh 1085
	Throws an exception if the order with the given id couldn't be found.
1086
	*/
4602 rajveer 1087
	bool authorizePickup(1:i64 orderId, 2:string pickupNumber, 3:i64 providerId) throws (1:TransactionServiceException ex),
2589 chandransh 1088
 
1089
	/**
2765 chandransh 1090
	Marks all DOA_PICKUP_AUTHORIZED orders of the previous day for a provider as DOA_RETURN_IN_TRANSIT.
4910 phani.kuma 1091
	*/
1092
	void markDoasAsPickedUp(1:i64 providerId, 2:map<string, string> pickupDetails),
1093
 
1094
	/**
2765 chandransh 1095
	Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
1096
	*/
4910 phani.kuma 1097
	list<Order> getDoasNotPickedUp(1:i64 providerId),
2765 chandransh 1098
 
1099
	/**
4741 phani.kuma 1100
	Marks all RET_PICKUP_CONFIRMED orders of the previous day for a provider as RET_RETURN_IN_TRANSIT.
4910 phani.kuma 1101
	*/
1102
	void markReturnOrdersAsPickedUp(1:i64 providerId, 2:map<string, string> pickupDetails),
1103
 
1104
	/**
4741 phani.kuma 1105
	Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
1106
	*/
4910 phani.kuma 1107
	list<Order> getReturnOrdersNotPickedUp(1:i64 providerId),
4741 phani.kuma 1108
 
1109
	/**
4452 rajveer 1110
	If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
4484 rajveer 1111
	If the order status is RTO_IN_TRANSIT, marks the order status as RTO_RECEIVED_PRESTINE and returns true.
2589 chandransh 1112
	If the order is in any other state, it returns false.
1113
	Throws an exception if the order with the given id couldn't be found.
1114
	*/
10136 anupam.sin 1115
	bool receiveReturn(1:i64 orderId, 2:i64 receiveCondition, 3:bool receiveFreebie) throws (1:TransactionServiceException ex),
2589 chandransh 1116
 
1117
	/**
4452 rajveer 1118
	Used to validate the DOA certificate for an order in the DOA_RECEIVED_PRESTINE state. If the certificate is valid,
2614 chandransh 1119
	the order state is changed to DOA_CERT_VALID. If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
2589 chandransh 1120
	If the order is in any other state, it returns false.
1121
	Throws an exception if the order with the given id couldn't be found.
1122
	*/
1123
	bool validateDoa(1:i64 orderId, 2:bool isValid) throws (1:TransactionServiceException ex),
2614 chandransh 1124
 
4495 rajveer 1125
	bool validateReturnProduct(1:i64 orderId, 2:bool isUsable) throws (1:TransactionServiceException ex),
1126
 
2614 chandransh 1127
	/**
4484 rajveer 1128
	If the order is in RTO_RECEIVED_PRESTINE or DOA_CERT_INVALID state, it does the following:
2614 chandransh 1129
		1. Creates a new order for processing in the BILLED state. All billing information is saved.
4484 rajveer 1130
		2. Marks the current order as one of the final states RTO_RESHIPPED and DOA_INVALID_RESHIPPED depending on what state the order started in.
2614 chandransh 1131
 
1132
	If the order is in DOA_CERT_VALID state, it does the following:
1133
		1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
1134
		2. Creates a return order for the warehouse executive to return the DOA material.
4452 rajveer 1135
		3. Marks the current order as the final DOA_VALID_RESHIPPED state.
2614 chandransh 1136
 
1137
	Returns the id of the newly created order.
1138
 
1139
	Throws an exception if the order with the given id couldn't be found.
1140
	*/
1141
	i64 reshipOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
1142
 
1143
	/**
4484 rajveer 1144
	If the order is in RTO_RECEIVED_PRESTINE, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
2614 chandransh 1145
		1. Creates a refund request for batch processing.
1146
		2. Creates a return order for the warehouse executive to return the shipped material.
4484 rajveer 1147
		3. Marks the current order as RTO_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
2614 chandransh 1148
 
1149
	If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
1150
		1. Creates a refund request for batch processing.
3226 chandransh 1151
		2. Cancels the reservation of the item in the warehouse.
1152
		3. Marks the current order as the REFUNDED final state.
2614 chandransh 1153
 
3226 chandransh 1154
	For all COD orders, if the order is in INIT, SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
1155
		1. Cancels the reservation of the item in the warehouse.
1156
		2. Marks the current order as CANCELED.	
1157
 
1158
	In all cases, it updates the reason for cancellation or refund and the person who performed the action.
1159
 
2614 chandransh 1160
	Returns True if it is successful, False otherwise.
1161
 
1162
	Throws an exception if the order with the given id couldn't be found.
1163
	*/
3226 chandransh 1164
	bool refundOrder(1:i64 orderId, 2:string refundedBy, 3:string reason) throws (1:TransactionServiceException ex),
2688 chandransh 1165
 
1166
	/**
1167
	Get all return orders created between the from and to dates for the given warehouse.
1168
	Ignores the warehouse if it is passed as -1.
1169
	*/
1170
	list<ReturnOrder> getReturnOrders(1:i64 warehouseId, 2:i64 fromDate, 3:i64 toDate),
1171
 
1172
	/**
5481 phani.kuma 1173
	Get all return orders created between the from and to dates.
1174
	*/
1175
	list<ReturnOrder> getAllReturnOrders(1:bool onlyNotProcessed, 2:i64 fromDate, 3:i64 toDate),
1176
 
1177
	/**
2700 chandransh 1178
	Returns the ReturnOrder corresponding to the given id.
1179
	Throws an exception if the return order with the given id couldn't be found.
1180
	*/
1181
	ReturnOrder getReturnOrder(1:i64 id) throws (1:TransactionServiceException ex),
1182
 
1183
	/**
2688 chandransh 1184
	Marks the return order with the given id as processed. Raises an exception if no such return order exists. 
1185
	*/
2819 chandransh 1186
	void processReturn(1:i64 returnOrderId) throws (1:TransactionServiceException ex),
1187
 
1188
	/**
3451 chandransh 1189
	Set the weight of the given order to the provided value. Will attempt to update the weight of the item in the catalog as well.
1190
	*/
3469 chandransh 1191
	Order updateWeight(1:i64 orderId, 2:double weight) throws (1:TransactionServiceException ex),
1192
 
1193
	/**
1194
	Change the item to be shipped for this order. Also adjusts the reservation in the inventory accordingly.
1195
	Currently, it also ensures that only a different color of the given item is shipped.
1196
	*/
1197
	Order changeItem(1:i64 orderId, 2:i64 itemId) throws (1:TransactionServiceException ex),
1198
 
7560 rajveer 1199
	Order changeCourierProvider(1:i64 orderId, 2:i64 providerId) throws (1:TransactionServiceException ex),
1200
 
3469 chandransh 1201
	/**
1202
	Moves the given order to the given warehouse. Also adjusts the inventory reservations accordingly.
1203
	*/
3553 chandransh 1204
	Order shiftToWarehouse(1:i64 orderId, 2:i64 warehouseId) throws (1:TransactionServiceException ex),
1205
 
1206
	/**
1207
	Adds the given delay reason to the given order.
3986 chandransh 1208
	Increases the expected delivery time of the given order by the given no. of days.
3553 chandransh 1209
	Raises an exception if no order with the given id can be found.
1210
	*/
4647 rajveer 1211
	bool addDelayReason(1:i64 orderId, 2:DelayReason delayReason, 3:i64 furtherDelay, 4:string delayReasonText) throws (1:TransactionServiceException ex),
3956 chandransh 1212
 
1213
	/**
1214
	Marks the COD orders with given AWB nos. as having been processed.
1215
	Updates the captured amount for the corresponding payment.
1216
 
1217
	Returns a map of AWBs which were not processed and the associated reason. An AWB is not processed if:
1218
	1. There is no order corresponding to an AWB number.
1219
	2. The captured amount for a payment exceeds the total payment.
1220
	3. The order corresponding to an AWB no. is in a state prior to DELIVERY_SUCCESS.
1221
	*/
4008 mandeep.dh 1222
	map<string, string> reconcileCodCollection(1:map<string, double> collectedAmountMap, 2:string xferBy, 3:string xferTxnId, 4:i64 xferDate) throws (1:TransactionServiceException ex),
1223
 
1224
    /**
4065 mandeep.dh 1225
     * Returns the list of transaction ids that require some extra processing and
4008 mandeep.dh 1226
     * which belong to a particular category. This is currently used by CRM
4065 mandeep.dh 1227
     * application. If no such transaction ids are present, it returns an empty list.
4008 mandeep.dh 1228
     */
1229
    list<i64> getTransactionsRequiringExtraProcessing(1:ExtraTransactionProcessingType category),
1230
 
1231
	/**
1232
	 * Marks a particular transaction as processed for a particular cateogory.
4065 mandeep.dh 1233
	 * It essentially deletes the transaction id record for a particular
1234
	 * processing type category (if present) from DB.
1235
	 * This is currently used by CRM application.
4008 mandeep.dh 1236
	 */
4018 chandransh 1237
	void markTransactionAsProcessed(1:i64 transactionId, 2:ExtraTransactionProcessingType category),
1238
 
1239
	/**
1240
	Returns a map containing the number of risky orders keyed by item id. A risky order
1241
	is defined as one whose shipping date is about to expire.
1242
	*/
4245 rajveer 1243
	map<i64, i64> getItemWiseRiskyOrdersCount(),
1244
 
1245
	/**
4295 varun.gupt 1246
	Returns a list of all orders which have items with given id
1247
	*/
1248
	list<Order> getOrdersForItemIds(1:list<i64> itemIds),
1249
 
1250
	/**
4245 rajveer 1251
	 * Mark order as cancellation request received. If customer sends request of cancellation of 
1252
	 * a particular order, this method will be called. It will just change status of the order 
1253
	 * depending on its current status. It also records the previous status, so that we can move 
1254
	 * back to that status if cancellation request is denied.
1255
	 */
1256
	void markOrderCancellationRequestReceived(1:i64 orderId) throws (1:TransactionServiceException ex),
1257
 
1258
	/**
1259
	 * If we decide to to cancel order, CRM will call this method to move the status of order to 
1260
	 * cancellation request confirmed. After this OM will be able to cancel the order. 	
1261
	 */
1262
	void markOrderCancellationRequestConfirmed(1:i64 orderId) throws (1:TransactionServiceException ex),
1263
 
1264
	/**
1265
	 * If we decide to not to cancel order, we will move the order ro previous status.	
1266
	 */
1267
	void markOrderCancellationRequestDenied(1:i64 orderId) throws (1:TransactionServiceException ex),
1268
 
1269
	/**
4258 rajveer 1270
	 * If we and/or payment gateway has decided to accept the payment, this method needs to be called.
1271
	 * Changed transaction and all orders status to payment accepted.  
4245 rajveer 1272
	 */
4285 rajveer 1273
	void markTransactionAsPaymentFlagRemoved(1:i64 transactionId) throws (1:TransactionServiceException ex),
4245 rajveer 1274
 
4259 anupam.sin 1275
	/**
1276
	* This method is called when a flagged payment is deemed unserviceable and the corresponding orders
1277
	* need to be cancelled
1278
	*/
4285 rajveer 1279
	void refundTransaction(1:i64 transactionId, 2:string refundedBy, 3:string reason) throws (1:TransactionServiceException ex),
4324 mandeep.dh 1280
 
1281
	/**
1282
	 * Updates shipment address of an order. Delivery and shipping date estimates
1283
	 * etc. are also updated here.
1284
	 *
1285
	 * Throws TransactionServiceException in case address change is not
1286
	 * possible due to certain reasons such as new pincode in address is
1287
	 * not serviceable etc.
1288
	 */
1289
	void updateShipmentAddress(1:i64 orderId, 2:i64 addressId) throws (1:TransactionServiceException ex)
4285 rajveer 1290
 
1291
	/**
1292
	Marks the orders as ACCEPTED for the given itemId and inventory. It also updates the accepted timestamp. If the
1293
	given order is not a COD order, it also captures the payment if the same has not been captured.
1294
	*/
4303 rajveer 1295
	bool acceptOrdersForItemId(1:i64 itemId, 2:i64 inventory) throws (1:TransactionServiceException ex),
4285 rajveer 1296
 
4369 rajveer 1297
	void markOrdersAsPORaised(1:i64 vendorId, 2:i64 itemId, 3:i64 quantity, 4:i64 estimate, 5:bool isReminder) throws (1:TransactionServiceException ex),
1298
	void markOrdersAsReversalInitiated(1:i64 vendorId, 2:i64 itemId, 3:i64 quantity, 4:i64 estimate, 5:bool isReminder) throws (1:TransactionServiceException ex),
1299
	void markOrdersAsNotAvailabke(1:i64 vendorId, 2:i64 itemId, 3:i64 quantity, 4:i64 estimate, 5:bool isReminder) throws (1:TransactionServiceException ex),
1300
 
4386 anupam.sin 1301
	map<i32, TimeoutSummary> markOrdersAsTimeout(1:i64 vendorId) throws (1:TransactionServiceException ex),
4661 rajveer 1302
 
4386 anupam.sin 1303
	/**
4661 rajveer 1304
	Mark order as LOST_IN_TRANSIT
1305
	*/
1306
	bool markOrderAsLostInTransit(1:i64 orderId) throws (1:TransactionServiceException ex),
1307
 
1308
	/**
4386 anupam.sin 1309
	Returns the order corresponding to an AWB number
1310
	*/
4586 mandeep.dh 1311
	Order getOrderForAwb(1:string awb) throws (1:TransactionServiceException ex),
4506 phani.kuma 1312
 
1313
	/**
4910 phani.kuma 1314
	Returns the order corresponding to a logistics provider id for a given list of order status
4506 phani.kuma 1315
	*/
4910 phani.kuma 1316
	list<Order> getOrdersForProviderForStatus(1:i64 logistics_provider_id, 2:list<OrderStatus> order_status_list) throws (1:TransactionServiceException ex)
4600 varun.gupt 1317
 
1318
	/**
1319
	Returns list of orders fullfiled from a certain vendor and billed in a given date range
1320
	*/
1321
	list<Order> getBilledOrdersForVendor(1:i64 vendorId, 2:i64 billingDateFrom, 3:i64 billingDateTo) throws (1:TransactionServiceException ex),
1322
 
4607 rajveer 1323
	list<Order> getSlippedSippingDateOrders() throws (1:TransactionServiceException ex),
1324
 
4709 rajveer 1325
	list<Order> getCancelledOrders(1:i64 cancelDateFrom, 2:i64 cancelDateTo) throws (1:TransactionServiceException ex),
1326
 
4600 varun.gupt 1327
	void saveBluedartSettlements(1:map<i64, double> mapAWBAndAmount) throws (1:TransactionServiceException ex),
1328
 
4905 varun.gupt 1329
	void savePaymentSettlements(1:i64 settlementDate, 2:i64 paymentGatewayId, 3:i64 referenceId, 4:double serviceTax, 5:double otherCharges, 6:double netCollection) throws (1:TransactionServiceException ex),
4600 varun.gupt 1330
 
1331
	void saveEBSSettlementSummary(1:i64 settlementId, 2:i64 settlementDate, 3:i64 transactionDateFrom, 4:i64 transactionDateTo, 5:double amount) throws (1:TransactionServiceException ex),
1332
 
5386 phani.kuma 1333
	PaymentSettlement getSettlementForPrepaid(1:i64 referenceId, 2:bool isRefund) throws (1:TransactionServiceException ex),
4600 varun.gupt 1334
 
5386 phani.kuma 1335
	PaymentSettlement getSettlementForCod(1:i64 orderId, 2:bool isRefund) throws (1:TransactionServiceException ex),
1336
 
4600 varun.gupt 1337
	map<i64, string> getEBSSettlementSummaries() throws (1:TransactionServiceException ex),
1338
 
1339
	void markEBSSettlementUploaded(1:i64 settlementId) throws (1:TransactionServiceException ex),
1340
 
4715 varun.gupt 1341
	i64 getEBSSettlementDate(1:i64 settlementId) throws (1:TransactionServiceException ex),
1342
 
1343
	list<PaymentSettlement> getSettlementsByDate(1:i64 settlementDateFrom, 2:i64 settlementDateTo, 3:bool isRefund) throws (1:TransactionServiceException ex),
1344
 
1345
	/**
1346
	Returns list of Order Ids, which belong to reshiped orders, shortlisted from a given list of Order Ids 
1347
	*/
4875 varun.gupt 1348
	list<i64> getReshippedOrderIds(1:list<i64> orderIds) throws (1:TransactionServiceException ex),
1349
 
5481 phani.kuma 1350
	list<Order> getBilledOrders(1:i64 vendorId, 2:bool onlyVendorNotPaid, 3:i64 billingDateFrom, 4:i64 billingDateTo) throws (1:TransactionServiceException ex),
5031 varun.gupt 1351
 
5067 varun.gupt 1352
	map<i64, i64> getStatusDistributionOfOrders(1:i64 startDate, 2:i64 endDate) throws (1:TransactionServiceException ex),
1353
 
5099 varun.gupt 1354
	list<i64> getOrderIdsForStatus(1:i64 status, 2:i64 startDatetime, 3:i64 endDatetime) throws (1:TransactionServiceException ex),
1355
 
5348 anupam.sin 1356
	/**
1357
	 * Updates the agent who handled the COD verification call
1358
	 */
1359
	void updateCODAgent(1:string agent, 2:i64 orderId) throws (1:TransactionServiceException ex),
1360
 
5208 varun.gupt 1361
	void updateOrderAsPaidToVendor(1:i64 orderId) throws (1:TransactionServiceException ex),
1362
 
5386 phani.kuma 1363
	void updateOrderOnlyAsPaidToVendor(1:i64 orderId) throws (1:TransactionServiceException ex),
1364
 
5447 anupam.sin 1365
	list<Order> getRefundedOrdersMarkedPaid() throws (1:TransactionServiceException ex),
1366
 
1367
	/**
1368
	* gets all COD Verification Agents for all orderIds from a minId to maxId
1369
	*
1370
	*/
5527 anupam.sin 1371
	list<CODVerificationAgent> getAllVerificationAgents(1:i64 minOrderId, 2:i64 maxOrderId),
1372
 
1373
	/**
1374
	* gets all attributes for a given orderId
1375
	*/
1376
	list<Attribute> getAllAttributesForOrderId(1:i64 orderId),
1377
 
1378
	/**
5676 rajveer 1379
	* sets attributes for an order
1380
	*/
1381
	void setOrderAttributes(1:i64 orderId, list<Attribute> attributes),
1382
 
1383
	/**
5527 anupam.sin 1384
	* sets attributes for all orders in a transaction
1385
	*/
5553 rajveer 1386
	void setOrderAttributeForTransaction(1:i64 transactionId, Attribute attribute),
1387
 
1388
	list<Order> getReceivePendingOrders(1:i64 storeId),
1389
 
5593 mandeep.dh 1390
	list<Order> getReceivedAtStoreOrders(1:i64 storeId),
5713 rajveer 1391
 
1392
	list<Order> getOrdersCollectionAtStore(1:i64 storeId, 2:i64 fromDate, 3:i64 toDate, 4:bool onlyCod),
5593 mandeep.dh 1393
 
5833 rajveer 1394
	string getOrderAttributeValue(1:i64 orderId, string attributeName),
6019 rajveer 1395
 
1396
	bool changeJacketNumber(1:i64 orderId, 2:i64 jacketNumber),
1397
 
1398
	bool markOrderAsRtoInTransit(1:i64 orderId),
1399
 
5593 mandeep.dh 1400
	/**
1401
	 * Accepts appropriate order for an item in a given billingWarehouse. Usually
1402
	 * invoked while scanning IN of items.
1403
	 */
6000 mandeep.dh 1404
	 void acceptOrderForItem(1:i64 itemId, 2:i64 quantity, 3:i64 fulfilmentWarehouseId, 4:i64 billingWarehouseId);
1405
 
1406
	 RechargeOrder createRechargeOrder(1:RechargeOrder rechargeOrder) throws  (1:TransactionServiceException ex);
6031 rajveer 1407
	 RechargeOrder getRechargeOrder(1:i64 rechargeRrderId) throws  (1:TransactionServiceException ex);
1408
	 list<RechargeOrder> getRechargeOrders(1:i64 userId);
1409
 
1410
	 bool updateRechargeOrderStatus(1:i64 rechargeOrderId, 2:RechargeOrderStatus rechargeOrderStatus) throws  (1:TransactionServiceException ex);
1411
	 bool activateRechargeTxn(1:i64 rechargeOrderId) throws  (1:TransactionServiceException ex);
1412
	 UserWallet getUserWallet(1:i64 userId);
1413
	 list<UserWalletHistory> getUserWalletHistory(1:i64 userId);
6050 anupam.sin 1414
	 /**
1415
	 Returns a recharge order for a given transactionId
1416
	 */
1417
	 RechargeOrder getRechargeOrdersForTransaction(1:i64 txnId) throws (1:TransactionServiceException ex);
6206 rajveer 1418
	 map<i64, string> getServiceProviders(1:RechargeType rechargeType, 2:bool onlyActive);
6289 anupam.sin 1419
	 DeviceNumberInfo getServiceProviderForDevice(1:RechargeType rechargeType, 2:string deviceNumber);
6591 anupam.sin 1420
	 string validateRecharge(1:RechargeType rechargeType, 2:string deviceNumber, 3:i64 userSelectedProviderId, 4:string clientAddress);
6094 rajveer 1421
	 list<RechargeOrder> getRechargeOrdersForDevice(1:string deviceNumber);
1422
	 void addAmountToWallet(1:i64 userId, 2:i64 orderId, 3:i64 amount);
6188 rajveer 1423
 
1424
	 RechargeStatistics getRechargeStatistics();
1425
 
6154 rajveer 1426
	 list<RechargeOrder> getRechargeOrdersForStatus(1:i64 status);
6159 rajveer 1427
	 list<RechargePlan> getPlansForOperator(1:i64 operatorId);
6289 anupam.sin 1428
 
1429
	 /**
1430
	 Returns denominations for a given operator and circle
1431
	 */
6307 anupam.sin 1432
	 list<RechargeDenomination> getRechargeDenominations(1:i64 operatorId, 2:string circleCode, 3:DenominationType denominationType) throws (1:TransactionServiceException ex);
6371 rajveer 1433
 
1434
	 void updateAvailabilityStatus(1:i64 operatorId, 2:i64 circleId, 3:bool isAvailable);
6389 rajveer 1435
 
1436
	 list<EmiScheme> getAvailableEmiSchemes();
1437
 
6412 rajveer 1438
	 map<i64, double> getMiscCharges(1:i64 transactionId);
6507 anupam.sin 1439
 
1440
	 bool refundRechargeOrder(1:i64 rechargeOrderId) throws (1:TransactionServiceException ex);
6821 amar.kumar 1441
 
6906 rajveer 1442
	 list<Order> getPhysicalOrders(1:i64 fromDate, 2:i64 toDate);
1443
 
1444
	 binary getDocument(1:i64 docType, 2:i64  docSource);
6985 anupam.sin 1445
 
1446
	 bool changeShippingAddress(1:i64 orderId, 2:string line1, 3:string line2, 4:string city, 5:string state, 6:string pin);
6988 rajveer 1447
 
7075 rajveer 1448
	 binary retrieveInvoice(1:i64 orderId, 2:i64 userId);
6988 rajveer 1449
 
7026 rajveer 1450
	 list<string> receiveUpdatesForRedExpress(1:string awbNumber);
7073 anupam.sin 1451
 
1452
	 RechargeTransaction createRechargeTransaction(1:RechargeTransaction thriftRechargeTransaction);
7080 anupam.sin 1453
 
7084 rajveer 1454
	 list<RechargeTransaction> getRechargeTransactions(1:i64 storeId);
7151 amit.gupta 1455
 
1456
	 list<RechargeTransaction> getRechargeTrans(1:i64 storeId, 2:i64 startDate, 3:i64 endDate, 4:RechargeOrderStatus status);
7084 rajveer 1457
 
7080 anupam.sin 1458
	 RechargeTransaction getRechargeTransaction(1:i64 rechargeId);
1459
 
1460
	 list<FRC> getFRCs(1:i64 circleId, 2:i64 operatorId);
7096 anupam.sin 1461
 
1462
	 HotspotStore getHotspotStore(1:i64 id, 2:string hotspotid);
1463
 
1464
	 TelecomCircle getTelecomCircle(1:i64 id, 2:string code);
7109 anupam.sin 1465
 
1466
	 binary retrieveHotspotRechargeInvoice(1:i64 rechargeId);
7169 anupam.sin 1467
 
7190 amar.kumar 1468
	 Order splitFreebieOrder(1:i64 orderId, 2:string splitReason, 3:i64 shippingDate);
1469
 
7172 anupam.sin 1470
	 list<RechargeTransaction> getRechargeTransactionsByNumber(1:string number, 2:i64 storeId);
7169 anupam.sin 1471
 
1472
	 bool updateHotspotStorePassword(1:i64 storeId, 2:string password);
7263 anupam.sin 1473
 
7285 rajveer 1474
	 i64 topupCompanyWallet(1:i64 companyId, 2:i64 amount);
1475
 
1476
	 i64 getWalletBalanceForCompany(1:i64 companyId);
7363 rajveer 1477
 
1478
	 i64 getSaholicRechargeBalance();
7285 rajveer 1479
 
7263 anupam.sin 1480
	 SourceDetail getSourceDetail(1:i64 source);
7267 anupam.sin 1481
 
1482
	 list<TelecomCircle> getAllCircles();
1483
 
1484
	 bool deleteFrcs(1:list<i64> frcIdsToDelete);
7311 kshitij.so 1485
 
1486
	 void addAmazonOrder(1:AmazonOrder amazonOrder);
1487
 
7322 vikram.rag 1488
	 bool updateAmazonOrderStatus(1:i64 orderId,2:string status);
7311 kshitij.so 1489
 
7686 vikram.rag 1490
	 list<Order> getAmazonOrdersShipped();
7311 kshitij.so 1491
 
1492
	 list<Order> getAmazonOrdersCancelled(1:i64 interval);
1493
 
7343 anupam.sin 1494
	 AmazonOrder getAmazonOrder(1:i64 orderId);
7322 vikram.rag 1495
 
7542 vikram.rag 1496
	 list<AmazonOrder> getAmazonOrderByAmazonOrderId(1:string amazonOrderId);
1497
 
7343 anupam.sin 1498
	 list<Order> getOrdersForStore(1:i64 id, 2:i64 storeId, 3:i64 startDate, 4:i64 endDate, 5:list<OrderStatus> statuses);
1499
 
7386 anupam.sin 1500
	 binary getStoreOrderAdvanceInvoice(1:i64 orderId, 2:i64 storeId);
7355 vikram.rag 1501
 
7370 anupam.sin 1502
	 bool addFrc(1:i64 circleId, 2:i64 operatorId, 3:i64 denomination, 4:i64 maxDiscount);
7371 anupam.sin 1503
 
1504
	 string addSeries(1:i64 circle, 2:i64 operatorId, 3:i64 series);
7386 anupam.sin 1505
 
1506
	 bool saveStoreOrderDetail(1:StoreOrderDetail storeOrderDetail);
1507
 
1508
	 StoreOrderDetail getStoreOrderDetail(1:i64 orderId, 2:i64 storeId);
1509
 
1510
	 list<string> getAllEdcBanks();
7393 anupam.sin 1511
 
1512
	 bool saveRefundAmountsForStoreOrder(1:i64 orderId, 2:i64 storeId, 3:double cashRefundAmount, 4:double cardRefundAmount);
7427 anupam.sin 1513
 
1514
	 list<StoreOrderCollection> getCollectionsForStore(1:i64 storeId, 2:i64 startDate, 3:i64 endDate);
7442 vikram.rag 1515
 
7460 kshitij.so 1516
	 list<AmazonOrdersToAcknowledge> getAmazonOrdersToAcknowledge();
7442 vikram.rag 1517
 
7460 kshitij.so 1518
	 void changeAmazonOrderStatus(1:string amazonOrderCode,2:string status);
1519
 
7762 kshitij.so 1520
	 bool updateTimestampForAmazonOrder(1:map<i64, map<string,string>> amazonOrderDelivery);
7530 kshitij.so 1521
 
1522
	 bool updateSourceDetailTimestamp(1:i64 id , 2:i64 lastUpdatedOn);
7572 anupam.sin 1523
 
1524
	 list<Order> getOrdersByMobileNumber(1:string mobileNumber);
1525
 
7645 anupam.sin 1526
	 list<Order> getOrdersByAmazonOrderCode(1:string amazonId);
7730 anupam.sin 1527
 
1528
	 bool convertStoreToNormal(1:i64 orderId);
7822 amar.kumar 1529
 
1530
	 Order updateFreebieItem(1:i64 orderId, 2:i64 newFreebieItemId);
7939 manish.sha 1531
 
7967 anupam.sin 1532
	 list<HotspotServiceMatrix> getHotspotServiceMatrices();
1533
 
7939 manish.sha 1534
	 Order updateOrderAWB(1:i64 orderId, 2:string airwayBillNo);
8182 amar.kumar 1535
 
1536
	 list<Order> getOrdersByVendor(1:list<i64> vendors, 2:list<OrderStatus> statuses) throws (1:TransactionServiceException ex);
1537
 
1538
	 void createEbayOrder(1:EbayOrder ebayOrder);
1539
 
1540
	 EbayOrder getEbayOrderByOrderId(1:i64 orderId);
1541
 
1542
	 EbayOrder getEbayOrderBySalesRecNumber(1:i64 salesRecordNumber);
1543
 
8241 amar.kumar 1544
	 list<EbayOrder> getEbayOrder(1:i64 salesRecordNumber, 2:string listingId, 3:string paisapayId);
8182 amar.kumar 1545
 
1546
	 void updateEbayOrder(1:EbayOrder ebayOrder);
1547
 
1548
	 bool ebayOrderExists(1:i64 salesRecNumber, 2:string ebayListingId);
1549
 
1550
	 void updateOrderForEbay(1:Order order);
1551
 
1552
	 Order splitEbayOrder(1:i64 orderId, 2:i64 splitOrderQty, 3:i64 splitOrderItemId, 4:bool usePowerShip);
8282 kshitij.so 1553
 
1554
	 void addOrUpdateAmazonFbaSalesSnapshot(1:AmazonFbaSalesSnapshot amazonfbasalessnapshot);
1555
 
1556
	 list<AmazonFbaSalesSnapshot> getAmazonFbaSalesSnapshotForDays(1:i32 days);
1557
 
8488 amar.kumar 1558
     AmazonFbaSalesSnapshot getAmazonFbaSalesLatestSnapshotForItem(1:i64 item_id);
1559
 
1560
     void createSnapdealOrder(1:SnapdealOrder snapdealOrder);
1561
 
1562
     SnapdealOrder getSnapdealOrder(1:i64 orderId, 2:string referenceCode, 3:i64 subrderId)
1563
 
9630 vikram.rag 1564
     bool snapdealOrderExists(1:string subOrderId, 2:string referenceCode);
8488 amar.kumar 1565
 
8532 vikram.rag 1566
     void updateLatestFbaPricesForItem(1:FbaItemPrices fbaitemprices)
1567
 
8961 vikram.rag 1568
     bool flipkartOrderExists(1:string flipkartOrderId, 2:string flipkartSubOrderId)
1569
 
1570
     void createFlipkartOrder(1:FlipkartOrder flipkartOrder)
1571
 
9107 vikram.rag 1572
     FlipkartOrder getFlipkartOrder(1:i64 orderId)
8990 vikram.rag 1573
 
9159 amar.kumar 1574
     FlipkartOrder getFlipkartOrderByOrderItemId(1:string flipkartOrderItemId)
1575
 
9107 vikram.rag 1576
     void updateFlipkartOrderDatesAndAWB(1:string flipkartOrderId,2:string flipkartSubOrderId,3:i64 date,4:string awb)
9404 vikram.rag 1577
 
9571 vikram.rag 1578
     map<i64,i64> getOrdersCreatedAfterTimestampForSource(1:i64 timestamp,2:i64 source)
9404 vikram.rag 1579
 
9338 manish.sha 1580
     Order getOrderForAirwayBillNo(1:string airwaybillNo) throws (1:TransactionServiceException ex)
9651 manish.sha 1581
 
1582
	 i64 getMinCreatedTimeStampUndeliveredOrdersForSource(1:i32 source)
1583
 
9880 manish.sha 1584
	 void updateSnapdealOrdersStatus(1:map<string, list<list<string>>> orders)  throws (1:TransactionServiceException ex)
9651 manish.sha 1585
 
1586
	 void updateFlipkartOrdersStatus(1:list<list<string>> delivered_orders)  throws (1:TransactionServiceException ex)
9801 manish.sha 1587
 
1588
	 void bulkAddOrUpdateAmazonFbaSalesSnapshot(1:list<AmazonFbaSalesSnapshot> amazonfbasalessnapshotlist)
9945 vikram.rag 1589
 
1590
	 map<i64,i64> getCreatedOrdersForFlipkart(list<string> flipkartorderids)
1591
 
6000 mandeep.dh 1592
}