Subversion Repositories SmartDukaan

Rev

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