Subversion Repositories SmartDukaan

Rev

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