Subversion Repositories SmartDukaan

Rev

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

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