Subversion Repositories SmartDukaan

Rev

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

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