Subversion Repositories SmartDukaan

Rev

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