Subversion Repositories SmartDukaan

Rev

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