Subversion Repositories SmartDukaan

Rev

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