Subversion Repositories SmartDukaan

Rev

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

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