Subversion Repositories SmartDukaan

Rev

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