Subversion Repositories SmartDukaan

Rev

Rev 11896 | Rev 12280 | 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
 
12103 manish.sha 810
struct AmazonFbaOrderReturns {
811
	1:string amazonOrderId,
812
	2:i64 insertionTimestamp,
813
	3:i64 sku,
814
	4:i64 creationTimestamp,
815
	5:i64 shippedQuantity,
816
	6:i64 sellableReturnQuantity,
817
	7:i64 nonSellableReturnQuantity
818
}
819
 
3374 rajveer 820
service TransactionService extends GenericService.GenericService{
483 rajveer 821
 
822
	i64 createTransaction(1:Transaction transaction) throws (1:TransactionServiceException ex),
823
 
824
	//	Get transaction methods.
825
	Transaction getTransaction(1:i64 id) throws (1:TransactionServiceException ex),
826
	list<Transaction> getTransactionsForCustomer(1:i64 customerId, 2:i64 from_date, 3:i64 to_date, 4:TransactionStatus status) throws (1:TransactionServiceException ex),
827
	list<Transaction> getTransactionsForShoppingCartId(1:i64 shoppingCartId) throws (1:TransactionServiceException ex),
828
	TransactionStatus getTransactionStatus(1:i64 transactionId) throws (1:TransactionServiceException ex),
7293 anupam.sin 829
	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 830
 
1398 varun.gupt 831
	bool enqueueTransactionInfoEmail(1:i64 transactionId) throws (1:TransactionServiceException ex),
1382 varun.gupt 832
 
4801 anupam.sin 833
	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 834
 
1115 chandransh 835
	/**
4133 chandransh 836
	Returns at most 'limit' orders with the given statuses for the given warehouse starting from the given offset.
837
	Pass the status as null and the limit as 0 to ignore them.
838
	*/
8303 amar.kumar 839
	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 840
 
841
	/**
842
	Returns the count of orders with the given statuses assigned to the given warehouse.
843
	*/
8303 amar.kumar 844
	i32 getOrderCount(1:list<OrderStatus> statuses, 2:i64 warehouseId, 3:i64 source) throws (1:TransactionServiceException ex),
4133 chandransh 845
 
846
	/**
1115 chandransh 847
	Returns orders within a range of their billing dates
848
	*/
1000 varun.gupt 849
	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 850
 
1382 varun.gupt 851
	/**
3427 chandransh 852
	Returns orders for a particular provider and warehouse which were shipped between the given dates.
3451 chandransh 853
	Returned orders comprise of COD orders if cod parameter is true. It comprises of prepaid orders otherwise. 
854
	Pass providerId and warehouseId as -1 to ignore both these parameters.
3427 chandransh 855
	*/
3451 chandransh 856
	list<Order> getOrdersByShippingDate(1:i64 fromShippingDate, 2:i64 toShippingDate, 3:i64 providerId, 4:i64 warehouseId, 5:bool cod) throws (1:TransactionServiceException ex),
3427 chandransh 857
 
858
	/**
1382 varun.gupt 859
	Returns order ids for orders which can be returned
860
	*/
861
	list<i64> getReturnableOrdersForCustomer(1:i64 customer_id, 2:i64 limit) throws (1:TransactionServiceException ex),
862
 
863
	/**
864
	Returns order ids for orders which can be cancelled
865
	*/
866
	list<i64> getCancellableOrdersForCustomer(1:i64 customer_id, 2:i64 limit) throws (1:TransactionServiceException ex),
867
 
483 rajveer 868
	bool changeOrderStatus(1:i64 orderId, 2:OrderStatus status, 3:string description) throws (1:TransactionServiceException ex),
1147 chandransh 869
 
870
	/**
1529 ankur.sing 871
	Returns list of orders for given transaction Id. Also filters based on customer Id so that
872
	only user who owns the transaction can view its order details.
873
	*/
874
	list<Order> getOrdersForTransaction(1:i64 transactionId 2:i64 customerId)  throws (1:TransactionServiceException ex),
3014 chandransh 875
 
876
	/**
877
	Returns list of orders for the given customer created between the given dates and having the given statuses.
878
	Pass and empty list to ignore filtering on statuses.
879
	*/	
880
	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 881
 
483 rajveer 882
	i64 createOrder(1:Order order) throws (1:TransactionServiceException ex),
883
	Order getOrder(1:i64 id) throws (1:TransactionServiceException ex),
884
	list<LineItem> getLineItemsForOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
885
 
4999 phani.kuma 886
	list<Order> getOrderList(1:list<i64> order_ids),
1529 ankur.sing 887
 
5386 phani.kuma 888
	list<Order> getOrderListForVendor(1:list<i64> order_ids, 2:i64 vendorId),
889
 
757 chandransh 890
	/**
1529 ankur.sing 891
	Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
892
	Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
893
	*/
894
	Order getOrderForCustomer(1:i64 orderId, 2:i64 customerId) throws (1:TransactionServiceException ex),
895
 
3060 chandransh 896
	//Alerts apis 
4444 rajveer 897
	list<Alert> getAlerts(1:i64 type, 2:i64 warehouseId, 3:i64 status, 4:i64 timestamp),
898
	void addAlert(1:i64 type, 2:i64 warehouseId, 3:string description),
899
	void markAlertsAsSeen(1:i64 warehouseId),
3060 chandransh 900
 
1529 ankur.sing 901
	/**
3060 chandransh 902
	Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
903
	*/
904
	i64 getValidOrderCount(),
905
 
906
	/**
907
	Returns the number of distinct customers who have done successful transactions
908
	*/
909
	i64 getNoOfCustomersWithSuccessfulTransaction(),
910
 
911
	/**
912
	Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
913
	List contains two values, first minimum amount and second maximum amount.	
914
	*/
915
	list<double> getValidOrdersAmountRange(),
916
 
917
	/**
918
	Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
919
	If limit is passed as 0, then all valid Orders are returned. 
920
	*/
5874 rajveer 921
	list<Order> getValidOrders(1:i64 limit, 2:bool onlyStore),
3060 chandransh 922
 
923
	/**
924
	Create a batch of all the pending orders for the given warehouse.
925
	The returned list is orderd by created_timestamp.
926
	If there are no pending orders, an empty list is returned.
927
	*/
1223 chandransh 928
	list<Order> batchOrders(1:i64 warehouseId) throws (1:TransactionServiceException ex),
929
 
930
	/**
931
	Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found. 
1244 chandransh 932
	*/
1210 chandransh 933
	bool markOrderAsOutOfStock(1:i64 orderId) throws (1:TransactionServiceException ex),
934
 
935
	/**
3060 chandransh 936
	Marks the given order as SUBMITTED_FOR_PROCESSING and updates the verified
937
	timestamp. It is intended to be used for COD orders but can be harmlessly 
938
	used for all other orders as well.
939
	Throws an exception if no such order exists.
757 chandransh 940
	*/
3060 chandransh 941
	bool verifyOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
1115 chandransh 942
 
943
	/**
3060 chandransh 944
	Marks the given order as ACCEPTED and updates the accepted timestamp. If the
945
	given order is not a COD order, it also captures the payment if the same has
946
	not been captured.
947
	Throws an exception if no such order exists.
948
	*/
949
	bool acceptOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
950
 
951
	/**
952
	Add billing details such as the bill number and the biller to the Order.
4658 mandeep.dh 953
	Adds jacket number, item number and Serial no. to the order. Doesn't update
3060 chandransh 954
	the IMEI no. if a -1 is supplied.
955
	Also, it generates an invoice number for the order, marks the order as
956
	BILLED and sets the billing timestamp.
957
	Returns false if it doesn't find the order with the given ID.
958
	*/
7190 amar.kumar 959
	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 960
 
961
	/**
962
	Add the invoice number to the order.
963
	*/	
6747 amar.kumar 964
	void addInvoiceNumber(1:i64 orderId, 2:string invoiceNumber, 3:string color, 4:string serialNumber, 5:string itemNumber) throws (1:TransactionServiceException ex),
4910 phani.kuma 965
 
3060 chandransh 966
	/**
967
	Depending on the third parameter, marks either all prepaid or all cod orders BILLED by the
4410 rajveer 968
	given warehouse and were picked up by the given provider as SHIPPED_FROM_WH.
969
	*/
4788 rajveer 970
	bool markOrdersAsShippedFromWarehouse(1:i64 warehouseId, 2:i64 providerId, 3:bool cod, 4:list<i64> orderIds) throws (1:TransactionServiceException ex),
5676 rajveer 971
 
5713 rajveer 972
	bool markOrdersAsReturnedFromStore(1:i64 providerId, 2:list<i64> orderIds, 3:list<string> awbs) throws (1:TransactionServiceException ex),
4410 rajveer 973
 
974
	/**
1115 chandransh 975
	Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
4910 phani.kuma 976
	Raises an exception if we encounter report for an AWB number that we did not ship.	
977
	*/
978
	void markOrdersAsPickedUp(1:i64 providerId, 2:map<string, string> pickupDetails) throws (1:TransactionServiceException ex),
979
 
980
	/**
1115 chandransh 981
	Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
982
	*/
4910 phani.kuma 983
	list<Order> getOrdersNotPickedUp(1:i64 providerId),
1134 chandransh 984
 
985
	/**
986
	Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
987
	the name of the receiver.
988
	Raises an exception if we encounter report for an AWB number that we did not ship.
989
	*/
990
	void markOrdersAsDelivered(1:i64 providerId, 2:map<string, string> deliveredOrders) throws (1:TransactionServiceException ex),
991
 
992
	/**
4910 phani.kuma 993
	Mark all orders with AWBs in the given map as RTO. Also sets the delivery timestamp.
1134 chandransh 994
	Raises an exception if we encounter report for an AWB number that we did not ship.
995
	*/
4910 phani.kuma 996
	void markAsRTOrders(1:i64 providerId, 2:map<string, string> returnedOrders) throws (1:TransactionServiceException ex),
1134 chandransh 997
 
1244 chandransh 998
	/**
4910 phani.kuma 999
	Returns a list of orders that were returned by courier.
1000
	*/
1001
	list<Order> getRTOrders(1:i64 providerId),
1002
 
1003
	/**
1244 chandransh 1004
	Update the status description of orders whose AWB numbers are keys of the Map.
4910 phani.kuma 1005
	*/
1006
	void updateNonDeliveryReason(1:i64 providerId, 2:map<string, string> undeliveredOrders) throws (1:TransactionServiceException ex),
1007
 
1008
	/**
4581 phani.kuma 1009
	Returns a list of orders that were picked up or shipped four days ago but did not get delivered.
1244 chandransh 1010
	*/
4910 phani.kuma 1011
	list<Order> getNonDeliveredOrdersbyCourier(1:i64 providerId),
1244 chandransh 1012
 
1407 ankur.sing 1013
	/**
4910 phani.kuma 1014
	Mark all orders with AWBs in the given map as local connected. Also sets the local connected timestamp.
1015
	*/
1016
	void markOrdersAsLocalConnected(1:i64 providerId, 2:map<string, string> local_connected_orders) throws (1:TransactionServiceException ex),
1017
 
1018
	/**
1019
	Returns a list of orders that were picked up or shipped but pending local connection.
1020
	*/
1021
	list<Order> getOrdersNotLocalConnected(1:i64 providerId),
1022
 
1023
	/**
1024
	Mark all orders with AWBs in the given map as reached destination city. Also sets the reached destination timestamp.
1025
	*/
1026
	void markOrdersAsDestinationCityReached(1:i64 providerId, 2:map<string, string> destination_city_reached_orders) throws (1:TransactionServiceException ex),
1027
 
1028
	/**
1029
	Mark all orders with AWBs in the given map as first delivery attempt made. Also sets the first delivery attempted timestamp.
1030
	*/
1031
	void markOrdersAsFirstDeliveryAttempted(1:i64 providerId, 2:map<string, string> first_atdl_orders) throws (1:TransactionServiceException ex),
1032
 
1033
	/**
1407 ankur.sing 1034
	Returns the list of orders whose delivery time has passed but have not been
1035
	delivered yet for the given provider and warehouse. To get a complete list of
1036
	undelivered orders, pass them as -1. 
1037
	Returns an empty list if no such orders exist.
1038
	*/
1039
	list<Order> getUndeliveredOrders(1:i64 providerId, 2:i64 warehouseId),
1040
 
1599 ankur.sing 1041
	/**
4783 phani.kuma 1042
	Returns the list of orders whose expected delivery date has passed but have not been
1043
	delivered yet.
1044
	Returns an empty list if no such orders exist.
1045
	*/
1046
	list<Order> getUndeliveredOrdersExpectedDeliveryDateNotMet(),
1047
 
1048
	/**
2537 chandransh 1049
	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.
1050
	Returns the final flag status.
1051
	Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS. 
1052
	*/
1053
	bool toggleDOAFlag(1:i64 orderId) throws (1:TransactionServiceException ex),
1054
 
4712 rajveer 1055
	void markOrderAsDelivered(1:i64 orderId, 2:i64 deliveryTimestamp, string receiver) throws (1:TransactionServiceException ex),
1056
 
5553 rajveer 1057
	void markOrderAsReceivedAtStore(1:i64 orderId, 2:i64 deliveryTimestamp) throws (1:TransactionServiceException ex),
1058
 
2537 chandransh 1059
	/**
4454 rajveer 1060
	 Once user raise the request for a DOA, order status will be changed from DELVIERY_SUCCESS to DOA_REQUEST_RECEIVED 
1061
	*/
1062
	bool markOrderDoaRequestReceived(1:i64 orderId) throws (1:TransactionServiceException ex),
1063
 
1064
	/**
1065
	 CRM person can authorize or deny the request reised by customer. If he authorizes order will change from DOA_REQUEST_RECEIVED 
1066
	 to DOA_REQUEST_AUTHORIZED. If he denies, status will be changed back to DELVIERY_SUCCESS. 
1067
	*/
7645 anupam.sin 1068
	bool markOrderDoaRequestAuthorized(1:i64 orderId, 2:bool isAuthorized, 3:bool fromStore, 4:bool isReship) throws (1:TransactionServiceException ex),
4454 rajveer 1069
 
1070
	/**
4488 rajveer 1071
	 Once user raise the request for a RET, order status will be changed from DELVIERY_SUCCESS to RET_REQUEST_RECEIVED 
1072
	*/
1073
	bool markOrderReturnRequestReceived(1:i64 orderId) throws (1:TransactionServiceException ex),
1074
 
1075
	/**
1076
	 CRM person can authorize or deny the request reised by customer. If he authorizes order will change from RET_REQUEST_RECEIVED 
1077
	 to RET_REQUEST_AUTHORIZED. If he denies, status will be changed back to DELVIERY_SUCCESS. 
1078
	*/
7645 anupam.sin 1079
	bool markOrderReturnRequestAuthorized(1:i64 orderId, 2:bool isAuthorized, 3:bool fromStore, 4:bool isReship) throws (1:TransactionServiceException ex),
4488 rajveer 1080
 
1081
	/**
2537 chandransh 1082
	Sends out an email to the account manager of the original courier provider used to ship the order.
4452 rajveer 1083
	If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUEST_RAISED.
1084
	If the order status was DOA_PICKUP_REQUEST_RAISED, it is left unchanged.
2537 chandransh 1085
	For any other status, it returns false.
1086
	Throws an exception if the order with the given id couldn't be found.
1087
	*/
4579 rajveer 1088
	bool requestPickupNumber(1:i64 orderId, 2:i64 providerId) throws (1:TransactionServiceException ex),
2537 chandransh 1089
 
1090
	/**
4452 rajveer 1091
	If the order status is DOA_PICKUP_REQUEST_RAISED, it does the following
2537 chandransh 1092
		1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
1093
		2. Changes order status to be DOA_PICKUP_AUTHORIZED.
1094
		3. Returns true
2589 chandransh 1095
	If the order is in any other status, it returns false.
2537 chandransh 1096
	Throws an exception if the order with the given id couldn't be found.
1097
	*/
4602 rajveer 1098
	bool authorizePickup(1:i64 orderId, 2:string pickupNumber, 3:i64 providerId) throws (1:TransactionServiceException ex),
2589 chandransh 1099
 
1100
	/**
2765 chandransh 1101
	Marks all DOA_PICKUP_AUTHORIZED orders of the previous day for a provider as DOA_RETURN_IN_TRANSIT.
4910 phani.kuma 1102
	*/
1103
	void markDoasAsPickedUp(1:i64 providerId, 2:map<string, string> pickupDetails),
1104
 
1105
	/**
2765 chandransh 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> getDoasNotPickedUp(1:i64 providerId),
2765 chandransh 1109
 
1110
	/**
4741 phani.kuma 1111
	Marks all RET_PICKUP_CONFIRMED orders of the previous day for a provider as RET_RETURN_IN_TRANSIT.
4910 phani.kuma 1112
	*/
1113
	void markReturnOrdersAsPickedUp(1:i64 providerId, 2:map<string, string> pickupDetails),
1114
 
1115
	/**
4741 phani.kuma 1116
	Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
1117
	*/
4910 phani.kuma 1118
	list<Order> getReturnOrdersNotPickedUp(1:i64 providerId),
4741 phani.kuma 1119
 
1120
	/**
4452 rajveer 1121
	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 1122
	If the order status is RTO_IN_TRANSIT, marks the order status as RTO_RECEIVED_PRESTINE and returns true.
2589 chandransh 1123
	If the order is in any other state, it returns false.
1124
	Throws an exception if the order with the given id couldn't be found.
1125
	*/
10136 anupam.sin 1126
	bool receiveReturn(1:i64 orderId, 2:i64 receiveCondition, 3:bool receiveFreebie) throws (1:TransactionServiceException ex),
2589 chandransh 1127
 
1128
	/**
4452 rajveer 1129
	Used to validate the DOA certificate for an order in the DOA_RECEIVED_PRESTINE state. If the certificate is valid,
2614 chandransh 1130
	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 1131
	If the order is in any other state, it returns false.
1132
	Throws an exception if the order with the given id couldn't be found.
1133
	*/
1134
	bool validateDoa(1:i64 orderId, 2:bool isValid) throws (1:TransactionServiceException ex),
2614 chandransh 1135
 
4495 rajveer 1136
	bool validateReturnProduct(1:i64 orderId, 2:bool isUsable) throws (1:TransactionServiceException ex),
1137
 
2614 chandransh 1138
	/**
4484 rajveer 1139
	If the order is in RTO_RECEIVED_PRESTINE or DOA_CERT_INVALID state, it does the following:
2614 chandransh 1140
		1. Creates a new order for processing in the BILLED state. All billing information is saved.
4484 rajveer 1141
		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 1142
 
1143
	If the order is in DOA_CERT_VALID state, it does the following:
1144
		1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
1145
		2. Creates a return order for the warehouse executive to return the DOA material.
4452 rajveer 1146
		3. Marks the current order as the final DOA_VALID_RESHIPPED state.
2614 chandransh 1147
 
1148
	Returns the id of the newly created order.
1149
 
1150
	Throws an exception if the order with the given id couldn't be found.
1151
	*/
1152
	i64 reshipOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
1153
 
1154
	/**
4484 rajveer 1155
	If the order is in RTO_RECEIVED_PRESTINE, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
2614 chandransh 1156
		1. Creates a refund request for batch processing.
1157
		2. Creates a return order for the warehouse executive to return the shipped material.
4484 rajveer 1158
		3. Marks the current order as RTO_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
2614 chandransh 1159
 
1160
	If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
1161
		1. Creates a refund request for batch processing.
3226 chandransh 1162
		2. Cancels the reservation of the item in the warehouse.
1163
		3. Marks the current order as the REFUNDED final state.
2614 chandransh 1164
 
3226 chandransh 1165
	For all COD orders, if the order is in INIT, SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
1166
		1. Cancels the reservation of the item in the warehouse.
1167
		2. Marks the current order as CANCELED.	
1168
 
1169
	In all cases, it updates the reason for cancellation or refund and the person who performed the action.
1170
 
2614 chandransh 1171
	Returns True if it is successful, False otherwise.
1172
 
1173
	Throws an exception if the order with the given id couldn't be found.
1174
	*/
3226 chandransh 1175
	bool refundOrder(1:i64 orderId, 2:string refundedBy, 3:string reason) throws (1:TransactionServiceException ex),
2688 chandransh 1176
 
1177
	/**
1178
	Get all return orders created between the from and to dates for the given warehouse.
1179
	Ignores the warehouse if it is passed as -1.
1180
	*/
1181
	list<ReturnOrder> getReturnOrders(1:i64 warehouseId, 2:i64 fromDate, 3:i64 toDate),
1182
 
1183
	/**
5481 phani.kuma 1184
	Get all return orders created between the from and to dates.
1185
	*/
1186
	list<ReturnOrder> getAllReturnOrders(1:bool onlyNotProcessed, 2:i64 fromDate, 3:i64 toDate),
1187
 
1188
	/**
2700 chandransh 1189
	Returns the ReturnOrder corresponding to the given id.
1190
	Throws an exception if the return order with the given id couldn't be found.
1191
	*/
1192
	ReturnOrder getReturnOrder(1:i64 id) throws (1:TransactionServiceException ex),
1193
 
1194
	/**
2688 chandransh 1195
	Marks the return order with the given id as processed. Raises an exception if no such return order exists. 
1196
	*/
2819 chandransh 1197
	void processReturn(1:i64 returnOrderId) throws (1:TransactionServiceException ex),
1198
 
1199
	/**
3451 chandransh 1200
	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.
1201
	*/
3469 chandransh 1202
	Order updateWeight(1:i64 orderId, 2:double weight) throws (1:TransactionServiceException ex),
1203
 
1204
	/**
1205
	Change the item to be shipped for this order. Also adjusts the reservation in the inventory accordingly.
1206
	Currently, it also ensures that only a different color of the given item is shipped.
1207
	*/
1208
	Order changeItem(1:i64 orderId, 2:i64 itemId) throws (1:TransactionServiceException ex),
1209
 
7560 rajveer 1210
	Order changeCourierProvider(1:i64 orderId, 2:i64 providerId) throws (1:TransactionServiceException ex),
1211
 
3469 chandransh 1212
	/**
1213
	Moves the given order to the given warehouse. Also adjusts the inventory reservations accordingly.
1214
	*/
3553 chandransh 1215
	Order shiftToWarehouse(1:i64 orderId, 2:i64 warehouseId) throws (1:TransactionServiceException ex),
1216
 
1217
	/**
1218
	Adds the given delay reason to the given order.
3986 chandransh 1219
	Increases the expected delivery time of the given order by the given no. of days.
3553 chandransh 1220
	Raises an exception if no order with the given id can be found.
1221
	*/
4647 rajveer 1222
	bool addDelayReason(1:i64 orderId, 2:DelayReason delayReason, 3:i64 furtherDelay, 4:string delayReasonText) throws (1:TransactionServiceException ex),
3956 chandransh 1223
 
1224
	/**
1225
	Marks the COD orders with given AWB nos. as having been processed.
1226
	Updates the captured amount for the corresponding payment.
1227
 
1228
	Returns a map of AWBs which were not processed and the associated reason. An AWB is not processed if:
1229
	1. There is no order corresponding to an AWB number.
1230
	2. The captured amount for a payment exceeds the total payment.
1231
	3. The order corresponding to an AWB no. is in a state prior to DELIVERY_SUCCESS.
1232
	*/
4008 mandeep.dh 1233
	map<string, string> reconcileCodCollection(1:map<string, double> collectedAmountMap, 2:string xferBy, 3:string xferTxnId, 4:i64 xferDate) throws (1:TransactionServiceException ex),
1234
 
1235
    /**
4065 mandeep.dh 1236
     * Returns the list of transaction ids that require some extra processing and
4008 mandeep.dh 1237
     * which belong to a particular category. This is currently used by CRM
4065 mandeep.dh 1238
     * application. If no such transaction ids are present, it returns an empty list.
4008 mandeep.dh 1239
     */
1240
    list<i64> getTransactionsRequiringExtraProcessing(1:ExtraTransactionProcessingType category),
1241
 
1242
	/**
1243
	 * Marks a particular transaction as processed for a particular cateogory.
4065 mandeep.dh 1244
	 * It essentially deletes the transaction id record for a particular
1245
	 * processing type category (if present) from DB.
1246
	 * This is currently used by CRM application.
4008 mandeep.dh 1247
	 */
4018 chandransh 1248
	void markTransactionAsProcessed(1:i64 transactionId, 2:ExtraTransactionProcessingType category),
1249
 
1250
	/**
1251
	Returns a map containing the number of risky orders keyed by item id. A risky order
1252
	is defined as one whose shipping date is about to expire.
1253
	*/
4245 rajveer 1254
	map<i64, i64> getItemWiseRiskyOrdersCount(),
1255
 
1256
	/**
4295 varun.gupt 1257
	Returns a list of all orders which have items with given id
1258
	*/
1259
	list<Order> getOrdersForItemIds(1:list<i64> itemIds),
1260
 
1261
	/**
4245 rajveer 1262
	 * Mark order as cancellation request received. If customer sends request of cancellation of 
1263
	 * a particular order, this method will be called. It will just change status of the order 
1264
	 * depending on its current status. It also records the previous status, so that we can move 
1265
	 * back to that status if cancellation request is denied.
1266
	 */
1267
	void markOrderCancellationRequestReceived(1:i64 orderId) throws (1:TransactionServiceException ex),
1268
 
1269
	/**
1270
	 * If we decide to to cancel order, CRM will call this method to move the status of order to 
1271
	 * cancellation request confirmed. After this OM will be able to cancel the order. 	
1272
	 */
1273
	void markOrderCancellationRequestConfirmed(1:i64 orderId) throws (1:TransactionServiceException ex),
1274
 
1275
	/**
1276
	 * If we decide to not to cancel order, we will move the order ro previous status.	
1277
	 */
1278
	void markOrderCancellationRequestDenied(1:i64 orderId) throws (1:TransactionServiceException ex),
1279
 
1280
	/**
4258 rajveer 1281
	 * If we and/or payment gateway has decided to accept the payment, this method needs to be called.
1282
	 * Changed transaction and all orders status to payment accepted.  
4245 rajveer 1283
	 */
4285 rajveer 1284
	void markTransactionAsPaymentFlagRemoved(1:i64 transactionId) throws (1:TransactionServiceException ex),
4245 rajveer 1285
 
4259 anupam.sin 1286
	/**
1287
	* This method is called when a flagged payment is deemed unserviceable and the corresponding orders
1288
	* need to be cancelled
1289
	*/
4285 rajveer 1290
	void refundTransaction(1:i64 transactionId, 2:string refundedBy, 3:string reason) throws (1:TransactionServiceException ex),
4324 mandeep.dh 1291
 
1292
	/**
1293
	 * Updates shipment address of an order. Delivery and shipping date estimates
1294
	 * etc. are also updated here.
1295
	 *
1296
	 * Throws TransactionServiceException in case address change is not
1297
	 * possible due to certain reasons such as new pincode in address is
1298
	 * not serviceable etc.
1299
	 */
1300
	void updateShipmentAddress(1:i64 orderId, 2:i64 addressId) throws (1:TransactionServiceException ex)
4285 rajveer 1301
 
1302
	/**
1303
	Marks the orders as ACCEPTED for the given itemId and inventory. It also updates the accepted timestamp. If the
1304
	given order is not a COD order, it also captures the payment if the same has not been captured.
1305
	*/
4303 rajveer 1306
	bool acceptOrdersForItemId(1:i64 itemId, 2:i64 inventory) throws (1:TransactionServiceException ex),
4285 rajveer 1307
 
4369 rajveer 1308
	void markOrdersAsPORaised(1:i64 vendorId, 2:i64 itemId, 3:i64 quantity, 4:i64 estimate, 5:bool isReminder) throws (1:TransactionServiceException ex),
1309
	void markOrdersAsReversalInitiated(1:i64 vendorId, 2:i64 itemId, 3:i64 quantity, 4:i64 estimate, 5:bool isReminder) throws (1:TransactionServiceException ex),
1310
	void markOrdersAsNotAvailabke(1:i64 vendorId, 2:i64 itemId, 3:i64 quantity, 4:i64 estimate, 5:bool isReminder) throws (1:TransactionServiceException ex),
1311
 
4386 anupam.sin 1312
	map<i32, TimeoutSummary> markOrdersAsTimeout(1:i64 vendorId) throws (1:TransactionServiceException ex),
4661 rajveer 1313
 
4386 anupam.sin 1314
	/**
4661 rajveer 1315
	Mark order as LOST_IN_TRANSIT
1316
	*/
1317
	bool markOrderAsLostInTransit(1:i64 orderId) throws (1:TransactionServiceException ex),
1318
 
1319
	/**
4386 anupam.sin 1320
	Returns the order corresponding to an AWB number
1321
	*/
4586 mandeep.dh 1322
	Order getOrderForAwb(1:string awb) throws (1:TransactionServiceException ex),
4506 phani.kuma 1323
 
1324
	/**
4910 phani.kuma 1325
	Returns the order corresponding to a logistics provider id for a given list of order status
4506 phani.kuma 1326
	*/
4910 phani.kuma 1327
	list<Order> getOrdersForProviderForStatus(1:i64 logistics_provider_id, 2:list<OrderStatus> order_status_list) throws (1:TransactionServiceException ex)
4600 varun.gupt 1328
 
1329
	/**
1330
	Returns list of orders fullfiled from a certain vendor and billed in a given date range
1331
	*/
1332
	list<Order> getBilledOrdersForVendor(1:i64 vendorId, 2:i64 billingDateFrom, 3:i64 billingDateTo) throws (1:TransactionServiceException ex),
1333
 
4607 rajveer 1334
	list<Order> getSlippedSippingDateOrders() throws (1:TransactionServiceException ex),
1335
 
4709 rajveer 1336
	list<Order> getCancelledOrders(1:i64 cancelDateFrom, 2:i64 cancelDateTo) throws (1:TransactionServiceException ex),
1337
 
4600 varun.gupt 1338
	void saveBluedartSettlements(1:map<i64, double> mapAWBAndAmount) throws (1:TransactionServiceException ex),
1339
 
4905 varun.gupt 1340
	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 1341
 
1342
	void saveEBSSettlementSummary(1:i64 settlementId, 2:i64 settlementDate, 3:i64 transactionDateFrom, 4:i64 transactionDateTo, 5:double amount) throws (1:TransactionServiceException ex),
1343
 
5386 phani.kuma 1344
	PaymentSettlement getSettlementForPrepaid(1:i64 referenceId, 2:bool isRefund) throws (1:TransactionServiceException ex),
4600 varun.gupt 1345
 
5386 phani.kuma 1346
	PaymentSettlement getSettlementForCod(1:i64 orderId, 2:bool isRefund) throws (1:TransactionServiceException ex),
1347
 
4600 varun.gupt 1348
	map<i64, string> getEBSSettlementSummaries() throws (1:TransactionServiceException ex),
1349
 
1350
	void markEBSSettlementUploaded(1:i64 settlementId) throws (1:TransactionServiceException ex),
1351
 
4715 varun.gupt 1352
	i64 getEBSSettlementDate(1:i64 settlementId) throws (1:TransactionServiceException ex),
1353
 
1354
	list<PaymentSettlement> getSettlementsByDate(1:i64 settlementDateFrom, 2:i64 settlementDateTo, 3:bool isRefund) throws (1:TransactionServiceException ex),
1355
 
1356
	/**
1357
	Returns list of Order Ids, which belong to reshiped orders, shortlisted from a given list of Order Ids 
1358
	*/
4875 varun.gupt 1359
	list<i64> getReshippedOrderIds(1:list<i64> orderIds) throws (1:TransactionServiceException ex),
1360
 
5481 phani.kuma 1361
	list<Order> getBilledOrders(1:i64 vendorId, 2:bool onlyVendorNotPaid, 3:i64 billingDateFrom, 4:i64 billingDateTo) throws (1:TransactionServiceException ex),
5031 varun.gupt 1362
 
5067 varun.gupt 1363
	map<i64, i64> getStatusDistributionOfOrders(1:i64 startDate, 2:i64 endDate) throws (1:TransactionServiceException ex),
1364
 
5099 varun.gupt 1365
	list<i64> getOrderIdsForStatus(1:i64 status, 2:i64 startDatetime, 3:i64 endDatetime) throws (1:TransactionServiceException ex),
1366
 
5348 anupam.sin 1367
	/**
1368
	 * Updates the agent who handled the COD verification call
1369
	 */
1370
	void updateCODAgent(1:string agent, 2:i64 orderId) throws (1:TransactionServiceException ex),
1371
 
5208 varun.gupt 1372
	void updateOrderAsPaidToVendor(1:i64 orderId) throws (1:TransactionServiceException ex),
1373
 
5386 phani.kuma 1374
	void updateOrderOnlyAsPaidToVendor(1:i64 orderId) throws (1:TransactionServiceException ex),
1375
 
5447 anupam.sin 1376
	list<Order> getRefundedOrdersMarkedPaid() throws (1:TransactionServiceException ex),
1377
 
1378
	/**
1379
	* gets all COD Verification Agents for all orderIds from a minId to maxId
1380
	*
1381
	*/
5527 anupam.sin 1382
	list<CODVerificationAgent> getAllVerificationAgents(1:i64 minOrderId, 2:i64 maxOrderId),
1383
 
1384
	/**
1385
	* gets all attributes for a given orderId
1386
	*/
1387
	list<Attribute> getAllAttributesForOrderId(1:i64 orderId),
1388
 
1389
	/**
5676 rajveer 1390
	* sets attributes for an order
1391
	*/
1392
	void setOrderAttributes(1:i64 orderId, list<Attribute> attributes),
1393
 
1394
	/**
5527 anupam.sin 1395
	* sets attributes for all orders in a transaction
1396
	*/
5553 rajveer 1397
	void setOrderAttributeForTransaction(1:i64 transactionId, Attribute attribute),
1398
 
1399
	list<Order> getReceivePendingOrders(1:i64 storeId),
1400
 
5593 mandeep.dh 1401
	list<Order> getReceivedAtStoreOrders(1:i64 storeId),
5713 rajveer 1402
 
1403
	list<Order> getOrdersCollectionAtStore(1:i64 storeId, 2:i64 fromDate, 3:i64 toDate, 4:bool onlyCod),
5593 mandeep.dh 1404
 
5833 rajveer 1405
	string getOrderAttributeValue(1:i64 orderId, string attributeName),
6019 rajveer 1406
 
1407
	bool changeJacketNumber(1:i64 orderId, 2:i64 jacketNumber),
1408
 
1409
	bool markOrderAsRtoInTransit(1:i64 orderId),
1410
 
5593 mandeep.dh 1411
	/**
1412
	 * Accepts appropriate order for an item in a given billingWarehouse. Usually
1413
	 * invoked while scanning IN of items.
1414
	 */
6000 mandeep.dh 1415
	 void acceptOrderForItem(1:i64 itemId, 2:i64 quantity, 3:i64 fulfilmentWarehouseId, 4:i64 billingWarehouseId);
1416
 
1417
	 RechargeOrder createRechargeOrder(1:RechargeOrder rechargeOrder) throws  (1:TransactionServiceException ex);
6031 rajveer 1418
	 RechargeOrder getRechargeOrder(1:i64 rechargeRrderId) throws  (1:TransactionServiceException ex);
1419
	 list<RechargeOrder> getRechargeOrders(1:i64 userId);
1420
 
1421
	 bool updateRechargeOrderStatus(1:i64 rechargeOrderId, 2:RechargeOrderStatus rechargeOrderStatus) throws  (1:TransactionServiceException ex);
1422
	 bool activateRechargeTxn(1:i64 rechargeOrderId) throws  (1:TransactionServiceException ex);
1423
	 UserWallet getUserWallet(1:i64 userId);
1424
	 list<UserWalletHistory> getUserWalletHistory(1:i64 userId);
6050 anupam.sin 1425
	 /**
1426
	 Returns a recharge order for a given transactionId
1427
	 */
1428
	 RechargeOrder getRechargeOrdersForTransaction(1:i64 txnId) throws (1:TransactionServiceException ex);
6206 rajveer 1429
	 map<i64, string> getServiceProviders(1:RechargeType rechargeType, 2:bool onlyActive);
6289 anupam.sin 1430
	 DeviceNumberInfo getServiceProviderForDevice(1:RechargeType rechargeType, 2:string deviceNumber);
6591 anupam.sin 1431
	 string validateRecharge(1:RechargeType rechargeType, 2:string deviceNumber, 3:i64 userSelectedProviderId, 4:string clientAddress);
6094 rajveer 1432
	 list<RechargeOrder> getRechargeOrdersForDevice(1:string deviceNumber);
1433
	 void addAmountToWallet(1:i64 userId, 2:i64 orderId, 3:i64 amount);
6188 rajveer 1434
 
1435
	 RechargeStatistics getRechargeStatistics();
1436
 
6154 rajveer 1437
	 list<RechargeOrder> getRechargeOrdersForStatus(1:i64 status);
6159 rajveer 1438
	 list<RechargePlan> getPlansForOperator(1:i64 operatorId);
6289 anupam.sin 1439
 
1440
	 /**
1441
	 Returns denominations for a given operator and circle
1442
	 */
6307 anupam.sin 1443
	 list<RechargeDenomination> getRechargeDenominations(1:i64 operatorId, 2:string circleCode, 3:DenominationType denominationType) throws (1:TransactionServiceException ex);
6371 rajveer 1444
 
1445
	 void updateAvailabilityStatus(1:i64 operatorId, 2:i64 circleId, 3:bool isAvailable);
6389 rajveer 1446
 
1447
	 list<EmiScheme> getAvailableEmiSchemes();
1448
 
6412 rajveer 1449
	 map<i64, double> getMiscCharges(1:i64 transactionId);
6507 anupam.sin 1450
 
1451
	 bool refundRechargeOrder(1:i64 rechargeOrderId) throws (1:TransactionServiceException ex);
6821 amar.kumar 1452
 
6906 rajveer 1453
	 list<Order> getPhysicalOrders(1:i64 fromDate, 2:i64 toDate);
1454
 
1455
	 binary getDocument(1:i64 docType, 2:i64  docSource);
6985 anupam.sin 1456
 
1457
	 bool changeShippingAddress(1:i64 orderId, 2:string line1, 3:string line2, 4:string city, 5:string state, 6:string pin);
6988 rajveer 1458
 
7075 rajveer 1459
	 binary retrieveInvoice(1:i64 orderId, 2:i64 userId);
6988 rajveer 1460
 
7026 rajveer 1461
	 list<string> receiveUpdatesForRedExpress(1:string awbNumber);
7073 anupam.sin 1462
 
1463
	 RechargeTransaction createRechargeTransaction(1:RechargeTransaction thriftRechargeTransaction);
7080 anupam.sin 1464
 
7084 rajveer 1465
	 list<RechargeTransaction> getRechargeTransactions(1:i64 storeId);
7151 amit.gupta 1466
 
1467
	 list<RechargeTransaction> getRechargeTrans(1:i64 storeId, 2:i64 startDate, 3:i64 endDate, 4:RechargeOrderStatus status);
7084 rajveer 1468
 
7080 anupam.sin 1469
	 RechargeTransaction getRechargeTransaction(1:i64 rechargeId);
1470
 
1471
	 list<FRC> getFRCs(1:i64 circleId, 2:i64 operatorId);
7096 anupam.sin 1472
 
1473
	 HotspotStore getHotspotStore(1:i64 id, 2:string hotspotid);
1474
 
1475
	 TelecomCircle getTelecomCircle(1:i64 id, 2:string code);
7109 anupam.sin 1476
 
1477
	 binary retrieveHotspotRechargeInvoice(1:i64 rechargeId);
7169 anupam.sin 1478
 
7190 amar.kumar 1479
	 Order splitFreebieOrder(1:i64 orderId, 2:string splitReason, 3:i64 shippingDate);
1480
 
7172 anupam.sin 1481
	 list<RechargeTransaction> getRechargeTransactionsByNumber(1:string number, 2:i64 storeId);
7169 anupam.sin 1482
 
1483
	 bool updateHotspotStorePassword(1:i64 storeId, 2:string password);
7263 anupam.sin 1484
 
7285 rajveer 1485
	 i64 topupCompanyWallet(1:i64 companyId, 2:i64 amount);
1486
 
1487
	 i64 getWalletBalanceForCompany(1:i64 companyId);
7363 rajveer 1488
 
1489
	 i64 getSaholicRechargeBalance();
7285 rajveer 1490
 
7263 anupam.sin 1491
	 SourceDetail getSourceDetail(1:i64 source);
7267 anupam.sin 1492
 
1493
	 list<TelecomCircle> getAllCircles();
1494
 
1495
	 bool deleteFrcs(1:list<i64> frcIdsToDelete);
7311 kshitij.so 1496
 
1497
	 void addAmazonOrder(1:AmazonOrder amazonOrder);
1498
 
7322 vikram.rag 1499
	 bool updateAmazonOrderStatus(1:i64 orderId,2:string status);
7311 kshitij.so 1500
 
7686 vikram.rag 1501
	 list<Order> getAmazonOrdersShipped();
7311 kshitij.so 1502
 
1503
	 list<Order> getAmazonOrdersCancelled(1:i64 interval);
1504
 
7343 anupam.sin 1505
	 AmazonOrder getAmazonOrder(1:i64 orderId);
7322 vikram.rag 1506
 
7542 vikram.rag 1507
	 list<AmazonOrder> getAmazonOrderByAmazonOrderId(1:string amazonOrderId);
1508
 
7343 anupam.sin 1509
	 list<Order> getOrdersForStore(1:i64 id, 2:i64 storeId, 3:i64 startDate, 4:i64 endDate, 5:list<OrderStatus> statuses);
1510
 
7386 anupam.sin 1511
	 binary getStoreOrderAdvanceInvoice(1:i64 orderId, 2:i64 storeId);
7355 vikram.rag 1512
 
7370 anupam.sin 1513
	 bool addFrc(1:i64 circleId, 2:i64 operatorId, 3:i64 denomination, 4:i64 maxDiscount);
7371 anupam.sin 1514
 
1515
	 string addSeries(1:i64 circle, 2:i64 operatorId, 3:i64 series);
7386 anupam.sin 1516
 
1517
	 bool saveStoreOrderDetail(1:StoreOrderDetail storeOrderDetail);
1518
 
1519
	 StoreOrderDetail getStoreOrderDetail(1:i64 orderId, 2:i64 storeId);
1520
 
1521
	 list<string> getAllEdcBanks();
7393 anupam.sin 1522
 
1523
	 bool saveRefundAmountsForStoreOrder(1:i64 orderId, 2:i64 storeId, 3:double cashRefundAmount, 4:double cardRefundAmount);
7427 anupam.sin 1524
 
1525
	 list<StoreOrderCollection> getCollectionsForStore(1:i64 storeId, 2:i64 startDate, 3:i64 endDate);
7442 vikram.rag 1526
 
7460 kshitij.so 1527
	 list<AmazonOrdersToAcknowledge> getAmazonOrdersToAcknowledge();
7442 vikram.rag 1528
 
7460 kshitij.so 1529
	 void changeAmazonOrderStatus(1:string amazonOrderCode,2:string status);
1530
 
7762 kshitij.so 1531
	 bool updateTimestampForAmazonOrder(1:map<i64, map<string,string>> amazonOrderDelivery);
7530 kshitij.so 1532
 
1533
	 bool updateSourceDetailTimestamp(1:i64 id , 2:i64 lastUpdatedOn);
7572 anupam.sin 1534
 
1535
	 list<Order> getOrdersByMobileNumber(1:string mobileNumber);
1536
 
7645 anupam.sin 1537
	 list<Order> getOrdersByAmazonOrderCode(1:string amazonId);
7730 anupam.sin 1538
 
1539
	 bool convertStoreToNormal(1:i64 orderId);
7822 amar.kumar 1540
 
1541
	 Order updateFreebieItem(1:i64 orderId, 2:i64 newFreebieItemId);
7939 manish.sha 1542
 
7967 anupam.sin 1543
	 list<HotspotServiceMatrix> getHotspotServiceMatrices();
1544
 
7939 manish.sha 1545
	 Order updateOrderAWB(1:i64 orderId, 2:string airwayBillNo);
8182 amar.kumar 1546
 
1547
	 list<Order> getOrdersByVendor(1:list<i64> vendors, 2:list<OrderStatus> statuses) throws (1:TransactionServiceException ex);
1548
 
1549
	 void createEbayOrder(1:EbayOrder ebayOrder);
1550
 
1551
	 EbayOrder getEbayOrderByOrderId(1:i64 orderId);
1552
 
1553
	 EbayOrder getEbayOrderBySalesRecNumber(1:i64 salesRecordNumber);
1554
 
8241 amar.kumar 1555
	 list<EbayOrder> getEbayOrder(1:i64 salesRecordNumber, 2:string listingId, 3:string paisapayId);
8182 amar.kumar 1556
 
1557
	 void updateEbayOrder(1:EbayOrder ebayOrder);
1558
 
1559
	 bool ebayOrderExists(1:i64 salesRecNumber, 2:string ebayListingId);
1560
 
1561
	 void updateOrderForEbay(1:Order order);
1562
 
1563
	 Order splitEbayOrder(1:i64 orderId, 2:i64 splitOrderQty, 3:i64 splitOrderItemId, 4:bool usePowerShip);
8282 kshitij.so 1564
 
1565
	 void addOrUpdateAmazonFbaSalesSnapshot(1:AmazonFbaSalesSnapshot amazonfbasalessnapshot);
1566
 
1567
	 list<AmazonFbaSalesSnapshot> getAmazonFbaSalesSnapshotForDays(1:i32 days);
1568
 
8488 amar.kumar 1569
     AmazonFbaSalesSnapshot getAmazonFbaSalesLatestSnapshotForItem(1:i64 item_id);
1570
 
1571
     void createSnapdealOrder(1:SnapdealOrder snapdealOrder);
1572
 
11424 kshitij.so 1573
     list<SnapdealOrder> getSnapdealOrder(1:i64 orderId, 2:string referenceCode, 3:string subrderId)
8488 amar.kumar 1574
 
9630 vikram.rag 1575
     bool snapdealOrderExists(1:string subOrderId, 2:string referenceCode);
8488 amar.kumar 1576
 
8532 vikram.rag 1577
     void updateLatestFbaPricesForItem(1:FbaItemPrices fbaitemprices)
1578
 
8961 vikram.rag 1579
     bool flipkartOrderExists(1:string flipkartOrderId, 2:string flipkartSubOrderId)
1580
 
1581
     void createFlipkartOrder(1:FlipkartOrder flipkartOrder)
1582
 
9107 vikram.rag 1583
     FlipkartOrder getFlipkartOrder(1:i64 orderId)
8990 vikram.rag 1584
 
9159 amar.kumar 1585
     FlipkartOrder getFlipkartOrderByOrderItemId(1:string flipkartOrderItemId)
1586
 
9107 vikram.rag 1587
     void updateFlipkartOrderDatesAndAWB(1:string flipkartOrderId,2:string flipkartSubOrderId,3:i64 date,4:string awb)
9404 vikram.rag 1588
 
9571 vikram.rag 1589
     map<i64,i64> getOrdersCreatedAfterTimestampForSource(1:i64 timestamp,2:i64 source)
9404 vikram.rag 1590
 
9338 manish.sha 1591
     Order getOrderForAirwayBillNo(1:string airwaybillNo) throws (1:TransactionServiceException ex)
9651 manish.sha 1592
 
1593
	 i64 getMinCreatedTimeStampUndeliveredOrdersForSource(1:i32 source)
1594
 
9880 manish.sha 1595
	 void updateSnapdealOrdersStatus(1:map<string, list<list<string>>> orders)  throws (1:TransactionServiceException ex)
9651 manish.sha 1596
 
1597
	 void updateFlipkartOrdersStatus(1:list<list<string>> delivered_orders)  throws (1:TransactionServiceException ex)
9801 manish.sha 1598
 
1599
	 void bulkAddOrUpdateAmazonFbaSalesSnapshot(1:list<AmazonFbaSalesSnapshot> amazonfbasalessnapshotlist)
9945 vikram.rag 1600
 
1601
	 map<i64,i64> getCreatedOrdersForFlipkart(list<string> flipkartorderids)
1602
 
11896 amit.gupta 1603
	 bool isPrivateDealTransaction(1:i64 transactionId)
1604
 
12103 manish.sha 1605
	 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)
1606
 
1607
	 void updateAmazonFbaOrdersReturns(1:list<AmazonFbaOrderReturns> fbaOrderReturns) throws (1:TransactionServiceException ex)
1608
 
1609
	 list<AmazonFbaOrderReturns> getAllAmazonFbaOrderReturnsByCurrentTime(1:i64 insertionTimestamp) throws (1:TransactionServiceException ex)
1610
 
1611
	 map<i64, map<string, i64>> getTotalSaleReturnsFbaSkusCurentTime(1:i64 insertionTimestamp) throws (1:TransactionServiceException ex)
1612
 
1613
}