Subversion Repositories SmartDukaan

Rev

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