Subversion Repositories SmartDukaan

Rev

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