Subversion Repositories SmartDukaan

Rev

Rev 19004 | Rev 19474 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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