Subversion Repositories SmartDukaan

Rev

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