Subversion Repositories SmartDukaan

Rev

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