Subversion Repositories SmartDukaan

Rev

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