Subversion Repositories SmartDukaan

Rev

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